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

Unified Diff: src/hydrogen-instructions.cc

Issue 319343002: Bugfix in inlined versions of Array.indexOf() and Array.lastIndexOf() with a regression test. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebasing Created 6 years, 6 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.cc ('k') | test/mjsunit/regress/regress-crbug-381534.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 96cd016e08b917bd29c68e5f80117c43e3f2d06e..8b40a249d34372d793adad1c69c6496d82e5bd52 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -1540,7 +1540,10 @@ HInstruction* HForceRepresentation::New(Zone* zone, HValue* context,
HConstant* c = HConstant::cast(value);
if (c->HasNumberValue()) {
double double_res = c->DoubleValue();
- if (representation.CanContainDouble(double_res)) {
+ if (representation.IsDouble()) {
+ return HConstant::New(zone, context, double_res);
+
+ } else if (representation.CanContainDouble(double_res)) {
return HConstant::New(zone, context,
static_cast<int32_t>(double_res),
representation);
« no previous file with comments | « src/hydrogen.cc ('k') | test/mjsunit/regress/regress-crbug-381534.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698