summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/compiler/constant-fold-tostring.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/compiler/constant-fold-tostring.js')
-rw-r--r--deps/v8/test/mjsunit/compiler/constant-fold-tostring.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/compiler/constant-fold-tostring.js b/deps/v8/test/mjsunit/compiler/constant-fold-tostring.js
index e9c6d916ce..e1a66a6694 100644
--- a/deps/v8/test/mjsunit/compiler/constant-fold-tostring.js
+++ b/deps/v8/test/mjsunit/compiler/constant-fold-tostring.js
@@ -7,6 +7,7 @@
// Check that constant-folding of ToString operations works properly for NaN.
(function() {
const foo = () => `${NaN}`;
+ %PrepareFunctionForOptimization(foo);
assertEquals("NaN", foo());
assertEquals("NaN", foo());
%OptimizeFunctionOnNextCall(foo);
@@ -16,6 +17,7 @@
// Check that constant-folding of ToString operations works properly for 0/-0.
(function() {
const foo = x => `${x ? 0 : -0}`;
+ %PrepareFunctionForOptimization(foo);
assertEquals("0", foo(true));
assertEquals("0", foo(false));
assertEquals("0", foo(true));