]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/op-push-name-scope-crashes-profiler.js
42784f1900230c178461e269c5f4fbb8b2a3353f
[apple/javascriptcore.git] / tests / stress / op-push-name-scope-crashes-profiler.js
1 //@ runProfiler
2 function test() {
3 (function functionName() {
4 ++counter;
5 if (!arguments[0])
6 return;
7 eval("functionName(arguments[0] - 1, functionName, '' + functionName);");
8 })(arguments[0]);
9 }
10
11 for (var i = 0; i < 10000; ++i) {
12 counter = 0;
13 test(100);
14 if (counter !== 101) {
15 throw "Oops, test(100) = " + test(100) + ", expected 101.";
16 }
17 }