| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ | 5 #ifndef RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ |
| 6 #define RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ | 6 #define RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ |
| 7 | 7 |
| 8 #if !defined(DART_PRECOMPILED_RUNTIME) | 8 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 void VisitNode(); | 112 void VisitNode(); |
| 113 void VisitInitializer(); | 113 void VisitInitializer(); |
| 114 void VisitExpression(); | 114 void VisitExpression(); |
| 115 void VisitStatement(); | 115 void VisitStatement(); |
| 116 void VisitArguments(); | 116 void VisitArguments(); |
| 117 void VisitVariableDeclaration(); | 117 void VisitVariableDeclaration(); |
| 118 void VisitDartType(); | 118 void VisitDartType(); |
| 119 void VisitInterfaceType(bool simple); | 119 void VisitInterfaceType(bool simple); |
| 120 void VisitFunctionType(bool simple); | 120 void VisitFunctionType(bool simple); |
| 121 void VisitTypeParameterType(); | 121 void VisitTypeParameterType(); |
| 122 void VisitVectorType(); |
| 122 void HandleLocalFunction(intptr_t parent_kernel_offset); | 123 void HandleLocalFunction(intptr_t parent_kernel_offset); |
| 123 | 124 |
| 124 void EnterScope(intptr_t kernel_offset); | 125 void EnterScope(intptr_t kernel_offset); |
| 125 void ExitScope(TokenPosition start_position, TokenPosition end_position); | 126 void ExitScope(TokenPosition start_position, TokenPosition end_position); |
| 126 | 127 |
| 127 /** | 128 /** |
| 128 * This assumes that the reader is at a FunctionNode, | 129 * This assumes that the reader is at a FunctionNode, |
| 129 * about to read the positional parameters. | 130 * about to read the positional parameters. |
| 130 */ | 131 */ |
| 131 void AddPositionalAndNamedParameters(intptr_t pos = 0); | 132 void AddPositionalAndNamedParameters(intptr_t pos = 0); |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 */ | 377 */ |
| 377 intptr_t ReadUntilFunctionNode(); | 378 intptr_t ReadUntilFunctionNode(); |
| 378 StringIndex GetNameFromVariableDeclaration(intptr_t kernel_offset); | 379 StringIndex GetNameFromVariableDeclaration(intptr_t kernel_offset); |
| 379 | 380 |
| 380 FlowGraph* BuildGraphOfStaticFieldInitializer(); | 381 FlowGraph* BuildGraphOfStaticFieldInitializer(); |
| 381 FlowGraph* BuildGraphOfFieldAccessor(LocalVariable* setter_value); | 382 FlowGraph* BuildGraphOfFieldAccessor(LocalVariable* setter_value); |
| 382 void SetupDefaultParameterValues(); | 383 void SetupDefaultParameterValues(); |
| 383 Fragment BuildFieldInitializer(NameIndex canonical_name); | 384 Fragment BuildFieldInitializer(NameIndex canonical_name); |
| 384 Fragment BuildInitializers(intptr_t constructor_class_parent_offset); | 385 Fragment BuildInitializers(intptr_t constructor_class_parent_offset); |
| 385 FlowGraph* BuildGraphOfImplicitClosureFunction(const Function& function); | 386 FlowGraph* BuildGraphOfImplicitClosureFunction(const Function& function); |
| 387 FlowGraph* BuildGraphOfConvertedClosureFunction(const Function& function); |
| 386 FlowGraph* BuildGraphOfFunction( | 388 FlowGraph* BuildGraphOfFunction( |
| 387 bool is_in_builtin_library_toplevel, | 389 bool is_in_builtin_library_toplevel, |
| 388 intptr_t constructor_class_parent_offset = -1); | 390 intptr_t constructor_class_parent_offset = -1); |
| 389 Fragment BuildGetMainClosure(); | 391 Fragment BuildGetMainClosure(); |
| 390 | 392 |
| 391 Fragment BuildExpression(TokenPosition* position = NULL); | 393 Fragment BuildExpression(TokenPosition* position = NULL); |
| 392 Fragment BuildStatement(); | 394 Fragment BuildStatement(); |
| 393 | 395 |
| 394 intptr_t ReaderOffset(); | 396 intptr_t ReaderOffset(); |
| 395 void SetOffset(intptr_t offset); | 397 void SetOffset(intptr_t offset); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 CatchBlock* catch_block(); | 444 CatchBlock* catch_block(); |
| 443 ActiveClass* active_class(); | 445 ActiveClass* active_class(); |
| 444 ScopeBuildingResult* scopes(); | 446 ScopeBuildingResult* scopes(); |
| 445 void set_scopes(ScopeBuildingResult* scope); | 447 void set_scopes(ScopeBuildingResult* scope); |
| 446 ParsedFunction* parsed_function(); | 448 ParsedFunction* parsed_function(); |
| 447 TryFinallyBlock* try_finally_block(); | 449 TryFinallyBlock* try_finally_block(); |
| 448 SwitchBlock* switch_block(); | 450 SwitchBlock* switch_block(); |
| 449 BreakableBlock* breakable_block(); | 451 BreakableBlock* breakable_block(); |
| 450 GrowableArray<YieldContinuation>& yield_continuations(); | 452 GrowableArray<YieldContinuation>& yield_continuations(); |
| 451 Value* stack(); | 453 Value* stack(); |
| 454 void Push(Definition* definition); |
| 452 Value* Pop(); | 455 Value* Pop(); |
| 453 | 456 |
| 454 Tag PeekArgumentsFirstPositionalTag(); | 457 Tag PeekArgumentsFirstPositionalTag(); |
| 455 const TypeArguments& PeekArgumentsInstantiatedType(const dart::Class& klass); | 458 const TypeArguments& PeekArgumentsInstantiatedType(const dart::Class& klass); |
| 456 intptr_t PeekArgumentsCount(); | 459 intptr_t PeekArgumentsCount(); |
| 457 intptr_t PeekArgumentsTypeCount(); | 460 intptr_t PeekArgumentsTypeCount(); |
| 458 void SkipArgumentsBeforeActualArguments(); | 461 void SkipArgumentsBeforeActualArguments(); |
| 459 | 462 |
| 460 LocalVariable* LookupVariable(intptr_t kernel_offset); | 463 LocalVariable* LookupVariable(intptr_t kernel_offset); |
| 461 LocalVariable* MakeTemporary(); | 464 LocalVariable* MakeTemporary(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 Token::Kind kind, | 497 Token::Kind kind, |
| 495 intptr_t argument_count, | 498 intptr_t argument_count, |
| 496 const Array& argument_names, | 499 const Array& argument_names, |
| 497 intptr_t num_args_checked); | 500 intptr_t num_args_checked); |
| 498 Fragment ThrowException(TokenPosition position); | 501 Fragment ThrowException(TokenPosition position); |
| 499 Fragment BooleanNegate(); | 502 Fragment BooleanNegate(); |
| 500 Fragment TranslateInstantiatedTypeArguments( | 503 Fragment TranslateInstantiatedTypeArguments( |
| 501 const TypeArguments& type_arguments); | 504 const TypeArguments& type_arguments); |
| 502 Fragment StrictCompare(Token::Kind kind, bool number_check = false); | 505 Fragment StrictCompare(Token::Kind kind, bool number_check = false); |
| 503 Fragment AllocateObject(const dart::Class& klass, intptr_t argument_count); | 506 Fragment AllocateObject(const dart::Class& klass, intptr_t argument_count); |
| 507 Fragment AllocateObject(const dart::Class& klass, |
| 508 const Function& closure_function); |
| 509 Fragment LoadField(intptr_t offset); |
| 510 Fragment AllocateContext(int size); |
| 504 Fragment StoreLocal(TokenPosition position, LocalVariable* variable); | 511 Fragment StoreLocal(TokenPosition position, LocalVariable* variable); |
| 505 Fragment StoreStaticField(TokenPosition position, const dart::Field& field); | 512 Fragment StoreStaticField(TokenPosition position, const dart::Field& field); |
| 513 Fragment StoreInstanceField(TokenPosition position, intptr_t offset); |
| 506 Fragment StringInterpolate(TokenPosition position); | 514 Fragment StringInterpolate(TokenPosition position); |
| 507 Fragment StringInterpolateSingle(TokenPosition position); | 515 Fragment StringInterpolateSingle(TokenPosition position); |
| 508 Fragment ThrowTypeError(); | 516 Fragment ThrowTypeError(); |
| 509 Fragment LoadInstantiatorTypeArguments(); | 517 Fragment LoadInstantiatorTypeArguments(); |
| 510 Fragment LoadFunctionTypeArguments(); | 518 Fragment LoadFunctionTypeArguments(); |
| 511 Fragment InstantiateType(const AbstractType& type); | 519 Fragment InstantiateType(const AbstractType& type); |
| 512 Fragment CreateArray(); | 520 Fragment CreateArray(); |
| 513 Fragment StoreIndexed(intptr_t class_id); | 521 Fragment StoreIndexed(intptr_t class_id); |
| 514 Fragment CheckStackOverflow(); | 522 Fragment CheckStackOverflow(); |
| 515 Fragment CloneContext(); | 523 Fragment CloneContext(); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 Fragment BuildMapLiteral(bool is_const, TokenPosition* position); | 591 Fragment BuildMapLiteral(bool is_const, TokenPosition* position); |
| 584 Fragment BuildFunctionExpression(); | 592 Fragment BuildFunctionExpression(); |
| 585 Fragment BuildLet(TokenPosition* position); | 593 Fragment BuildLet(TokenPosition* position); |
| 586 Fragment BuildBigIntLiteral(TokenPosition* position); | 594 Fragment BuildBigIntLiteral(TokenPosition* position); |
| 587 Fragment BuildStringLiteral(TokenPosition* position); | 595 Fragment BuildStringLiteral(TokenPosition* position); |
| 588 Fragment BuildIntLiteral(uint8_t payload, TokenPosition* position); | 596 Fragment BuildIntLiteral(uint8_t payload, TokenPosition* position); |
| 589 Fragment BuildIntLiteral(bool is_negative, TokenPosition* position); | 597 Fragment BuildIntLiteral(bool is_negative, TokenPosition* position); |
| 590 Fragment BuildDoubleLiteral(TokenPosition* position); | 598 Fragment BuildDoubleLiteral(TokenPosition* position); |
| 591 Fragment BuildBoolLiteral(bool value, TokenPosition* position); | 599 Fragment BuildBoolLiteral(bool value, TokenPosition* position); |
| 592 Fragment BuildNullLiteral(TokenPosition* position); | 600 Fragment BuildNullLiteral(TokenPosition* position); |
| 601 Fragment BuildVectorCreation(TokenPosition* position); |
| 602 Fragment BuildVectorGet(TokenPosition* position); |
| 603 Fragment BuildVectorSet(TokenPosition* position); |
| 604 Fragment BuildVectorCopy(TokenPosition* position); |
| 605 Fragment BuildClosureCreation(TokenPosition* position); |
| 593 | 606 |
| 594 Fragment BuildInvalidStatement(); | 607 Fragment BuildInvalidStatement(); |
| 595 Fragment BuildExpressionStatement(); | 608 Fragment BuildExpressionStatement(); |
| 596 Fragment BuildBlock(); | 609 Fragment BuildBlock(); |
| 597 Fragment BuildEmptyStatement(); | 610 Fragment BuildEmptyStatement(); |
| 598 Fragment BuildAssertStatement(); | 611 Fragment BuildAssertStatement(); |
| 599 Fragment BuildLabeledStatement(); | 612 Fragment BuildLabeledStatement(); |
| 600 Fragment BuildBreakStatement(); | 613 Fragment BuildBreakStatement(); |
| 601 Fragment BuildWhileStatement(); | 614 Fragment BuildWhileStatement(); |
| 602 Fragment BuildDoStatement(); | 615 Fragment BuildDoStatement(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 private: | 667 private: |
| 655 Reader* reader_; | 668 Reader* reader_; |
| 656 intptr_t saved_offset_; | 669 intptr_t saved_offset_; |
| 657 }; | 670 }; |
| 658 | 671 |
| 659 } // namespace kernel | 672 } // namespace kernel |
| 660 } // namespace dart | 673 } // namespace dart |
| 661 | 674 |
| 662 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 675 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| 663 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ | 676 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ |
| OLD | NEW |