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

Unified Diff: src/interpreter/bytecode-register-optimizer.cc

Issue 2048203002: [interpreter] Minor clean-up of BytecodeSourceInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@oth-0066-suppress
Patch Set: Rebase Created 4 years, 6 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/interpreter/bytecode-pipeline.cc ('k') | test/unittests/interpreter/bytecode-array-writer-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/interpreter/bytecode-pipeline.cc ('k') | test/unittests/interpreter/bytecode-array-writer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698