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

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

Issue 1998203002: [Interpreter] Preserve source positions in peephole optimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Simplify condition. Created 4 years, 7 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 | « no previous file | src/interpreter/bytecode-pipeline.cc » ('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 803fc23089927faf47fe893deb178dd479265d6f..fa5916aabe2caa6a943d5ac6f0fed39e8ce9bbdc 100644
--- a/src/interpreter/bytecode-peephole-optimizer.cc
+++ b/src/interpreter/bytecode-peephole-optimizer.cc
@@ -164,10 +164,11 @@ BytecodeNode* BytecodePeepholeOptimizer::Optimize(BytecodeNode* current) {
} else {
current = nullptr;
}
- } else if (CanElideLast(current)) {
- if (last_.source_info().is_valid()) {
- current->source_info().Update(last_.source_info());
- }
+ } else if (CanElideLast(current) &&
+ ((last_.source_info().is_valid() !=
+ current->source_info().is_valid()) ||
+ (last_.source_info() == current->source_info()))) {
rmcilroy 2016/05/20 16:31:13 nit - could we just move the source position check
oth 2016/05/21 12:40:10 Done.
+ current->source_info().Update(last_.source_info());
InvalidateLast();
}
return current;
« no previous file with comments | « no previous file | src/interpreter/bytecode-pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698