Chromium Code Reviews

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

Issue 2038323002: [interpreter] Filter expression positions at source. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@oth-0060-source-position-testing
Patch Set: Incorporate comments. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/interpreter/bytecode-peephole-optimizer.cc
diff --git a/src/interpreter/bytecode-peephole-optimizer.cc b/src/interpreter/bytecode-peephole-optimizer.cc
index 881abf337b25a57d0961d7827f99232a922b6bd2..a16076407e92a3aa034b9d7b6530124e0f132c77 100644
--- a/src/interpreter/bytecode-peephole-optimizer.cc
+++ b/src/interpreter/bytecode-peephole-optimizer.cc
@@ -96,7 +96,7 @@ bool BytecodePeepholeOptimizer::LastBytecodePutsNameInAccumulator() const {
void BytecodePeepholeOptimizer::TryToRemoveLastExpressionPosition(
const BytecodeNode* const current) {
- if (current->source_info().is_statement() &&
+ if (current->source_info().is_valid() &&
last_.source_info().is_expression() &&
Bytecodes::IsWithoutExternalSideEffects(last_.bytecode())) {
// The last bytecode has been marked as expression. It has no

Powered by Google App Engine