| 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/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/compiler/graph-builder.h" | 10 #include "src/compiler/graph-builder.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // Tracks control flow for an iteration statement. | 63 // Tracks control flow for an iteration statement. |
| 64 class LoopBuilder : public ControlBuilder { | 64 class LoopBuilder : public ControlBuilder { |
| 65 public: | 65 public: |
| 66 explicit LoopBuilder(StructuredGraphBuilder* builder) | 66 explicit LoopBuilder(StructuredGraphBuilder* builder) |
| 67 : ControlBuilder(builder), | 67 : ControlBuilder(builder), |
| 68 loop_environment_(NULL), | 68 loop_environment_(NULL), |
| 69 continue_environment_(NULL), | 69 continue_environment_(NULL), |
| 70 break_environment_(NULL) {} | 70 break_environment_(NULL) {} |
| 71 | 71 |
| 72 // Primitive control commands. | 72 // Primitive control commands. |
| 73 void BeginLoop(); | 73 void BeginLoop(BitVector* assigned); |
| 74 void EndBody(); | 74 void EndBody(); |
| 75 void EndLoop(); | 75 void EndLoop(); |
| 76 | 76 |
| 77 // Primitive support for break and continue. | 77 // Primitive support for break and continue. |
| 78 virtual void Continue(); | 78 virtual void Continue(); |
| 79 virtual void Break(); | 79 virtual void Break(); |
| 80 | 80 |
| 81 // Compound control command for conditional break. | 81 // Compound control command for conditional break. |
| 82 void BreakUnless(Node* condition); | 82 void BreakUnless(Node* condition); |
| 83 | 83 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 virtual void Break(); | 135 virtual void Break(); |
| 136 | 136 |
| 137 private: | 137 private: |
| 138 Environment* break_environment_; // Environment after the block exits. | 138 Environment* break_environment_; // Environment after the block exits. |
| 139 }; | 139 }; |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 } // namespace v8::internal::compiler | 142 } // namespace v8::internal::compiler |
| 143 | 143 |
| 144 #endif // V8_COMPILER_CONTROL_BUILDERS_H_ | 144 #endif // V8_COMPILER_CONTROL_BUILDERS_H_ |
| OLD | NEW |