]>
Commit | Line | Data |
---|---|---|
1 | function 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 | ||
12 | noInline(foo); | |
13 | ||
14 | for (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 | } |