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 #ifndef V8_COMPILER_CONTROL_BUILDERS_H_ | 5 #ifndef V8_COMPILER_CONTROL_BUILDERS_H_ |
6 #define V8_COMPILER_CONTROL_BUILDERS_H_ | 6 #define V8_COMPILER_CONTROL_BUILDERS_H_ |
7 | 7 |
8 #include "src/compiler/ast-graph-builder.h" | 8 #include "src/compiler/ast-graph-builder.h" |
9 #include "src/compiler/node.h" | 9 #include "src/compiler/node.h" |
10 | 10 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 // Primitive control commands. | 127 // Primitive control commands. |
128 void BeginBlock(); | 128 void BeginBlock(); |
129 void EndBlock(); | 129 void EndBlock(); |
130 | 130 |
131 // Primitive support for break. | 131 // Primitive support for break. |
132 void Break() final; | 132 void Break() final; |
133 | 133 |
134 // Compound control commands for conditional break. | 134 // Compound control commands for conditional break. |
135 void BreakWhen(Node* condition, BranchHint = BranchHint::kNone); | 135 void BreakWhen(Node* condition, BranchHint = BranchHint::kNone); |
| 136 void BreakUnless(Node* condition, BranchHint hint = BranchHint::kNone); |
136 | 137 |
137 private: | 138 private: |
138 Environment* break_environment_; // Environment after the block exits. | 139 Environment* break_environment_; // Environment after the block exits. |
139 }; | 140 }; |
140 | 141 |
141 | 142 |
142 // Tracks control flow for a try-catch statement. | 143 // Tracks control flow for a try-catch statement. |
143 class TryCatchBuilder final : public ControlBuilder { | 144 class TryCatchBuilder final : public ControlBuilder { |
144 public: | 145 public: |
145 explicit TryCatchBuilder(AstGraphBuilder* builder) | 146 explicit TryCatchBuilder(AstGraphBuilder* builder) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 Environment* finally_environment_; // Environment for the 'finally' body. | 190 Environment* finally_environment_; // Environment for the 'finally' body. |
190 Node* token_node_; // Node for token in 'finally' body. | 191 Node* token_node_; // Node for token in 'finally' body. |
191 Node* value_node_; // Node for value in 'finally' body. | 192 Node* value_node_; // Node for value in 'finally' body. |
192 }; | 193 }; |
193 | 194 |
194 } // namespace compiler | 195 } // namespace compiler |
195 } // namespace internal | 196 } // namespace internal |
196 } // namespace v8 | 197 } // namespace v8 |
197 | 198 |
198 #endif // V8_COMPILER_CONTROL_BUILDERS_H_ | 199 #endif // V8_COMPILER_CONTROL_BUILDERS_H_ |
OLD | NEW |