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

Unified Diff: src/interpreter/bytecode-peephole-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-array-builder.cc ('k') | src/interpreter/bytecode-pipeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-peephole-optimizer.cc
diff --git a/src/interpreter/bytecode-peephole-optimizer.cc b/src/interpreter/bytecode-peephole-optimizer.cc
index 892cf3cbdfdff0fd16befa6d2c05e0846fe69343..1108d8304f855f74dcd5b3f6e2965104f068684c 100644
--- a/src/interpreter/bytecode-peephole-optimizer.cc
+++ b/src/interpreter/bytecode-peephole-optimizer.cc
@@ -297,7 +297,10 @@ BytecodeNode* BytecodePeepholeOptimizer::Optimize(BytecodeNode* current) {
}
if (CanElideLast(current) && CanElideLastBasedOnSourcePosition(current)) {
- current->source_info().Update(last_.source_info());
+ if (last_.source_info().is_valid()) {
+ // Current can not be valid per CanElideLastBasedOnSourcePosition().
+ current->source_info().Clone(last_.source_info());
+ }
InvalidateLast();
return current;
}
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-pipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698