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/ast.h" | 8 #include "src/ast.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/liveness-analyzer.h" | 10 #include "src/compiler/liveness-analyzer.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 class ContextScope; | 63 class ContextScope; |
64 class ControlScope; | 64 class ControlScope; |
65 class ControlScopeForBreakable; | 65 class ControlScopeForBreakable; |
66 class ControlScopeForIteration; | 66 class ControlScopeForIteration; |
67 class ControlScopeForCatch; | 67 class ControlScopeForCatch; |
68 class ControlScopeForFinally; | 68 class ControlScopeForFinally; |
69 class Environment; | 69 class Environment; |
70 class FrameStateBeforeAndAfter; | 70 class FrameStateBeforeAndAfter; |
71 friend class ControlBuilder; | 71 friend class ControlBuilder; |
72 | 72 |
| 73 Isolate* isolate_; |
73 Zone* local_zone_; | 74 Zone* local_zone_; |
74 CompilationInfo* info_; | 75 CompilationInfo* info_; |
75 JSGraph* jsgraph_; | 76 JSGraph* jsgraph_; |
76 Environment* environment_; | 77 Environment* environment_; |
77 AstContext* ast_context_; | 78 AstContext* ast_context_; |
78 | 79 |
79 // List of global declarations for functions and variables. | 80 // List of global declarations for functions and variables. |
80 ZoneVector<Handle<Object>> globals_; | 81 ZoneVector<Handle<Object>> globals_; |
81 | 82 |
82 // Stack of control scopes currently entered by the visitor. | 83 // Stack of control scopes currently entered by the visitor. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // new nodes. | 123 // new nodes. |
123 static const int kInputBufferSizeIncrement = 64; | 124 static const int kInputBufferSizeIncrement = 64; |
124 | 125 |
125 Zone* local_zone() const { return local_zone_; } | 126 Zone* local_zone() const { return local_zone_; } |
126 Environment* environment() const { return environment_; } | 127 Environment* environment() const { return environment_; } |
127 AstContext* ast_context() const { return ast_context_; } | 128 AstContext* ast_context() const { return ast_context_; } |
128 ControlScope* execution_control() const { return execution_control_; } | 129 ControlScope* execution_control() const { return execution_control_; } |
129 ContextScope* execution_context() const { return execution_context_; } | 130 ContextScope* execution_context() const { return execution_context_; } |
130 CommonOperatorBuilder* common() const { return jsgraph_->common(); } | 131 CommonOperatorBuilder* common() const { return jsgraph_->common(); } |
131 CompilationInfo* info() const { return info_; } | 132 CompilationInfo* info() const { return info_; } |
132 Isolate* isolate() const; | 133 Isolate* isolate() const { return isolate_; } |
133 LanguageMode language_mode() const; | 134 LanguageMode language_mode() const; |
134 JSGraph* jsgraph() { return jsgraph_; } | 135 JSGraph* jsgraph() { return jsgraph_; } |
135 Graph* graph() { return jsgraph_->graph(); } | 136 Graph* graph() { return jsgraph_->graph(); } |
136 Zone* graph_zone() { return graph()->zone(); } | 137 Zone* graph_zone() { return graph()->zone(); } |
137 JSOperatorBuilder* javascript() { return jsgraph_->javascript(); } | 138 JSOperatorBuilder* javascript() { return jsgraph_->javascript(); } |
138 ZoneVector<Handle<Object>>* globals() { return &globals_; } | 139 ZoneVector<Handle<Object>>* globals() { return &globals_; } |
139 Scope* current_scope() const; | 140 Scope* current_scope() const; |
140 Node* current_context() const; | 141 Node* current_context() const; |
141 LivenessAnalyzer* liveness_analyzer() { return &liveness_analyzer_; } | 142 LivenessAnalyzer* liveness_analyzer() { return &liveness_analyzer_; } |
142 const FrameStateFunctionInfo* frame_state_function_info() const { | 143 const FrameStateFunctionInfo* frame_state_function_info() const { |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 | 560 |
560 // Prepare environment to be used as loop header. | 561 // Prepare environment to be used as loop header. |
561 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 562 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
562 }; | 563 }; |
563 | 564 |
564 } // namespace compiler | 565 } // namespace compiler |
565 } // namespace internal | 566 } // namespace internal |
566 } // namespace v8 | 567 } // namespace v8 |
567 | 568 |
568 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 569 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
OLD | NEW |