| OLD | NEW |
| 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 |
| 11 | 11 |
| 12 void IfBuilder::If(Node* condition) { | 12 void IfBuilder::If(Node* condition, BranchHint hint) { |
| 13 builder_->NewBranch(condition); | 13 builder_->NewBranch(condition, hint); |
| 14 else_environment_ = environment()->CopyForConditional(); | 14 else_environment_ = environment()->CopyForConditional(); |
| 15 } | 15 } |
| 16 | 16 |
| 17 | 17 |
| 18 void IfBuilder::Then() { builder_->NewIfTrue(); } | 18 void IfBuilder::Then() { builder_->NewIfTrue(); } |
| 19 | 19 |
| 20 | 20 |
| 21 void IfBuilder::Else() { | 21 void IfBuilder::Else() { |
| 22 builder_->NewMerge(); | 22 builder_->NewMerge(); |
| 23 then_environment_ = environment(); | 23 then_environment_ = environment(); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 | 137 |
| 138 void BlockBuilder::EndBlock() { | 138 void BlockBuilder::EndBlock() { |
| 139 break_environment_->Merge(environment()); | 139 break_environment_->Merge(environment()); |
| 140 set_environment(break_environment_); | 140 set_environment(break_environment_); |
| 141 } | 141 } |
| 142 } | 142 } |
| 143 } | 143 } |
| 144 } // namespace v8::internal::compiler | 144 } // namespace v8::internal::compiler |
| OLD | NEW |