| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_FULL_CODEGEN_H_ | 5 #ifndef V8_FULL_CODEGEN_H_ |
| 6 #define V8_FULL_CODEGEN_H_ | 6 #define V8_FULL_CODEGEN_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 // Forward declarations. | 23 // Forward declarations. |
| 24 class JumpPatchSite; | 24 class JumpPatchSite; |
| 25 | 25 |
| 26 // AST node visitor which can tell whether a given statement will be breakable | 26 // AST node visitor which can tell whether a given statement will be breakable |
| 27 // when the code is compiled by the full compiler in the debugger. This means | 27 // when the code is compiled by the full compiler in the debugger. This means |
| 28 // that there will be an IC (load/store/call) in the code generated for the | 28 // that there will be an IC (load/store/call) in the code generated for the |
| 29 // debugger to piggybag on. | 29 // debugger to piggybag on. |
| 30 class BreakableStatementChecker: public AstVisitor { | 30 class BreakableStatementChecker: public AstVisitor { |
| 31 public: | 31 public: |
| 32 explicit BreakableStatementChecker(Zone* zone) : is_breakable_(false) { | 32 BreakableStatementChecker(Isolate* isolate, Zone* zone) |
| 33 InitializeAstVisitor(zone); | 33 : is_breakable_(false) { |
| 34 InitializeAstVisitor(isolate, zone); |
| 34 } | 35 } |
| 35 | 36 |
| 36 void Check(Statement* stmt); | 37 void Check(Statement* stmt); |
| 37 void Check(Expression* stmt); | 38 void Check(Expression* stmt); |
| 38 | 39 |
| 39 bool is_breakable() { return is_breakable_; } | 40 bool is_breakable() { return is_breakable_; } |
| 40 | 41 |
| 41 private: | 42 private: |
| 42 // AST node visit functions. | 43 // AST node visit functions. |
| 43 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) OVERRIDE; | 44 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) OVERRIDE; |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 | 1050 |
| 1050 Address start_; | 1051 Address start_; |
| 1051 Address instruction_start_; | 1052 Address instruction_start_; |
| 1052 uint32_t length_; | 1053 uint32_t length_; |
| 1053 }; | 1054 }; |
| 1054 | 1055 |
| 1055 | 1056 |
| 1056 } } // namespace v8::internal | 1057 } } // namespace v8::internal |
| 1057 | 1058 |
| 1058 #endif // V8_FULL_CODEGEN_H_ | 1059 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |