]> git.saurik.com Git - apple/javascriptcore.git/blame_incremental - tests/stress/for-in-base-reassigned-later.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / for-in-base-reassigned-later.js
... / ...
CommitLineData
1function foo(o_) {
2 var o = o_;
3 var result = 0;
4 for (var s in o) {
5 result += o[s];
6 if (result >= 3)
7 o = {0:1, 1:2, a:3, b:4};
8 }
9 return result;
10}
11
12noInline(foo);
13
14for (var i = 0; i < 10000; ++i) {
15 var result = foo({0:0, 1:1, a:2, b:3});
16 if (result != 7)
17 throw "Error: bad result: " + result;
18}