Index: src/interpreter/bytecode-register-optimizer.cc |
diff --git a/src/interpreter/bytecode-register-optimizer.cc b/src/interpreter/bytecode-register-optimizer.cc |
index a30cb26f434ff361b98ea5512810a2facb62f920..ab25f959e48564d823c36161256cb71e70c62b34 100644 |
--- a/src/interpreter/bytecode-register-optimizer.cc |
+++ b/src/interpreter/bytecode-register-optimizer.cc |
@@ -312,7 +312,9 @@ void BytecodeRegisterOptimizer::WriteToNextStage(BytecodeNode* node) const { |
void BytecodeRegisterOptimizer::WriteToNextStage( |
BytecodeNode* node, const BytecodeSourceInfo& source_info) const { |
- node->source_info().Update(source_info); |
+ if (source_info.is_valid()) { |
+ node->source_info().Clone(source_info); |
+ } |
next_stage_->Write(node); |
} |
@@ -414,8 +416,9 @@ void BytecodeRegisterOptimizer::RegisterTransfer( |
void BytecodeRegisterOptimizer::EmitNopForSourceInfo( |
const BytecodeSourceInfo& source_info) const { |
+ DCHECK(source_info.is_valid()); |
BytecodeNode nop(Bytecode::kNop); |
- nop.source_info().Update(source_info); |
+ nop.source_info().Clone(source_info); |
WriteToNextStage(&nop); |
} |