]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/bug-131764.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / bug-131764.js
1 var result = 0;
2 function test1(arr) {
3 return Array.of(...arr);
4 }
5 function test2() {
6 return Array(...arguments);
7 }
8
9 var result = 0;
10 if (this.noInline) {
11 noInline(test1)
12 noInline(test2)
13 }
14
15 var array = [1,2,3,4,5];
16
17 for (var i = 0; i < 10000; i++) {
18 result ^= test2(1,2,3,4,5,6,7).length;
19 }
20
21 if (result != 0)
22 throw "Error: bad result: " + result;