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

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

Issue 2185123003: [interpreter] Fix peephole rule on eliding last before jump. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | test/mjsunit/ignition/regress-629792-source-position-on-jump.js » ('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 4e9d27fcbfbdc6117e4d1afe22e2b5dcf178a867..24912a5ce8ed54ba67a551139b9bf60e7ae3eb7f 100644
--- a/src/interpreter/bytecode-peephole-optimizer.cc
+++ b/src/interpreter/bytecode-peephole-optimizer.cc
@@ -329,12 +329,11 @@ void BytecodePeepholeOptimizer::ElideLastBeforeJumpAction(
BytecodeNode* const node, const PeepholeActionAndData* action_data) {
DCHECK(LastIsValid());
DCHECK(Bytecodes::IsJump(node->bytecode()));
- DCHECK(CanElideLastBasedOnSourcePosition(node));
- if (!node->source_info().is_valid()) {
- node->source_info().Clone(last()->source_info());
- } else {
+ if (!CanElideLastBasedOnSourcePosition(node)) {
next_stage()->Write(last());
+ } else if (!node->source_info().is_valid()) {
+ node->source_info().Clone(last()->source_info());
}
InvalidateLast();
}
« no previous file with comments | « no previous file | test/mjsunit/ignition/regress-629792-source-position-on-jump.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698