]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/weird-put-stack-varargs.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / weird-put-stack-varargs.js
1 function baz() {
2 if (!foo.arguments[1])
3 throw "Error: foo.arguments[1] should be truthy but is falsy: " + foo.arguments[1];
4 }
5
6 noInline(baz);
7
8 function foo(a, b) {
9 if (a)
10 b = 42;
11 baz();
12 }
13
14 function fuzz(a, b) {
15 return a + b;
16 }
17
18 function bar(array1, array2) {
19 fuzz.apply(this, array1);
20 foo.apply(this, array2);
21 }
22
23 noInline(bar);
24
25 for (var i = 0; i < 100000; ++i)
26 bar([false, false], [false, true]);