]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/get-stack-mapping-with-dead-get-stack.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / get-stack-mapping-with-dead-get-stack.js
CommitLineData
ed1e77d3
A
1function bar() {
2 if (foo.arguments[0] === void 0)
3 throw "Error: foo.arguments[0] should not be undefined but is."
4}
5
6noInline(bar);
7
8function 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
21noInline(foo);
22
23for (var i = 0; i < 10000; ++i) {
24 var result = foo(0, false);
25 if (result != 9)
26 throw "Error: bad result: " + result;
27}