summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/math-floor-part1.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/math-floor-part1.js')
-rw-r--r--deps/v8/test/mjsunit/math-floor-part1.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/math-floor-part1.js b/deps/v8/test/mjsunit/math-floor-part1.js
index bad1edd081..c386c1161c 100644
--- a/deps/v8/test/mjsunit/math-floor-part1.js
+++ b/deps/v8/test/mjsunit/math-floor-part1.js
@@ -32,6 +32,7 @@ var test_id = 0;
function testFloor(expect, input) {
var test = new Function('n',
'"' + (test_id++) + '";return Math.floor(n)');
+ %PrepareFunctionForOptimization(test);
assertEquals(expect, test(input));
assertEquals(expect, test(input));
assertEquals(expect, test(input));
@@ -41,6 +42,7 @@ function testFloor(expect, input) {
var test_double_input = new Function(
'n',
'"' + (test_id++) + '";return Math.floor(+n)');
+ %PrepareFunctionForOptimization(test_double_input);
assertEquals(expect, test_double_input(input));
assertEquals(expect, test_double_input(input));
assertEquals(expect, test_double_input(input));
@@ -50,6 +52,7 @@ function testFloor(expect, input) {
var test_double_output = new Function(
'n',
'"' + (test_id++) + '";return Math.floor(n) + -0.0');
+ %PrepareFunctionForOptimization(test_double_output);
assertEquals(expect, test_double_output(input));
assertEquals(expect, test_double_output(input));
assertEquals(expect, test_double_output(input));
@@ -59,6 +62,7 @@ function testFloor(expect, input) {
var test_via_ceil = new Function(
'n',
'"' + (test_id++) + '";return -Math.ceil(-n)');
+ %PrepareFunctionForOptimization(test_via_ceil);
assertEquals(expect, test_via_ceil(input));
assertEquals(expect, test_via_ceil(input));
assertEquals(expect, test_via_ceil(input));
@@ -69,6 +73,7 @@ function testFloor(expect, input) {
var test_via_trunc = new Function(
'n',
'"' + (test_id++) + '";return Math.trunc(n)');
+ %PrepareFunctionForOptimization(test_via_trunc);
assertEquals(expect, test_via_trunc(input));
assertEquals(expect, test_via_trunc(input));
assertEquals(expect, test_via_trunc(input));
@@ -88,6 +93,7 @@ function test() {
function ifloor(x) {
return 1 / Math.floor(x);
}
+ %PrepareFunctionForOptimization(ifloor);
assertEquals(-Infinity, ifloor(-0));
assertEquals(-Infinity, ifloor(-0));
assertEquals(-Infinity, ifloor(-0));