]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/get-stack-mapping.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / get-stack-mapping.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 effectful42();
10 for (var i = 0; i < 10; ++i) {
11 bar();
12 a = i;
13 }
14 if (p) {
15 var tmp = arguments;
16 }
17 return a;
18 }
19
20 noInline(foo);
21
22 for (var i = 0; i < 10000; ++i) {
23 var result = foo(0, false);
24 if (result != 9)
25 throw "Error: bad result: " + result;
26 }