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

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

Issue 798873006: First simple implementation of class literals in TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. 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/ast-numbering.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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // 66 //
67 // The following build methods all generate graph fragments and return one 67 // The following build methods all generate graph fragments and return one
68 // resulting node. The operand stack height remains the same, variables and 68 // resulting node. The operand stack height remains the same, variables and
69 // other dependencies tracked by the environment might be mutated though. 69 // other dependencies tracked by the environment might be mutated though.
70 // 70 //
71 71
72 // Builder to create a receiver check for sloppy mode. 72 // Builder to create a receiver check for sloppy mode.
73 Node* BuildPatchReceiverToGlobalProxy(Node* receiver); 73 Node* BuildPatchReceiverToGlobalProxy(Node* receiver);
74 74
75 // Builder to create a local function context. 75 // Builders to create local function and block contexts.
76 Node* BuildLocalFunctionContext(Node* context, Node* closure); 76 Node* BuildLocalFunctionContext(Node* context, Node* closure);
77 Node* BuildLocalBlockContext(Scope* scope);
77 78
78 // Builder to create an arguments object if it is used. 79 // Builder to create an arguments object if it is used.
79 Node* BuildArgumentsObject(Variable* arguments); 80 Node* BuildArgumentsObject(Variable* arguments);
80 81
81 // Builders for variable load and assignment. 82 // Builders for variable load and assignment.
82 Node* BuildVariableAssignment(Variable* var, Node* value, Token::Value op, 83 Node* BuildVariableAssignment(Variable* var, Node* value, Token::Value op,
83 BailoutId bailout_id, 84 BailoutId bailout_id,
84 OutputFrameStateCombine state_combine = 85 OutputFrameStateCombine state_combine =
85 OutputFrameStateCombine::Ignore()); 86 OutputFrameStateCombine::Ignore());
86 Node* BuildVariableDelete(Variable* var, BailoutId bailout_id, 87 Node* BuildVariableDelete(Variable* var, BailoutId bailout_id,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 168
168 // Visit statements. 169 // Visit statements.
169 void VisitIfNotNull(Statement* stmt); 170 void VisitIfNotNull(Statement* stmt);
170 171
171 // Visit expressions. 172 // Visit expressions.
172 void Visit(Expression* expr); 173 void Visit(Expression* expr);
173 void VisitForTest(Expression* expr); 174 void VisitForTest(Expression* expr);
174 void VisitForEffect(Expression* expr); 175 void VisitForEffect(Expression* expr);
175 void VisitForValue(Expression* expr); 176 void VisitForValue(Expression* expr);
176 void VisitForValueOrNull(Expression* expr); 177 void VisitForValueOrNull(Expression* expr);
178 void VisitForValueOrTheHole(Expression* expr);
177 void VisitForValues(ZoneList<Expression*>* exprs); 179 void VisitForValues(ZoneList<Expression*>* exprs);
178 180
179 // Common for all IterationStatement bodies. 181 // Common for all IterationStatement bodies.
180 void VisitIterationBody(IterationStatement* stmt, LoopBuilder* loop, int); 182 void VisitIterationBody(IterationStatement* stmt, LoopBuilder* loop, int);
181 183
182 // Dispatched from VisitCallRuntime. 184 // Dispatched from VisitCallRuntime.
183 void VisitCallJSRuntime(CallRuntime* expr); 185 void VisitCallJSRuntime(CallRuntime* expr);
184 186
185 // Dispatched from VisitUnaryOperation. 187 // Dispatched from VisitUnaryOperation.
186 void VisitDelete(UnaryOperation* expr); 188 void VisitDelete(UnaryOperation* expr);
187 void VisitVoid(UnaryOperation* expr); 189 void VisitVoid(UnaryOperation* expr);
188 void VisitTypeof(UnaryOperation* expr); 190 void VisitTypeof(UnaryOperation* expr);
189 void VisitNot(UnaryOperation* expr); 191 void VisitNot(UnaryOperation* expr);
190 192
191 // Dispatched from VisitBinaryOperation. 193 // Dispatched from VisitBinaryOperation.
192 void VisitComma(BinaryOperation* expr); 194 void VisitComma(BinaryOperation* expr);
193 void VisitLogicalExpression(BinaryOperation* expr); 195 void VisitLogicalExpression(BinaryOperation* expr);
194 void VisitArithmeticExpression(BinaryOperation* expr); 196 void VisitArithmeticExpression(BinaryOperation* expr);
195 197
196 // Dispatched from VisitForInStatement. 198 // Dispatched from VisitForInStatement.
197 void VisitForInAssignment(Expression* expr, Node* value); 199 void VisitForInAssignment(Expression* expr, Node* value);
198 200
201 // Dispatched from VisitClassLiteral.
202 void VisitClassLiteralContents(ClassLiteral* expr);
203
199 // Builds deoptimization for a given node. 204 // Builds deoptimization for a given node.
200 void PrepareFrameState( 205 void PrepareFrameState(
201 Node* node, BailoutId ast_id, 206 Node* node, BailoutId ast_id,
202 OutputFrameStateCombine combine = OutputFrameStateCombine::Ignore()); 207 OutputFrameStateCombine combine = OutputFrameStateCombine::Ignore());
203 208
204 BitVector* GetVariablesAssignedInLoop(IterationStatement* stmt); 209 BitVector* GetVariablesAssignedInLoop(IterationStatement* stmt);
205 210
206 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 211 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
207 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder); 212 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder);
208 }; 213 };
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 453
449 Scope* AstGraphBuilder::current_scope() const { 454 Scope* AstGraphBuilder::current_scope() const {
450 return execution_context_->scope(); 455 return execution_context_->scope();
451 } 456 }
452 457
453 } // namespace compiler 458 } // namespace compiler
454 } // namespace internal 459 } // namespace internal
455 } // namespace v8 460 } // namespace v8
456 461
457 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ 462 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « src/ast-numbering.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698