Chromium Code Reviews| 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; |