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

Unified Diff: src/hydrogen-instructions.cc

Issue 23710070: Allow control intructions to have side effects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: extend test Created 7 years, 3 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') | src/ia32/lithium-codegen-ia32.cc » ('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 a685198ba6288e54e0913695f6e6f4e5cc797f09..377dbf5c0e81dcc2c8c9738ba5a149c78358ecf4 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -794,7 +794,7 @@ void HInstruction::Verify() {
// Verify that instructions that may have side-effects are followed
// by a simulate instruction.
- if (HasObservableSideEffects() && !IsOsrEntry()) {
+ if (HasObservableSideEffects() && !IsOsrEntry() && !IsControlInstruction()) {
ASSERT(next()->IsSimulate());
}
@@ -1011,6 +1011,21 @@ void HControlInstruction::PrintDataTo(StringStream* stream) {
}
+#ifdef DEBUG
+void HControlInstruction::Verify() {
+ HInstruction::Verify();
+ if (!HasObservableSideEffects()) return;
+ for (HSuccessorIterator it(this); !it.Done(); it.Advance()) {
+ // For ControlInstructions we need to verify that the successors all start
+ // with a Simulate.
+ HInstruction* first = it.Current()->first()->next();
+ ASSERT(first->IsSimulate() ||
+ (first->IsLeaveInlined() && first->next()->IsSimulate()));
+ }
+}
+#endif
+
+
void HUnaryControlInstruction::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream);
HControlInstruction::PrintDataTo(stream);
@@ -2823,10 +2838,14 @@ Range* HLoadKeyed::InferRange(Zone* zone) {
}
-void HCompareGeneric::PrintDataTo(StringStream* stream) {
+void HCompareGenericAndBranch::PrintDataTo(StringStream* stream) {
stream->Add(Token::Name(token()));
stream->Add(" ");
- HBinaryOperation::PrintDataTo(stream);
+ left()->PrintNameTo(stream);
+ stream->Add(" ");
+ right()->PrintNameTo(stream);
+ if (CheckFlag(kCanOverflow)) stream->Add(" !");
+ if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?");
}
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698