| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_AST_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/ast.h" | 10 #include "src/ast.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 // Visiting function for declarations list is overridden. | 120 // Visiting function for declarations list is overridden. |
| 121 virtual void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE; | 121 virtual void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE; |
| 122 | 122 |
| 123 private: | 123 private: |
| 124 CompilationInfo* info_; | 124 CompilationInfo* info_; |
| 125 AstContext* ast_context_; | 125 AstContext* ast_context_; |
| 126 JSGraph* jsgraph_; | 126 JSGraph* jsgraph_; |
| 127 | 127 |
| 128 // List of global declarations for functions and variables. | 128 // List of global declarations for functions and variables. |
| 129 ZoneList<Handle<Object> > globals_; | 129 ZoneVector<Handle<Object>> globals_; |
| 130 | 130 |
| 131 // Stack of breakable statements entered by the visitor. | 131 // Stack of breakable statements entered by the visitor. |
| 132 BreakableScope* breakable_; | 132 BreakableScope* breakable_; |
| 133 | 133 |
| 134 // Stack of context objects pushed onto the chain by the visitor. | 134 // Stack of context objects pushed onto the chain by the visitor. |
| 135 ContextScope* execution_context_; | 135 ContextScope* execution_context_; |
| 136 | 136 |
| 137 // Nodes representing values in the activation record. | 137 // Nodes representing values in the activation record. |
| 138 SetOncePointer<Node> function_closure_; | 138 SetOncePointer<Node> function_closure_; |
| 139 SetOncePointer<Node> function_context_; | 139 SetOncePointer<Node> function_context_; |
| 140 | 140 |
| 141 // Result of loop assignment analysis performed before graph creation. | 141 // Result of loop assignment analysis performed before graph creation. |
| 142 LoopAssignmentAnalysis* loop_assignment_analysis_; | 142 LoopAssignmentAnalysis* loop_assignment_analysis_; |
| 143 | 143 |
| 144 CompilationInfo* info() const { return info_; } | 144 CompilationInfo* info() const { return info_; } |
| 145 inline StrictMode strict_mode() const; | 145 inline StrictMode strict_mode() const; |
| 146 JSGraph* jsgraph() { return jsgraph_; } | 146 JSGraph* jsgraph() { return jsgraph_; } |
| 147 JSOperatorBuilder* javascript() { return jsgraph_->javascript(); } | 147 JSOperatorBuilder* javascript() { return jsgraph_->javascript(); } |
| 148 ZoneList<Handle<Object> >* globals() { return &globals_; } | 148 ZoneVector<Handle<Object>>* globals() { return &globals_; } |
| 149 | 149 |
| 150 // Current scope during visitation. | 150 // Current scope during visitation. |
| 151 inline Scope* current_scope() const; | 151 inline Scope* current_scope() const; |
| 152 | 152 |
| 153 // Named and keyed loads require a VectorSlotPair for successful lowering. | 153 // Named and keyed loads require a VectorSlotPair for successful lowering. |
| 154 VectorSlotPair CreateVectorSlotPair(FeedbackVectorICSlot slot) const; | 154 VectorSlotPair CreateVectorSlotPair(FeedbackVectorICSlot slot) const; |
| 155 | 155 |
| 156 // Process arguments to a call by popping {arity} elements off the operand | 156 // Process arguments to a call by popping {arity} elements off the operand |
| 157 // stack and build a call node using the given call operator. | 157 // stack and build a call node using the given call operator. |
| 158 Node* ProcessArguments(const Operator* op, int arity); | 158 Node* ProcessArguments(const Operator* op, int arity); |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 440 |
| 441 Scope* AstGraphBuilder::current_scope() const { | 441 Scope* AstGraphBuilder::current_scope() const { |
| 442 return execution_context_->scope(); | 442 return execution_context_->scope(); |
| 443 } | 443 } |
| 444 | 444 |
| 445 } // namespace compiler | 445 } // namespace compiler |
| 446 } // namespace internal | 446 } // namespace internal |
| 447 } // namespace v8 | 447 } // namespace v8 |
| 448 | 448 |
| 449 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 449 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| OLD | NEW |