aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/regress/regress-crbug-935932.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/regress/regress-crbug-935932.js')
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-935932.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-935932.js b/deps/v8/test/mjsunit/regress/regress-crbug-935932.js
index a34b7743e0..1a60ec9276 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-935932.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-935932.js
@@ -5,6 +5,7 @@
// Flags: --allow-natives-syntax
function test(func, expect) {
+ %PrepareFunctionForOptimization(func);
assertTrue(func() == expect);
%OptimizeFunctionOnNextCall(func);
assertTrue(func() == expect);
@@ -50,6 +51,7 @@ test(check_v4, true);
function testIn(index, array) {
return index in array;
}
+ %PrepareFunctionForOptimization(testIn);
let a = [];
a.__proto__ = [0,1,2];
@@ -65,6 +67,7 @@ test(check_v4, true);
%ClearFunctionFeedback(testIn);
%DeoptimizeFunction(testIn);
+ %PrepareFunctionForOptimization(testIn);
// First load will set IC to Load handle with allow hole to undefined conversion false.
assertTrue(testIn(0, a));
@@ -75,6 +78,7 @@ test(check_v4, true);
// Repeat the same testing for access out-of-bounds of the array, but in bounds of it's prototype.
%ClearFunctionFeedback(testIn);
%DeoptimizeFunction(testIn);
+ %PrepareFunctionForOptimization(testIn);
assertTrue(testIn(2, a));
assertTrue(testIn(2, a));
@@ -83,6 +87,7 @@ test(check_v4, true);
%ClearFunctionFeedback(testIn);
%DeoptimizeFunction(testIn);
+ %PrepareFunctionForOptimization(testIn);
assertTrue(testIn(2, a));
%OptimizeFunctionOnNextCall(testIn);