[JSC] Do not use asArrayModes() with Structures because it discards TypedArray inform...
[WebKit-https.git] / JSTests / stress / in-by-id-custom-values.js
1 function shouldBe(actual, expected) {
2     if (actual !== expected)
3         throw new Error('bad value: ' + actual);
4 }
5
6 function test(object)
7 {
8     return "$1" in object;
9 }
10 noInline(test);
11
12 var target1 = RegExp;
13 var target2 = { __proto__: RegExp };
14 for (var i = 0; i < 1e5; ++i) {
15     shouldBe(test(target1), true);
16     shouldBe(test(target2), true);
17 }