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

Unified Diff: src/hydrogen-instructions.cc

Issue 23075003: Fix bug in HPhi::SimplifyConstantInput (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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') | test/mjsunit/regress/regress-phi-truncation.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 f74d3a31964da49f36e264134876750a46918f1e..225b080d6e49150e272eddebcafb8e000697461f 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -3731,10 +3731,10 @@ void HPhi::SimplifyConstantInputs() {
DoubleToInt32(operand->DoubleValue()));
integer_input->InsertAfter(operand);
SetOperandAt(i, integer_input);
- } else if (operand == graph->GetConstantTrue()) {
- SetOperandAt(i, graph->GetConstant1());
- } else {
- // This catches |false|, |undefined|, strings and objects.
+ } else if (operand->HasBooleanValue()) {
+ SetOperandAt(i, operand->BooleanValue() ? graph->GetConstant1()
+ : graph->GetConstant0());
+ } else if (operand->ImmortalImmovable()) {
SetOperandAt(i, graph->GetConstant0());
}
}
« no previous file with comments | « src/hydrogen-instructions.h ('k') | test/mjsunit/regress/regress-phi-truncation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698