[DFG][FTL] operationHasIndexedProperty does not consider negative int32_t
[WebKit-https.git] / JSTests / stress / operation-in-may-have-negative-int32-contiguous-array.js
1 function shouldBe(actual, expected)
2 {
3     if (actual !== expected)
4         throw new Error('bad value: ' + actual);
5 }
6
7 var k = -1;
8 var o1 = ["Cocoa"];
9 o1[k] = 42;
10
11 function test1(o)
12 {
13     return k in o;
14 }
15 noInline(test1);
16
17 for (var i = 0; i < 1e6; ++i)
18     shouldBe(test1(o1), true);