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

Unified Diff: test/mjsunit/math-min-max.js

Issue 2843049: Simplify the transitions in the Binary Op ICs. Now a single call... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 5 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
Index: test/mjsunit/math-min-max.js
===================================================================
--- test/mjsunit/math-min-max.js (revision 5022)
+++ test/mjsunit/math-min-max.js (working copy)
@@ -42,7 +42,16 @@
// Prepare a non-Smi zero value.
function returnsNonSmi(){ return 0.25; }
-var ZERO = returnsNonSmi() - returnsNonSmi();
+var ZERO = (function() {
+ var z;
+ // We have to have a loop here because the first time we get a Smi from the
+ // runtime system. After a while the binary op IC settles down and we get
+ // a non-Smi from the generated code.
+ for (var i = 0; i < 10; i++) {
+ z = returnsNonSmi() - returnsNonSmi();
+ }
+ return z;
+})();
assertEquals(0, ZERO);
assertEquals(Infinity, 1/ZERO);
assertEquals(-Infinity, 1/-ZERO);

Powered by Google App Engine
This is Rietveld 408576698