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

Unified Diff: src/compiler/control-builders.cc

Issue 850803002: First simple implementation of for-of in TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/compiler/control-builders.cc
diff --git a/src/compiler/control-builders.cc b/src/compiler/control-builders.cc
index 2978d8b6484a0fd2f0709b971db14cb3e9b2fc52..6cf2905e613e3e6b4837a262cbe1c3588906d606 100644
--- a/src/compiler/control-builders.cc
+++ b/src/compiler/control-builders.cc
@@ -73,6 +73,16 @@ void LoopBuilder::BreakUnless(Node* condition) {
}
+void LoopBuilder::BreakWhen(Node* condition) {
+ IfBuilder control_if(builder_);
+ control_if.If(condition);
+ control_if.Then();
+ Break();
+ control_if.Else();
+ control_if.End();
+}
+
+
void SwitchBuilder::BeginSwitch() {
body_environment_ = environment()->CopyAsUnreachable();
label_environment_ = environment()->CopyAsUnreachable();

Powered by Google App Engine
This is Rietveld 408576698