summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/regress/regress-2193.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/regress/regress-2193.js')
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2193.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/regress/regress-2193.js b/deps/v8/test/mjsunit/regress/regress-2193.js
index 4ec050e10a..068476b1b0 100644
--- a/deps/v8/test/mjsunit/regress/regress-2193.js
+++ b/deps/v8/test/mjsunit/regress/regress-2193.js
@@ -40,12 +40,15 @@ function MakeClosure() {
// Create two closures that share the same literal boilerplates.
var closure1 = MakeClosure();
+%PrepareFunctionForOptimization(closure1);
var closure2 = MakeClosure();
+%PrepareFunctionForOptimization(closure2);
var expected = [1,2,3,3,4,5,6,7,8,9,bozo];
// Make sure we generate optimized code for the first closure after
// warming it up properly so that the literals boilerplate is generated
// and the optimized code uses CreateArrayLiteralShallow runtime call.
+%PrepareFunctionForOptimization(closure1);
assertEquals(0, closure1(false));
assertEquals(expected, closure1(true));
%OptimizeFunctionOnNextCall(closure1);
@@ -53,6 +56,7 @@ assertEquals(expected, closure1(true));
// Optimize the second closure, which should reuse the optimized code
// from the first closure with the same literal boilerplates.
+%PrepareFunctionForOptimization(closure2);
assertEquals(0, closure2(false));
%OptimizeFunctionOnNextCall(closure2);
assertEquals(expected, closure2(true));