X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/tests/stress/get-stack-mapping-with-dead-get-stack.js?ds=inline diff --git a/tests/stress/get-stack-mapping-with-dead-get-stack.js b/tests/stress/get-stack-mapping-with-dead-get-stack.js new file mode 100644 index 0000000..e158ccb --- /dev/null +++ b/tests/stress/get-stack-mapping-with-dead-get-stack.js @@ -0,0 +1,27 @@ +function bar() { + if (foo.arguments[0] === void 0) + throw "Error: foo.arguments[0] should not be undefined but is." +} + +noInline(bar); + +function foo(a, p) { + var tmp = a; + effectful42(); + for (var i = 0; i < 10; ++i) { + bar(); + a = i; + } + if (p) { + var tmp = arguments; + } + return a; +} + +noInline(foo); + +for (var i = 0; i < 10000; ++i) { + var result = foo(0, false); + if (result != 9) + throw "Error: bad result: " + result; +}