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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 Node* BuildLoadGlobalObject(); | 281 Node* BuildLoadGlobalObject(); |
282 Node* BuildLoadGlobalProxy(); | 282 Node* BuildLoadGlobalProxy(); |
283 Node* BuildLoadClosure(); | 283 Node* BuildLoadClosure(); |
284 Node* BuildLoadObjectField(Node* object, int offset); | 284 Node* BuildLoadObjectField(Node* object, int offset); |
285 | 285 |
286 // Builders for accessing external references. | 286 // Builders for accessing external references. |
287 Node* BuildLoadExternal(ExternalReference ref, MachineType type); | 287 Node* BuildLoadExternal(ExternalReference ref, MachineType type); |
288 Node* BuildStoreExternal(ExternalReference ref, MachineType type, Node* val); | 288 Node* BuildStoreExternal(ExternalReference ref, MachineType type, Node* val); |
289 | 289 |
290 // Builders for automatic type conversion. | 290 // Builders for automatic type conversion. |
291 Node* BuildToBoolean(Node* value); | 291 Node* BuildToBoolean(Node* input); |
292 Node* BuildToName(Node* value, BailoutId bailout_id); | 292 Node* BuildToName(Node* input, BailoutId bailout_id); |
| 293 Node* BuildToObject(Node* input, BailoutId bailout_id); |
293 | 294 |
294 // Builder for adding the [[HomeObject]] to a value if the value came from a | 295 // Builder for adding the [[HomeObject]] to a value if the value came from a |
295 // function literal and needs a home object. Do nothing otherwise. | 296 // function literal and needs a home object. Do nothing otherwise. |
296 Node* BuildSetHomeObject(Node* value, Node* home_object, Expression* expr); | 297 Node* BuildSetHomeObject(Node* value, Node* home_object, Expression* expr); |
297 | 298 |
298 // Builders for error reporting at runtime. | 299 // Builders for error reporting at runtime. |
299 Node* BuildThrowError(Node* exception, BailoutId bailout_id); | 300 Node* BuildThrowError(Node* exception, BailoutId bailout_id); |
300 Node* BuildThrowReferenceError(Variable* var, BailoutId bailout_id); | 301 Node* BuildThrowReferenceError(Variable* var, BailoutId bailout_id); |
301 Node* BuildThrowConstAssignError(BailoutId bailout_id); | 302 Node* BuildThrowConstAssignError(BailoutId bailout_id); |
302 Node* BuildThrowStaticPrototypeError(BailoutId bailout_id); | 303 Node* BuildThrowStaticPrototypeError(BailoutId bailout_id); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 void VisitNot(UnaryOperation* expr); | 353 void VisitNot(UnaryOperation* expr); |
353 | 354 |
354 // Dispatched from VisitBinaryOperation. | 355 // Dispatched from VisitBinaryOperation. |
355 void VisitComma(BinaryOperation* expr); | 356 void VisitComma(BinaryOperation* expr); |
356 void VisitLogicalExpression(BinaryOperation* expr); | 357 void VisitLogicalExpression(BinaryOperation* expr); |
357 void VisitArithmeticExpression(BinaryOperation* expr); | 358 void VisitArithmeticExpression(BinaryOperation* expr); |
358 | 359 |
359 // Dispatched from VisitForInStatement. | 360 // Dispatched from VisitForInStatement. |
360 void VisitForInAssignment(Expression* expr, Node* value, | 361 void VisitForInAssignment(Expression* expr, Node* value, |
361 BailoutId bailout_id); | 362 BailoutId bailout_id); |
362 void VisitForInBody(ForInStatement* stmt); | |
363 | 363 |
364 // Dispatched from VisitClassLiteral. | 364 // Dispatched from VisitClassLiteral. |
365 void VisitClassLiteralContents(ClassLiteral* expr); | 365 void VisitClassLiteralContents(ClassLiteral* expr); |
366 | 366 |
367 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 367 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
368 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder); | 368 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder); |
369 }; | 369 }; |
370 | 370 |
371 | 371 |
372 // The abstract execution environment for generated code consists of | 372 // The abstract execution environment for generated code consists of |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 | 506 |
507 // Prepare environment to be used as loop header. | 507 // Prepare environment to be used as loop header. |
508 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 508 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
509 }; | 509 }; |
510 | 510 |
511 } // namespace compiler | 511 } // namespace compiler |
512 } // namespace internal | 512 } // namespace internal |
513 } // namespace v8 | 513 } // namespace v8 |
514 | 514 |
515 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 515 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
OLD | NEW |