X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/4be4e30906bcb8ee30b4d189205cb70bad6707ce..81345200c95645a1b0d2635520f96ad55dfde63f:/tests/stress/captured-arguments-variable.js diff --git a/tests/stress/captured-arguments-variable.js b/tests/stress/captured-arguments-variable.js new file mode 100644 index 0000000..a0e68e4 --- /dev/null +++ b/tests/stress/captured-arguments-variable.js @@ -0,0 +1,17 @@ +function foo(a) { + return arguments[1] + (function() { return a * 101; })(); +} + +noInline(foo); + +for (var i = 0; i < 10000; ++i) { + var result = foo(42, 97); + if (result != 4339) + throw "Error: bad result: " + result; +} + +Object.prototype[1] = 111; + +var result = foo(42); +if (result != 4353) + throw "Error: bad result at end: " + result;