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

Unified Diff: src/hydrogen-instructions.cc

Issue 6255013: Change the default implementation of DataEquals for Hydrogen instructions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added verification to HInstruction::Verify. Created 9 years, 11 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: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index d1a4782a011ef4245c92a64012dae493015879d0..f89665ef00226f20314232a0d1685d8e09002c8f 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -490,7 +490,7 @@ void HInstruction::InsertAfter(HInstruction* previous) {
#ifdef DEBUG
-void HInstruction::Verify() const {
+void HInstruction::Verify() {
// Verify that input operands are defined before use.
HBasicBlock* cur_block = block();
for (int i = 0; i < OperandCount(); ++i) {
@@ -517,6 +517,11 @@ void HInstruction::Verify() const {
if (HasSideEffects() && !IsOsrEntry()) {
ASSERT(next()->IsSimulate());
}
+
+ // Verify that instructions that can be eliminated by GVN have overridden
+ // HValue::DataEquals. The default implementation is UNREACHABLE. We
+ // don't actually care whether DataEquals returns true or false here.
+ if (CheckFlag(kUseGVN)) DataEquals(this);
}
#endif
@@ -1388,7 +1393,7 @@ HValue* HAdd::EnsureAndPropagateNotMinusZero(BitVector* visited) {
// Node-specific verification code is only included in debug mode.
#ifdef DEBUG
-void HPhi::Verify() const {
+void HPhi::Verify() {
ASSERT(OperandCount() == block()->predecessors()->length());
for (int i = 0; i < OperandCount(); ++i) {
HValue* value = OperandAt(i);
@@ -1400,49 +1405,49 @@ void HPhi::Verify() const {
}
-void HSimulate::Verify() const {
+void HSimulate::Verify() {
HInstruction::Verify();
ASSERT(HasAstId());
}
-void HBoundsCheck::Verify() const {
+void HBoundsCheck::Verify() {
HInstruction::Verify();
ASSERT(HasNoUses());
}
-void HCheckSmi::Verify() const {
+void HCheckSmi::Verify() {
HInstruction::Verify();
ASSERT(HasNoUses());
}
-void HCheckNonSmi::Verify() const {
+void HCheckNonSmi::Verify() {
HInstruction::Verify();
ASSERT(HasNoUses());
}
-void HCheckInstanceType::Verify() const {
+void HCheckInstanceType::Verify() {
HInstruction::Verify();
ASSERT(HasNoUses());
}
-void HCheckMap::Verify() const {
+void HCheckMap::Verify() {
HInstruction::Verify();
ASSERT(HasNoUses());
}
-void HCheckFunction::Verify() const {
+void HCheckFunction::Verify() {
HInstruction::Verify();
ASSERT(HasNoUses());
}
-void HCheckPrototypeMaps::Verify() const {
+void HCheckPrototypeMaps::Verify() {
HInstruction::Verify();
ASSERT(HasNoUses());
}
« 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