]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/arrayify-to-structure-contradiction.js
22c80192fe0ad1af9ef5fab6cd6a6b73ea58085b
[apple/javascriptcore.git] / tests / stress / arrayify-to-structure-contradiction.js
1 function foo(array, v, p) {
2 array[0] = 10;
3 if (p)
4 v = "hello";
5 array[0] = v;
6 }
7
8 noInline(foo);
9
10 for (var i = 0; i < 100000; ++i) {
11 var array = [42];
12 foo(array, 43, false);
13 if (array[0] != 43)
14 throw "Error: bad result: " + array;
15 }
16