Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: test/mjsunit/math-round.js

Issue 258793002: ARM64: Generate optimized code for Math.floor and Math.round with double outputs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Change C-style comments to C++-style comments Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/math-floor-part4.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/math-round.js
diff --git a/test/mjsunit/math-round.js b/test/mjsunit/math-round.js
index bf590692073ebc62f6f4a34d9bc098316d7e9026..12a92657a1becac6f7049fe04dc01fef6b0580d6 100644
--- a/test/mjsunit/math-round.js
+++ b/test/mjsunit/math-round.js
@@ -38,6 +38,16 @@ function testRound(expect, input) {
assertEquals(expect, doRound(input));
%OptimizeFunctionOnNextCall(doRound);
assertEquals(expect, doRound(input));
+
+ // Force the Math.round() representation to double to exercise the associated
+ // optimized code.
+ var doRoundToDouble = new Function('input',
+ '"' + (test_id++) + '";return Math.round(input) + -0.0');
+ assertEquals(expect, doRoundToDouble(input));
+ assertEquals(expect, doRoundToDouble(input));
+ assertEquals(expect, doRoundToDouble(input));
+ %OptimizeFunctionOnNextCall(doRoundToDouble);
+ assertEquals(expect, doRoundToDouble(input));
}
testRound(0, 0);
« no previous file with comments | « test/mjsunit/math-floor-part4.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698