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

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

Issue 1422033002: [Interpreter] Add support for for..in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment nits. Created 5 years, 2 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.h
diff --git a/src/interpreter/control-flow-builders.h b/src/interpreter/control-flow-builders.h
index c92fab20991511b90c0596e8fa6bd8db830a2e32..3ef800c1cfe78a195f1d88b62f5e512f8ec86c54 100644
--- a/src/interpreter/control-flow-builders.h
+++ b/src/interpreter/control-flow-builders.h
@@ -49,11 +49,20 @@ class LoopBuilder : public ControlFlowBuilder {
// patched when the corresponding SetContinueTarget/SetBreakTarget
// is called.
void Break() { EmitJump(&break_sites_); }
+ void BreakIfTrue() { EmitJumpIfTrue(&break_sites_); }
+ void BreakIfUndefined() { EmitJumpIfUndefined(&break_sites_); }
+ void BreakIfNull() { EmitJumpIfNull(&break_sites_); }
void Continue() { EmitJump(&continue_sites_); }
+ void ContinueIfTrue() { EmitJumpIfTrue(&continue_sites_); }
+ void ContinueIfUndefined() { EmitJumpIfUndefined(&continue_sites_); }
+ void ContinueIfNull() { EmitJumpIfNull(&continue_sites_); }
private:
void BindLabels(const BytecodeLabel& target, ZoneVector<BytecodeLabel>* site);
void EmitJump(ZoneVector<BytecodeLabel>* labels);
+ void EmitJumpIfTrue(ZoneVector<BytecodeLabel>* labels);
+ void EmitJumpIfUndefined(ZoneVector<BytecodeLabel>* labels);
+ void EmitJumpIfNull(ZoneVector<BytecodeLabel>* labels);
// Unbound labels that identify jumps for continue/break statements
// in the code.

Powered by Google App Engine
This is Rietveld 408576698