DFG should have adaptive structure watchpoints
[WebKit-https.git] / LayoutTests / js / regress / script-tests / global-object-access-with-mutating-structure.js
1 function foo() {
2     var result = 0;
3     for (var i = 0; i < 100; ++i)
4         result += f;
5     return result;
6 }
7
8 noInline(foo);
9
10 f = 42;
11 for (var i = 0; i < 10000; ++i) {
12     this["i" + i] = i;
13     var result = foo();
14     if (result != 42 * 100)
15         throw "Error: bad result: " + result;
16 }