Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / regress / script-tests / array-with-int32-add-sub.js
blob42cf2d987142f9ac0577fac2db33344cb51d2ea7
1 function foo() {
2 var a = [];
3 var b = [];
5 for (var i = 0; i < 1000; ++i) {
6 a.push(i + 1);
7 b.push(i - 1);
10 for (var i = 0; i < 1000; ++i) {
11 for (var j = 0; j < a.length; ++j)
12 a[j] += b[j];
13 for (var j = 0; j < a.length; ++j)
14 a[j] -= b[j];
17 var result = 0;
18 for (var i = 0; i < a.length; ++i)
19 result += a[i];
21 return result;
24 if (foo() != 500500)
25 throw "ERROR";