| 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 14 matching lines...) Expand all Loading... |
| 25 virtual ~ControlBuilder() {} | 25 virtual ~ControlBuilder() {} |
| 26 | 26 |
| 27 // Interface for break and continue. | 27 // Interface for break and continue. |
| 28 virtual void Break() { UNREACHABLE(); } | 28 virtual void Break() { UNREACHABLE(); } |
| 29 virtual void Continue() { UNREACHABLE(); } | 29 virtual void Continue() { UNREACHABLE(); } |
| 30 | 30 |
| 31 protected: | 31 protected: |
| 32 typedef StructuredGraphBuilder Builder; | 32 typedef StructuredGraphBuilder Builder; |
| 33 typedef StructuredGraphBuilder::Environment Environment; | 33 typedef StructuredGraphBuilder::Environment Environment; |
| 34 | 34 |
| 35 Zone* zone() const { return builder_->zone(); } | 35 Zone* zone() const { return builder_->local_zone(); } |
| 36 Environment* environment() { return builder_->environment(); } | 36 Environment* environment() { return builder_->environment(); } |
| 37 void set_environment(Environment* env) { builder_->set_environment(env); } | 37 void set_environment(Environment* env) { builder_->set_environment(env); } |
| 38 | 38 |
| 39 Builder* builder_; | 39 Builder* builder_; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 | 42 |
| 43 // Tracks control flow for a conditional statement. | 43 // Tracks control flow for a conditional statement. |
| 44 class IfBuilder : public ControlBuilder { | 44 class IfBuilder : public ControlBuilder { |
| 45 public: | 45 public: |
| (...skipping 89 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 |