]> git.saurik.com Git - apple/javascriptcore.git/blame_incremental - tests/stress/varargs-varargs-inlined-exit-strict-mode.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / varargs-varargs-inlined-exit-strict-mode.js
... / ...
CommitLineData
1"use strict";
2
3function foo(a, b) {
4 return a + b;
5}
6
7function bar() {
8 var a = arguments;
9 var tmp = arguments[0] + 1;
10 return tmp + foo.apply(null, a);
11}
12
13function baz() {
14 return bar.apply(this, arguments);
15}
16
17noInline(baz);
18
19for (var i = 0; i < 10000; ++i) {
20 var result = baz(1, 2);
21 if (result != 1 + 1 + 3)
22 throw "Error: bad result: " + result;
23}
24
25var result = baz(1.5, 2);
26if (result != 1.5 + 1 + 3.5)
27 throw "Error: bad result at end: " + result;