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

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

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.cc
diff --git a/src/interpreter/control-flow-builders.cc b/src/interpreter/control-flow-builders.cc
index 6c634bbe841d277566cf29884f35c7ab078d878d..3d9b1c14f4912e25b5dc26d5de9ba3cb8b23404b 100644
--- a/src/interpreter/control-flow-builders.cc
+++ b/src/interpreter/control-flow-builders.cc
@@ -31,6 +31,24 @@ void LoopBuilder::EmitJump(ZoneVector<BytecodeLabel>* sites) {
}
+void LoopBuilder::EmitJumpIfTrue(ZoneVector<BytecodeLabel>* sites) {
+ sites->push_back(BytecodeLabel());
+ builder()->JumpIfTrue(&sites->back());
+}
+
+
+void LoopBuilder::EmitJumpIfUndefined(ZoneVector<BytecodeLabel>* sites) {
+ sites->push_back(BytecodeLabel());
+ builder()->JumpIfUndefined(&sites->back());
+}
+
+
+void LoopBuilder::EmitJumpIfNull(ZoneVector<BytecodeLabel>* sites) {
+ sites->push_back(BytecodeLabel());
+ builder()->JumpIfNull(&sites->back());
+}
+
+
void LoopBuilder::BindLabels(const BytecodeLabel& target,
ZoneVector<BytecodeLabel>* sites) {
for (size_t i = 0; i < sites->size(); i++) {

Powered by Google App Engine
This is Rietveld 408576698