X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/4be4e30906bcb8ee30b4d189205cb70bad6707ce..81345200c95645a1b0d2635520f96ad55dfde63f:/tests/stress/phantom-arguments-set-local-then-exit-in-same-block.js diff --git a/tests/stress/phantom-arguments-set-local-then-exit-in-same-block.js b/tests/stress/phantom-arguments-set-local-then-exit-in-same-block.js new file mode 100644 index 0000000..fe64414 --- /dev/null +++ b/tests/stress/phantom-arguments-set-local-then-exit-in-same-block.js @@ -0,0 +1,17 @@ +function foo(o) { + var a = arguments; + var result = o.f; + for (var i = 1; i < a.length; ++i) + result += a[i]; + return result; +} + +noInline(foo); + +for (var i = 0; i < 100; ++i) + foo({f:42}, 1, 2, 3); + +var result = foo({g:40, f:41}, 1, 2.5, 3); +if (result != 47.5) + throw "Bad result: " + result; +