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

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

Issue 1531693002: [Interpreter] Implement ForIn in bytecode graph builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@oth-0009-phi
Patch Set: Minor clean-up/simplication in Runtime_InterpreterForInPrepare. Created 5 years 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 | « src/interpreter/control-flow-builders.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/control-flow-builders.cc
diff --git a/src/interpreter/control-flow-builders.cc b/src/interpreter/control-flow-builders.cc
index c14a901aa687da42f170ba31ec6072e060618ea9..99066e8c7e96fc3a51696ae754f3b9401ba30c2d 100644
--- a/src/interpreter/control-flow-builders.cc
+++ b/src/interpreter/control-flow-builders.cc
@@ -90,6 +90,16 @@ void BlockBuilder::EndBlock() {
LoopBuilder::~LoopBuilder() { DCHECK(continue_sites_.empty()); }
+void LoopBuilder::LoopHeader() {
+ // Jumps from before the loop header into the loop violate ordering
+ // requirements of bytecode basic blocks. The only entry into a loop
+ // must be the loop header. Surely breaks is okay? Not if nested
+ // and misplaced between the headers.
+ DCHECK(break_sites_.empty() && continue_sites_.empty());
+ builder()->Bind(&loop_header_);
+}
+
+
void LoopBuilder::EndLoop() {
// Loop must have closed form, i.e. all loop elements are within the loop,
// the loop header precedes the body and next elements in the loop.
« no previous file with comments | « src/interpreter/control-flow-builders.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698