Index: src/interpreter/bytecode-peephole-optimizer.cc |
diff --git a/src/interpreter/bytecode-peephole-optimizer.cc b/src/interpreter/bytecode-peephole-optimizer.cc |
index 4e9d27fcbfbdc6117e4d1afe22e2b5dcf178a867..24912a5ce8ed54ba67a551139b9bf60e7ae3eb7f 100644 |
--- a/src/interpreter/bytecode-peephole-optimizer.cc |
+++ b/src/interpreter/bytecode-peephole-optimizer.cc |
@@ -329,12 +329,11 @@ void BytecodePeepholeOptimizer::ElideLastBeforeJumpAction( |
BytecodeNode* const node, const PeepholeActionAndData* action_data) { |
DCHECK(LastIsValid()); |
DCHECK(Bytecodes::IsJump(node->bytecode())); |
- DCHECK(CanElideLastBasedOnSourcePosition(node)); |
- if (!node->source_info().is_valid()) { |
- node->source_info().Clone(last()->source_info()); |
- } else { |
+ if (!CanElideLastBasedOnSourcePosition(node)) { |
next_stage()->Write(last()); |
+ } else if (!node->source_info().is_valid()) { |
+ node->source_info().Clone(last()->source_info()); |
} |
InvalidateLast(); |
} |