Chromium Code Reviews| Index: src/hydrogen-instructions.cc |
| diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
| index d69e613605feba5a9ac863aaf3cefeb319dcaf41..359ebb9b1a37fd3aa44408409d6bc9d8c7729de9 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(" !"); |
|
titzer
2013/09/19 16:24:27
maybe [can-overflow] instead of a cryptic bang.
oliv
2013/09/19 16:38:00
Well this is kind of our canonical format, binary
Sven Panne
2013/09/20 06:36:30
Do *not* change this, even if it is cryptic, it mi
|
| + if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); |
|
titzer
2013/09/19 16:24:27
and something here.
|
| } |