]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/ftl-reallocatepropertystorage.js
JavaScriptCore-7600.1.4.16.1.tar.gz
[apple/javascriptcore.git] / tests / stress / ftl-reallocatepropertystorage.js
1 function foo(x){
2 x.a0 = 0;
3 x.a1 = 1;
4 x.a2 = 2;
5 x.a3 = 3;
6 x.a4 = 4;
7 x.a5 = 5;
8 x.a6 = 6;
9 x.a7 = 7;
10 x.a8 = 8;
11 x.a9 = 9;
12 x.a10 = 10;
13 }
14
15 noInline(foo);
16
17 var c = {};
18 for (var i = 0; i < 100000; ++i) {
19 var b = {};
20 foo(b);
21 c = b;
22 }
23
24 for (var j = 0; j <= 10 ; ++j)
25 if (c['a'+j] != j)
26 throw "Error "+c['a'+j];
27
28