]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/create-this-with-callee-variants.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / create-this-with-callee-variants.js
1 function createInLoop(x, count) {
2 noInline(x)
3 for (var i = 0; i < 5000; i++) {
4 var obj = new x;
5 if (!(obj instanceof x))
6 throw "Failed to instantiate the right object";
7 }
8 }
9
10 function y() { return function () {} }
11
12 createInLoop(y());
13
14 function z() { return function () {} }
15
16 createInLoop(z());
17 createInLoop(z());
18 createInLoop(z());