[JSC] Do not use asArrayModes() with Structures because it discards TypedArray inform...
[WebKit-https.git] / JSTests / stress / impure-get-own-property-slot-inline-cache.js
1 var createImpureGetter = $vm.createImpureGetter;
2 var setImpureGetterDelegate = $vm.setImpureGetterDelegate;
3
4 var ig = createImpureGetter(null);
5 ig.x = 42;
6
7 var foo = function(o) {
8     return o.x;
9 };
10
11 noInline(foo);
12
13 for (var i = 0; i < 10000; ++i)
14     foo(ig);
15
16 setImpureGetterDelegate(ig, {x:"x"});
17
18 if (foo(ig) !== "x")
19     throw new Error("Incorrect result!");