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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 Node* BuildLoadExternal(ExternalReference ref, MachineType type); | 319 Node* BuildLoadExternal(ExternalReference ref, MachineType type); |
320 Node* BuildStoreExternal(ExternalReference ref, MachineType type, Node* val); | 320 Node* BuildStoreExternal(ExternalReference ref, MachineType type, Node* val); |
321 | 321 |
322 // Builders for automatic type conversion. | 322 // Builders for automatic type conversion. |
323 Node* BuildToBoolean(Node* input); | 323 Node* BuildToBoolean(Node* input); |
324 Node* BuildToName(Node* input, BailoutId bailout_id); | 324 Node* BuildToName(Node* input, BailoutId bailout_id); |
325 Node* BuildToObject(Node* input, BailoutId bailout_id); | 325 Node* BuildToObject(Node* input, BailoutId bailout_id); |
326 | 326 |
327 // Builder for adding the [[HomeObject]] to a value if the value came from a | 327 // Builder for adding the [[HomeObject]] to a value if the value came from a |
328 // function literal and needs a home object. Do nothing otherwise. | 328 // function literal and needs a home object. Do nothing otherwise. |
329 Node* BuildSetHomeObject(Node* value, Node* home_object, Expression* expr, | 329 Node* BuildSetHomeObject(Node* value, Node* home_object, |
330 const VectorSlotPair& feedback); | 330 ObjectLiteralProperty* property, |
| 331 int slot_number = 0); |
331 | 332 |
332 // Builders for error reporting at runtime. | 333 // Builders for error reporting at runtime. |
333 Node* BuildThrowError(Node* exception, BailoutId bailout_id); | 334 Node* BuildThrowError(Node* exception, BailoutId bailout_id); |
334 Node* BuildThrowReferenceError(Variable* var, BailoutId bailout_id); | 335 Node* BuildThrowReferenceError(Variable* var, BailoutId bailout_id); |
335 Node* BuildThrowConstAssignError(BailoutId bailout_id); | 336 Node* BuildThrowConstAssignError(BailoutId bailout_id); |
336 Node* BuildThrowStaticPrototypeError(BailoutId bailout_id); | 337 Node* BuildThrowStaticPrototypeError(BailoutId bailout_id); |
337 Node* BuildThrowUnsupportedSuperError(BailoutId bailout_id); | 338 Node* BuildThrowUnsupportedSuperError(BailoutId bailout_id); |
338 | 339 |
339 // Builders for dynamic hole-checks at runtime. | 340 // Builders for dynamic hole-checks at runtime. |
340 Node* BuildHoleCheckSilent(Node* value, Node* for_hole, Node* not_hole); | 341 Node* BuildHoleCheckSilent(Node* value, Node* for_hole, Node* not_hole); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 // Dispatched from VisitBinaryOperation. | 396 // Dispatched from VisitBinaryOperation. |
396 void VisitComma(BinaryOperation* expr); | 397 void VisitComma(BinaryOperation* expr); |
397 void VisitLogicalExpression(BinaryOperation* expr); | 398 void VisitLogicalExpression(BinaryOperation* expr); |
398 void VisitArithmeticExpression(BinaryOperation* expr); | 399 void VisitArithmeticExpression(BinaryOperation* expr); |
399 | 400 |
400 // Dispatched from VisitForInStatement. | 401 // Dispatched from VisitForInStatement. |
401 void VisitForInAssignment(Expression* expr, Node* value, | 402 void VisitForInAssignment(Expression* expr, Node* value, |
402 const VectorSlotPair& feedback, | 403 const VectorSlotPair& feedback, |
403 BailoutId bailout_id); | 404 BailoutId bailout_id); |
404 | 405 |
| 406 // Dispatched from VisitObjectLiteral. |
| 407 void VisitObjectLiteralAccessor(Node* home_object, |
| 408 ObjectLiteralProperty* property); |
| 409 |
405 // Dispatched from VisitClassLiteral. | 410 // Dispatched from VisitClassLiteral. |
406 void VisitClassLiteralContents(ClassLiteral* expr); | 411 void VisitClassLiteralContents(ClassLiteral* expr); |
407 | 412 |
408 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 413 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
409 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder); | 414 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder); |
410 }; | 415 }; |
411 | 416 |
412 | 417 |
413 // The abstract execution environment for generated code consists of | 418 // The abstract execution environment for generated code consists of |
414 // parameter variables, local variables and the operand stack. The | 419 // parameter variables, local variables and the operand stack. The |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 | 556 |
552 // Prepare environment to be used as loop header. | 557 // Prepare environment to be used as loop header. |
553 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 558 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
554 }; | 559 }; |
555 | 560 |
556 } // namespace compiler | 561 } // namespace compiler |
557 } // namespace internal | 562 } // namespace internal |
558 } // namespace v8 | 563 } // namespace v8 |
559 | 564 |
560 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 565 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
OLD | NEW |