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

Unified Diff: src/hydrogen-instructions.cc

Issue 65643003: Regression fix: HForceRepresentation shouldn't be an idef. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 39d59582beec3d1ba57cad734dc5713e5bdda976..f7a9569ed612a6b4c88d5e4b5de820567bc39e80 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -521,12 +521,19 @@ bool HValue::CanReplaceWithDummyUses() {
bool HValue::IsInteger32Constant() {
- return IsConstant() && HConstant::cast(this)->HasInteger32Value();
+ HValue* value_to_check = IsForceRepresentation()
+ ? HForceRepresentation::cast(this)->value()
+ : this;
+ return value_to_check->IsConstant() &&
+ HConstant::cast(value_to_check)->HasInteger32Value();
}
int32_t HValue::GetInteger32Constant() {
- return HConstant::cast(this)->Integer32Value();
+ HValue* constant_value = IsForceRepresentation()
+ ? HForceRepresentation::cast(this)->value()
+ : this;
+ return HConstant::cast(constant_value)->Integer32Value();
}
« 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