| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 explicit BlockBuilder(AstGraphBuilder* builder) | 124 explicit BlockBuilder(AstGraphBuilder* builder) |
| 125 : ControlBuilder(builder), break_environment_(NULL) {} | 125 : ControlBuilder(builder), break_environment_(NULL) {} |
| 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. |
| 135 void BreakWhen(Node* condition, BranchHint = BranchHint::kNone); |
| 136 |
| 134 private: | 137 private: |
| 135 Environment* break_environment_; // Environment after the block exits. | 138 Environment* break_environment_; // Environment after the block exits. |
| 136 }; | 139 }; |
| 137 | 140 |
| 138 | 141 |
| 139 // Tracks control flow for a try-catch statement. | 142 // Tracks control flow for a try-catch statement. |
| 140 class TryCatchBuilder final : public ControlBuilder { | 143 class TryCatchBuilder final : public ControlBuilder { |
| 141 public: | 144 public: |
| 142 explicit TryCatchBuilder(AstGraphBuilder* builder) | 145 explicit TryCatchBuilder(AstGraphBuilder* builder) |
| 143 : ControlBuilder(builder), | 146 : ControlBuilder(builder), |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 Environment* finally_environment_; // Environment for the 'finally' body. | 189 Environment* finally_environment_; // Environment for the 'finally' body. |
| 187 Node* token_node_; // Node for token in 'finally' body. | 190 Node* token_node_; // Node for token in 'finally' body. |
| 188 Node* value_node_; // Node for value in 'finally' body. | 191 Node* value_node_; // Node for value in 'finally' body. |
| 189 }; | 192 }; |
| 190 | 193 |
| 191 } // namespace compiler | 194 } // namespace compiler |
| 192 } // namespace internal | 195 } // namespace internal |
| 193 } // namespace v8 | 196 } // namespace v8 |
| 194 | 197 |
| 195 #endif // V8_COMPILER_CONTROL_BUILDERS_H_ | 198 #endif // V8_COMPILER_CONTROL_BUILDERS_H_ |
| OLD | NEW |