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

Side by Side Diff: src/compiler/control-builders.cc

Issue 1160983004: [turbofan] First step towards sanitizing for-in and making it optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add some comments. Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/compiler/control-builders.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "control-builders.h" 5 #include "control-builders.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 break_environment_ = environment()->CopyAsUnreachable(); 136 break_environment_ = environment()->CopyAsUnreachable();
137 } 137 }
138 138
139 139
140 void BlockBuilder::Break() { 140 void BlockBuilder::Break() {
141 break_environment_->Merge(environment()); 141 break_environment_->Merge(environment());
142 environment()->MarkAsUnreachable(); 142 environment()->MarkAsUnreachable();
143 } 143 }
144 144
145 145
146 void BlockBuilder::BreakWhen(Node* condition, BranchHint hint) {
147 IfBuilder control_if(builder_);
148 control_if.If(condition, hint);
149 control_if.Then();
150 Break();
151 control_if.Else();
152 control_if.End();
153 }
154
155
146 void BlockBuilder::EndBlock() { 156 void BlockBuilder::EndBlock() {
147 break_environment_->Merge(environment()); 157 break_environment_->Merge(environment());
148 set_environment(break_environment_); 158 set_environment(break_environment_);
149 } 159 }
150 160
151 161
152 void TryCatchBuilder::BeginTry() { 162 void TryCatchBuilder::BeginTry() {
153 catch_environment_ = environment()->CopyAsUnreachable(); 163 catch_environment_ = environment()->CopyAsUnreachable();
154 catch_environment_->Push(the_hole()); 164 catch_environment_->Push(the_hole());
155 } 165 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 212 }
203 213
204 214
205 void TryFinallyBuilder::EndFinally() { 215 void TryFinallyBuilder::EndFinally() {
206 // Nothing to be done here. 216 // Nothing to be done here.
207 } 217 }
208 218
209 } // namespace compiler 219 } // namespace compiler
210 } // namespace internal 220 } // namespace internal
211 } // namespace v8 221 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/control-builders.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698