summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/es6/math-trunc.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/es6/math-trunc.js')
-rw-r--r--deps/v8/test/mjsunit/es6/math-trunc.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/es6/math-trunc.js b/deps/v8/test/mjsunit/es6/math-trunc.js
index c925b5b363..9a79a1f2d4 100644
--- a/deps/v8/test/mjsunit/es6/math-trunc.js
+++ b/deps/v8/test/mjsunit/es6/math-trunc.js
@@ -35,12 +35,14 @@ function testTrunc(expected, input) {
assertEquals(expected, test(input));
assertEquals(expected, test(input));
assertEquals(expected, test(input));
+ %PrepareFunctionForOptimization(test);
%OptimizeFunctionOnNextCall(test);
assertEquals(expected, test(input));
var test_double_input = new Function(
'n',
'"' + (test_id++) + '";return Math.trunc(+n)');
+ %PrepareFunctionForOptimization(test_double_input);
assertEquals(expected, test_double_input(input));
assertEquals(expected, test_double_input(input));
assertEquals(expected, test_double_input(input));
@@ -50,6 +52,7 @@ function testTrunc(expected, input) {
var test_double_output = new Function(
'n',
'"' + (test_id++) + '";return Math.trunc(n) + -0.0');
+ %PrepareFunctionForOptimization(test_double_output);
assertEquals(expected, test_double_output(input));
assertEquals(expected, test_double_output(input));
assertEquals(expected, test_double_output(input));
@@ -63,6 +66,7 @@ function test() {
function itrunc(x) {
return 1 / Math.trunc(x);
}
+ %PrepareFunctionForOptimization(itrunc);
assertEquals(Infinity, itrunc(0));
assertEquals(-Infinity, itrunc(-0));
assertEquals(Infinity, itrunc(Math.PI / 4));