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

Unified Diff: test/mjsunit/regress/regress-234101.js

Issue 14429002: Do not emit double values at their use sites. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-234101.js
diff --git a/test/mjsunit/regress/regress-2499.js b/test/mjsunit/regress/regress-234101.js
similarity index 80%
copy from test/mjsunit/regress/regress-2499.js
copy to test/mjsunit/regress/regress-234101.js
index 52aad874db6fcdc89f5ee1ae4db45304e64b0e77..74228dfabe532efdce2d2cd31736959eaff4349b 100644
--- a/test/mjsunit/regress/regress-2499.js
+++ b/test/mjsunit/regress/regress-234101.js
@@ -27,14 +27,16 @@
// Flags: --allow-natives-syntax
-function foo(word, nBits) {
- return (word[1] >>> nBits) | (word[0] << (32 - nBits));
-}
+// Currently, the gap resolver doesn't handle moves from a ConstantOperand to a
+// DoubleRegister, but these kind of moves appeared when HConstant::EmitAtUses
+// was changed to allow special double values (-0, NaN, hole). So we should
+// either enhance the gap resolver or make sure that such moves don't happen.
-word = [0x1001, 0];
+function foo(x) {
+ return (x ? NaN : 0.2) + 0.1;
+}
-var expected = foo(word, 1);
-foo(word, 1);
+foo(false);
+foo(false);
%OptimizeFunctionOnNextCall(foo);
-var optimized = foo(word, 1);
-assertEquals(expected, optimized)
+foo(false);
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698