]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/get-stack-mapping-with-dead-get-stack.js
e158ccb6c0efa42a77b1245c47b3b0b2c5b14f71
[apple/javascriptcore.git] / tests / stress / get-stack-mapping-with-dead-get-stack.js
1 function bar() {
2 if (foo.arguments[0] === void 0)
3 throw "Error: foo.arguments[0] should not be undefined but is."
4 }
5
6 noInline(bar);
7
8 function foo(a, p) {
9 var tmp = a;
10 effectful42();
11 for (var i = 0; i < 10; ++i) {
12 bar();
13 a = i;
14 }
15 if (p) {
16 var tmp = arguments;
17 }
18 return a;
19 }
20
21 noInline(foo);
22
23 for (var i = 0; i < 10000; ++i) {
24 var result = foo(0, false);
25 if (result != 9)
26 throw "Error: bad result: " + result;
27 }