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 23 matching lines...) Expand all Loading... |
34 InitializeAstVisitor(isolate, zone); | 34 InitializeAstVisitor(isolate, zone); |
35 } | 35 } |
36 | 36 |
37 void Check(Statement* stmt); | 37 void Check(Statement* stmt); |
38 void Check(Expression* stmt); | 38 void Check(Expression* stmt); |
39 | 39 |
40 bool is_breakable() { return is_breakable_; } | 40 bool is_breakable() { return is_breakable_; } |
41 | 41 |
42 private: | 42 private: |
43 // AST node visit functions. | 43 // AST node visit functions. |
44 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) OVERRIDE; | 44 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) override; |
45 AST_NODE_LIST(DECLARE_VISIT) | 45 AST_NODE_LIST(DECLARE_VISIT) |
46 #undef DECLARE_VISIT | 46 #undef DECLARE_VISIT |
47 | 47 |
48 bool is_breakable_; | 48 bool is_breakable_; |
49 | 49 |
50 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 50 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
51 DISALLOW_COPY_AND_ASSIGN(BreakableStatementChecker); | 51 DISALLOW_COPY_AND_ASSIGN(BreakableStatementChecker); |
52 }; | 52 }; |
53 | 53 |
54 | 54 |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 Label* fall_through) { | 409 Label* fall_through) { |
410 TestContext context(this, expr, if_true, if_false, fall_through); | 410 TestContext context(this, expr, if_true, if_false, fall_through); |
411 Visit(expr); | 411 Visit(expr); |
412 // For test contexts, we prepare for bailout before branching, not at | 412 // For test contexts, we prepare for bailout before branching, not at |
413 // the end of the entire expression. This happens as part of visiting | 413 // the end of the entire expression. This happens as part of visiting |
414 // the expression. | 414 // the expression. |
415 } | 415 } |
416 | 416 |
417 void VisitInDuplicateContext(Expression* expr); | 417 void VisitInDuplicateContext(Expression* expr); |
418 | 418 |
419 void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE; | 419 void VisitDeclarations(ZoneList<Declaration*>* declarations) override; |
420 void DeclareModules(Handle<FixedArray> descriptions); | 420 void DeclareModules(Handle<FixedArray> descriptions); |
421 void DeclareGlobals(Handle<FixedArray> pairs); | 421 void DeclareGlobals(Handle<FixedArray> pairs); |
422 int DeclareGlobalsFlags(); | 422 int DeclareGlobalsFlags(); |
423 | 423 |
424 // Generate code to allocate all (including nested) modules and contexts. | 424 // Generate code to allocate all (including nested) modules and contexts. |
425 // Because of recursive linking and the presence of module alias declarations, | 425 // Because of recursive linking and the presence of module alias declarations, |
426 // this has to be a separate pass _before_ populating or executing any module. | 426 // this has to be a separate pass _before_ populating or executing any module. |
427 void AllocateModules(ZoneList<Declaration*>* declarations); | 427 void AllocateModules(ZoneList<Declaration*>* declarations); |
428 | 428 |
429 // Generate code to create an iterator result object. The "value" property is | 429 // Generate code to create an iterator result object. The "value" property is |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 | 744 |
745 // Load a value from the current context. Indices are defined as an enum | 745 // Load a value from the current context. Indices are defined as an enum |
746 // in v8::internal::Context. | 746 // in v8::internal::Context. |
747 void LoadContextField(Register dst, int context_index); | 747 void LoadContextField(Register dst, int context_index); |
748 | 748 |
749 // Push the function argument for the runtime functions PushWithContext | 749 // Push the function argument for the runtime functions PushWithContext |
750 // and PushCatchContext. | 750 // and PushCatchContext. |
751 void PushFunctionArgumentForContextAllocation(); | 751 void PushFunctionArgumentForContextAllocation(); |
752 | 752 |
753 // AST node visit functions. | 753 // AST node visit functions. |
754 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) OVERRIDE; | 754 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) override; |
755 AST_NODE_LIST(DECLARE_VISIT) | 755 AST_NODE_LIST(DECLARE_VISIT) |
756 #undef DECLARE_VISIT | 756 #undef DECLARE_VISIT |
757 | 757 |
758 void VisitComma(BinaryOperation* expr); | 758 void VisitComma(BinaryOperation* expr); |
759 void VisitLogicalExpression(BinaryOperation* expr); | 759 void VisitLogicalExpression(BinaryOperation* expr); |
760 void VisitArithmeticExpression(BinaryOperation* expr); | 760 void VisitArithmeticExpression(BinaryOperation* expr); |
761 | 761 |
762 void VisitForTypeofValue(Expression* expr); | 762 void VisitForTypeofValue(Expression* expr); |
763 | 763 |
764 void Generate(); | 764 void Generate(); |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 | 1098 |
1099 Address start_; | 1099 Address start_; |
1100 Address instruction_start_; | 1100 Address instruction_start_; |
1101 uint32_t length_; | 1101 uint32_t length_; |
1102 }; | 1102 }; |
1103 | 1103 |
1104 | 1104 |
1105 } } // namespace v8::internal | 1105 } } // namespace v8::internal |
1106 | 1106 |
1107 #endif // V8_FULL_CODEGEN_H_ | 1107 #endif // V8_FULL_CODEGEN_H_ |
OLD | NEW |