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

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

Issue 809333002: [turbofan] Implement OSR for outer loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « src/compiler/arm64/code-generator-arm64.cc ('k') | 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/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/ast.h" 10 #include "src/ast.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 Node* BuildHoleCheckSilent(Node* value, Node* for_hole, Node* not_hole); 107 Node* BuildHoleCheckSilent(Node* value, Node* for_hole, Node* not_hole);
108 Node* BuildHoleCheckThrow(Node* value, Variable* var, Node* not_hole, 108 Node* BuildHoleCheckThrow(Node* value, Variable* var, Node* not_hole,
109 BailoutId bailout_id); 109 BailoutId bailout_id);
110 110
111 // Builders for binary operations. 111 // Builders for binary operations.
112 Node* BuildBinaryOp(Node* left, Node* right, Token::Value op); 112 Node* BuildBinaryOp(Node* left, Node* right, Token::Value op);
113 113
114 // Builder for stack-check guards. 114 // Builder for stack-check guards.
115 Node* BuildStackCheck(); 115 Node* BuildStackCheck();
116 116
117 bool IsOsrLoopEntry(IterationStatement* stmt);
118
117 #define DECLARE_VISIT(type) void Visit##type(type* node) OVERRIDE; 119 #define DECLARE_VISIT(type) void Visit##type(type* node) OVERRIDE;
120
118 // Visiting functions for AST nodes make this an AstVisitor. 121 // Visiting functions for AST nodes make this an AstVisitor.
119 AST_NODE_LIST(DECLARE_VISIT) 122 AST_NODE_LIST(DECLARE_VISIT)
120 #undef DECLARE_VISIT 123 #undef DECLARE_VISIT
121 124
122 // Visiting function for declarations list is overridden. 125 // Visiting function for declarations list is overridden.
123 void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE; 126 void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE;
124 127
125 private: 128 private:
126 CompilationInfo* info_; 129 CompilationInfo* info_;
127 AstContext* ast_context_; 130 AstContext* ast_context_;
128 JSGraph* jsgraph_; 131 JSGraph* jsgraph_;
129 132
130 // List of global declarations for functions and variables. 133 // List of global declarations for functions and variables.
131 ZoneVector<Handle<Object>> globals_; 134 ZoneVector<Handle<Object>> globals_;
132 135
133 // Stack of breakable statements entered by the visitor. 136 // Stack of breakable statements entered by the visitor.
134 BreakableScope* breakable_; 137 BreakableScope* breakable_;
135 138
136 // Stack of context objects pushed onto the chain by the visitor. 139 // Stack of context objects pushed onto the chain by the visitor.
137 ContextScope* execution_context_; 140 ContextScope* execution_context_;
138 141
139 // Nodes representing values in the activation record. 142 // Nodes representing values in the activation record.
140 SetOncePointer<Node> function_closure_; 143 SetOncePointer<Node> function_closure_;
141 SetOncePointer<Node> function_context_; 144 SetOncePointer<Node> function_context_;
142 145
146 // The node representing the OSR entry into the loop, if any.
147 SetOncePointer<Node> osr_loop_entry_;
148
143 // Result of loop assignment analysis performed before graph creation. 149 // Result of loop assignment analysis performed before graph creation.
144 LoopAssignmentAnalysis* loop_assignment_analysis_; 150 LoopAssignmentAnalysis* loop_assignment_analysis_;
145 151
146 CompilationInfo* info() const { return info_; } 152 CompilationInfo* info() const { return info_; }
147 inline StrictMode strict_mode() const; 153 inline StrictMode strict_mode() const;
148 JSGraph* jsgraph() { return jsgraph_; } 154 JSGraph* jsgraph() { return jsgraph_; }
149 JSOperatorBuilder* javascript() { return jsgraph_->javascript(); } 155 JSOperatorBuilder* javascript() { return jsgraph_->javascript(); }
150 ZoneVector<Handle<Object>>* globals() { return &globals_; } 156 ZoneVector<Handle<Object>>* globals() { return &globals_; }
151 157
152 // Current scope during visitation. 158 // Current scope during visitation.
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 448
443 Scope* AstGraphBuilder::current_scope() const { 449 Scope* AstGraphBuilder::current_scope() const {
444 return execution_context_->scope(); 450 return execution_context_->scope();
445 } 451 }
446 452
447 } // namespace compiler 453 } // namespace compiler
448 } // namespace internal 454 } // namespace internal
449 } // namespace v8 455 } // namespace v8
450 456
451 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ 457 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698