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

Unified Diff: src/interpreter/control-flow-builders.cc

Issue 1943383003: [interpreter] Always 'continue' loops by jumping forward to end of body. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
Index: src/interpreter/control-flow-builders.cc
diff --git a/src/interpreter/control-flow-builders.cc b/src/interpreter/control-flow-builders.cc
index fd581993e157aab08dbd36cbd931203588649cf2..66d650c3b8893be09f2a93c6987de102e16fb9aa 100644
--- a/src/interpreter/control-flow-builders.cc
+++ b/src/interpreter/control-flow-builders.cc
@@ -109,19 +109,11 @@ void LoopBuilder::EndLoop() {
DCHECK(loop_header_.is_bound());
builder()->Bind(&loop_end_);
SetBreakTarget(loop_end_);
- if (next_.is_bound()) {
- DCHECK(!condition_.is_bound() || next_.offset() >= condition_.offset());
- SetContinueTarget(next_);
- } else {
- DCHECK(condition_.is_bound());
- DCHECK_GE(condition_.offset(), loop_header_.offset());
- DCHECK_LE(condition_.offset(), loop_end_.offset());
- SetContinueTarget(condition_);
- }
}
-
-void LoopBuilder::SetContinueTarget(const BytecodeLabel& target) {
+void LoopBuilder::SetContinueTarget() {
+ BytecodeLabel target;
+ builder()->Bind(&target);
BindLabels(target, &continue_sites_);
}
« no previous file with comments | « src/interpreter/control-flow-builders.h ('k') | test/cctest/interpreter/bytecode_expectations/BasicLoops.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698