Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: src/compiler/ast-graph-builder.h

Issue 1191243003: [turbofan] Factor out the function specific part from the frame state operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Result of loop assignment analysis performed before graph creation. 104 // Result of loop assignment analysis performed before graph creation.
105 LoopAssignmentAnalysis* loop_assignment_analysis_; 105 LoopAssignmentAnalysis* loop_assignment_analysis_;
106 106
107 // Cache for StateValues nodes for frame states. 107 // Cache for StateValues nodes for frame states.
108 StateValuesCache state_values_cache_; 108 StateValuesCache state_values_cache_;
109 109
110 // Analyzer of local variable liveness. 110 // Analyzer of local variable liveness.
111 LivenessAnalyzer liveness_analyzer_; 111 LivenessAnalyzer liveness_analyzer_;
112 112
113 // Function info for frame state construction.
114 const FrameStateFunctionInfo* const frame_state_function_info_;
115
113 // Type feedback table. 116 // Type feedback table.
114 JSTypeFeedbackTable* js_type_feedback_; 117 JSTypeFeedbackTable* js_type_feedback_;
115 118
116 // Growth increment for the temporary buffer used to construct input lists to 119 // Growth increment for the temporary buffer used to construct input lists to
117 // new nodes. 120 // new nodes.
118 static const int kInputBufferSizeIncrement = 64; 121 static const int kInputBufferSizeIncrement = 64;
119 122
120 Zone* local_zone() const { return local_zone_; } 123 Zone* local_zone() const { return local_zone_; }
121 Environment* environment() const { return environment_; } 124 Environment* environment() const { return environment_; }
122 AstContext* ast_context() const { return ast_context_; } 125 AstContext* ast_context() const { return ast_context_; }
123 ControlScope* execution_control() const { return execution_control_; } 126 ControlScope* execution_control() const { return execution_control_; }
124 ContextScope* execution_context() const { return execution_context_; } 127 ContextScope* execution_context() const { return execution_context_; }
125 CommonOperatorBuilder* common() const { return jsgraph_->common(); } 128 CommonOperatorBuilder* common() const { return jsgraph_->common(); }
126 CompilationInfo* info() const { return info_; } 129 CompilationInfo* info() const { return info_; }
127 LanguageMode language_mode() const; 130 LanguageMode language_mode() const;
128 JSGraph* jsgraph() { return jsgraph_; } 131 JSGraph* jsgraph() { return jsgraph_; }
129 Graph* graph() { return jsgraph_->graph(); } 132 Graph* graph() { return jsgraph_->graph(); }
130 Zone* graph_zone() { return graph()->zone(); } 133 Zone* graph_zone() { return graph()->zone(); }
131 JSOperatorBuilder* javascript() { return jsgraph_->javascript(); } 134 JSOperatorBuilder* javascript() { return jsgraph_->javascript(); }
132 ZoneVector<Handle<Object>>* globals() { return &globals_; } 135 ZoneVector<Handle<Object>>* globals() { return &globals_; }
133 Scope* current_scope() const; 136 Scope* current_scope() const;
134 Node* current_context() const; 137 Node* current_context() const;
135 LivenessAnalyzer* liveness_analyzer() { return &liveness_analyzer_; } 138 LivenessAnalyzer* liveness_analyzer() { return &liveness_analyzer_; }
139 const FrameStateFunctionInfo* frame_state_function_info() const {
140 return frame_state_function_info_;
141 }
136 142
137 void set_environment(Environment* env) { environment_ = env; } 143 void set_environment(Environment* env) { environment_ = env; }
138 void set_ast_context(AstContext* ctx) { ast_context_ = ctx; } 144 void set_ast_context(AstContext* ctx) { ast_context_ = ctx; }
139 void set_execution_control(ControlScope* ctrl) { execution_control_ = ctrl; } 145 void set_execution_control(ControlScope* ctrl) { execution_control_ = ctrl; }
140 void set_execution_context(ContextScope* ctx) { execution_context_ = ctx; } 146 void set_execution_context(ContextScope* ctx) { execution_context_ = ctx; }
141 147
142 // Create the main graph body by visiting the AST. 148 // Create the main graph body by visiting the AST.
143 void CreateGraphBody(bool stack_check); 149 void CreateGraphBody(bool stack_check);
144 150
145 // Create the node that represents the outer context of the function. 151 // Create the node that represents the outer context of the function.
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 546
541 // Prepare environment to be used as loop header. 547 // Prepare environment to be used as loop header.
542 void PrepareForLoop(BitVector* assigned, bool is_osr = false); 548 void PrepareForLoop(BitVector* assigned, bool is_osr = false);
543 }; 549 };
544 550
545 } // namespace compiler 551 } // namespace compiler
546 } // namespace internal 552 } // namespace internal
547 } // namespace v8 553 } // namespace v8
548 554
549 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ 555 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698