| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 void VisitNode(); | 110 void VisitNode(); |
| 111 void VisitInitializer(); | 111 void VisitInitializer(); |
| 112 void VisitExpression(); | 112 void VisitExpression(); |
| 113 void VisitStatement(); | 113 void VisitStatement(); |
| 114 void VisitArguments(); | 114 void VisitArguments(); |
| 115 void VisitVariableDeclaration(); | 115 void VisitVariableDeclaration(); |
| 116 void VisitDartType(); | 116 void VisitDartType(); |
| 117 void VisitInterfaceType(bool simple); | 117 void VisitInterfaceType(bool simple); |
| 118 void VisitFunctionType(bool simple); | 118 void VisitFunctionType(bool simple); |
| 119 void VisitTypeParameterType(); | 119 void VisitTypeParameterType(); |
| 120 void VisitVectorType(); |
| 120 void HandleLocalFunction(intptr_t parent_kernel_offset); | 121 void HandleLocalFunction(intptr_t parent_kernel_offset); |
| 121 | 122 |
| 122 void EnterScope(intptr_t kernel_offset); | 123 void EnterScope(intptr_t kernel_offset); |
| 123 void ExitScope(TokenPosition start_position, TokenPosition end_position); | 124 void ExitScope(TokenPosition start_position, TokenPosition end_position); |
| 124 | 125 |
| 125 /** | 126 /** |
| 126 * This assumes that the reader is at a FunctionNode, | 127 * This assumes that the reader is at a FunctionNode, |
| 127 * about to read the positional parameters. | 128 * about to read the positional parameters. |
| 128 */ | 129 */ |
| 129 void AddPositionalAndNamedParameters(intptr_t pos = 0); | 130 void AddPositionalAndNamedParameters(intptr_t pos = 0); |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 */ | 366 */ |
| 366 intptr_t ReadUntilFunctionNode(); | 367 intptr_t ReadUntilFunctionNode(); |
| 367 StringIndex GetNameFromVariableDeclaration(intptr_t kernel_offset); | 368 StringIndex GetNameFromVariableDeclaration(intptr_t kernel_offset); |
| 368 | 369 |
| 369 FlowGraph* BuildGraphOfStaticFieldInitializer(); | 370 FlowGraph* BuildGraphOfStaticFieldInitializer(); |
| 370 FlowGraph* BuildGraphOfFieldAccessor(LocalVariable* setter_value); | 371 FlowGraph* BuildGraphOfFieldAccessor(LocalVariable* setter_value); |
| 371 void SetupDefaultParameterValues(); | 372 void SetupDefaultParameterValues(); |
| 372 Fragment BuildFieldInitializer(NameIndex canonical_name); | 373 Fragment BuildFieldInitializer(NameIndex canonical_name); |
| 373 Fragment BuildInitializers(intptr_t constructor_class_parent_offset); | 374 Fragment BuildInitializers(intptr_t constructor_class_parent_offset); |
| 374 FlowGraph* BuildGraphOfImplicitClosureFunction(const Function& function); | 375 FlowGraph* BuildGraphOfImplicitClosureFunction(const Function& function); |
| 376 FlowGraph* BuildGraphOfConvertedClosureFunction(const Function& function); |
| 375 FlowGraph* BuildGraphOfFunction( | 377 FlowGraph* BuildGraphOfFunction( |
| 376 intptr_t constructor_class_parent_offset = -1); | 378 intptr_t constructor_class_parent_offset = -1); |
| 377 | 379 |
| 378 Fragment BuildExpression(TokenPosition* position = NULL); | 380 Fragment BuildExpression(TokenPosition* position = NULL); |
| 379 Fragment BuildStatement(); | 381 Fragment BuildStatement(); |
| 380 | 382 |
| 381 intptr_t ReaderOffset(); | 383 intptr_t ReaderOffset(); |
| 382 void SetOffset(intptr_t offset); | 384 void SetOffset(intptr_t offset); |
| 383 void SkipBytes(intptr_t skip); | 385 void SkipBytes(intptr_t skip); |
| 384 bool ReadBool(); | 386 bool ReadBool(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 CatchBlock* catch_block(); | 437 CatchBlock* catch_block(); |
| 436 ActiveClass* active_class(); | 438 ActiveClass* active_class(); |
| 437 ScopeBuildingResult* scopes(); | 439 ScopeBuildingResult* scopes(); |
| 438 void set_scopes(ScopeBuildingResult* scope); | 440 void set_scopes(ScopeBuildingResult* scope); |
| 439 ParsedFunction* parsed_function(); | 441 ParsedFunction* parsed_function(); |
| 440 TryFinallyBlock* try_finally_block(); | 442 TryFinallyBlock* try_finally_block(); |
| 441 SwitchBlock* switch_block(); | 443 SwitchBlock* switch_block(); |
| 442 BreakableBlock* breakable_block(); | 444 BreakableBlock* breakable_block(); |
| 443 GrowableArray<YieldContinuation>& yield_continuations(); | 445 GrowableArray<YieldContinuation>& yield_continuations(); |
| 444 Value* stack(); | 446 Value* stack(); |
| 447 void Push(Definition* definition); |
| 445 Value* Pop(); | 448 Value* Pop(); |
| 446 | 449 |
| 447 Tag PeekArgumentsFirstPositionalTag(); | 450 Tag PeekArgumentsFirstPositionalTag(); |
| 448 const TypeArguments& PeekArgumentsInstantiatedType(const dart::Class& klass); | 451 const TypeArguments& PeekArgumentsInstantiatedType(const dart::Class& klass); |
| 449 intptr_t PeekArgumentsCount(); | 452 intptr_t PeekArgumentsCount(); |
| 450 intptr_t PeekArgumentsTypeCount(); | 453 intptr_t PeekArgumentsTypeCount(); |
| 451 void SkipArgumentsBeforeActualArguments(); | 454 void SkipArgumentsBeforeActualArguments(); |
| 452 | 455 |
| 453 LocalVariable* LookupVariable(intptr_t kernel_offset); | 456 LocalVariable* LookupVariable(intptr_t kernel_offset); |
| 454 LocalVariable* MakeTemporary(); | 457 LocalVariable* MakeTemporary(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 const Array& argument_names, | 493 const Array& argument_names, |
| 491 intptr_t checked_argument_count); | 494 intptr_t checked_argument_count); |
| 492 Fragment ThrowException(TokenPosition position); | 495 Fragment ThrowException(TokenPosition position); |
| 493 Fragment BooleanNegate(); | 496 Fragment BooleanNegate(); |
| 494 Fragment TranslateInstantiatedTypeArguments( | 497 Fragment TranslateInstantiatedTypeArguments( |
| 495 const TypeArguments& type_arguments); | 498 const TypeArguments& type_arguments); |
| 496 Fragment StrictCompare(Token::Kind kind, bool number_check = false); | 499 Fragment StrictCompare(Token::Kind kind, bool number_check = false); |
| 497 Fragment AllocateObject(TokenPosition position, | 500 Fragment AllocateObject(TokenPosition position, |
| 498 const dart::Class& klass, | 501 const dart::Class& klass, |
| 499 intptr_t argument_count); | 502 intptr_t argument_count); |
| 503 Fragment AllocateObject(const dart::Class& klass, |
| 504 const Function& closure_function); |
| 505 Fragment AllocateContext(intptr_t size); |
| 506 Fragment LoadField(intptr_t offset); |
| 500 Fragment StoreLocal(TokenPosition position, LocalVariable* variable); | 507 Fragment StoreLocal(TokenPosition position, LocalVariable* variable); |
| 501 Fragment StoreStaticField(TokenPosition position, const dart::Field& field); | 508 Fragment StoreStaticField(TokenPosition position, const dart::Field& field); |
| 509 Fragment StoreInstanceField(TokenPosition position, intptr_t offset); |
| 502 Fragment StringInterpolate(TokenPosition position); | 510 Fragment StringInterpolate(TokenPosition position); |
| 503 Fragment StringInterpolateSingle(TokenPosition position); | 511 Fragment StringInterpolateSingle(TokenPosition position); |
| 504 Fragment ThrowTypeError(); | 512 Fragment ThrowTypeError(); |
| 505 Fragment LoadInstantiatorTypeArguments(); | 513 Fragment LoadInstantiatorTypeArguments(); |
| 506 Fragment LoadFunctionTypeArguments(); | 514 Fragment LoadFunctionTypeArguments(); |
| 507 Fragment InstantiateType(const AbstractType& type); | 515 Fragment InstantiateType(const AbstractType& type); |
| 508 Fragment CreateArray(); | 516 Fragment CreateArray(); |
| 509 Fragment StoreIndexed(intptr_t class_id); | 517 Fragment StoreIndexed(intptr_t class_id); |
| 510 Fragment CheckStackOverflow(); | 518 Fragment CheckStackOverflow(); |
| 511 Fragment CloneContext(); | 519 Fragment CloneContext(); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 Fragment BuildMapLiteral(bool is_const, TokenPosition* position); | 587 Fragment BuildMapLiteral(bool is_const, TokenPosition* position); |
| 580 Fragment BuildFunctionExpression(); | 588 Fragment BuildFunctionExpression(); |
| 581 Fragment BuildLet(TokenPosition* position); | 589 Fragment BuildLet(TokenPosition* position); |
| 582 Fragment BuildBigIntLiteral(TokenPosition* position); | 590 Fragment BuildBigIntLiteral(TokenPosition* position); |
| 583 Fragment BuildStringLiteral(TokenPosition* position); | 591 Fragment BuildStringLiteral(TokenPosition* position); |
| 584 Fragment BuildIntLiteral(uint8_t payload, TokenPosition* position); | 592 Fragment BuildIntLiteral(uint8_t payload, TokenPosition* position); |
| 585 Fragment BuildIntLiteral(bool is_negative, TokenPosition* position); | 593 Fragment BuildIntLiteral(bool is_negative, TokenPosition* position); |
| 586 Fragment BuildDoubleLiteral(TokenPosition* position); | 594 Fragment BuildDoubleLiteral(TokenPosition* position); |
| 587 Fragment BuildBoolLiteral(bool value, TokenPosition* position); | 595 Fragment BuildBoolLiteral(bool value, TokenPosition* position); |
| 588 Fragment BuildNullLiteral(TokenPosition* position); | 596 Fragment BuildNullLiteral(TokenPosition* position); |
| 597 Fragment BuildVectorCreation(TokenPosition* position); |
| 598 Fragment BuildVectorGet(TokenPosition* position); |
| 599 Fragment BuildVectorSet(TokenPosition* position); |
| 600 Fragment BuildVectorCopy(TokenPosition* position); |
| 601 Fragment BuildClosureCreation(TokenPosition* position); |
| 589 | 602 |
| 590 Fragment BuildInvalidStatement(); | 603 Fragment BuildInvalidStatement(); |
| 591 Fragment BuildExpressionStatement(); | 604 Fragment BuildExpressionStatement(); |
| 592 Fragment BuildBlock(); | 605 Fragment BuildBlock(); |
| 593 Fragment BuildEmptyStatement(); | 606 Fragment BuildEmptyStatement(); |
| 594 Fragment BuildAssertStatement(); | 607 Fragment BuildAssertStatement(); |
| 595 Fragment BuildLabeledStatement(); | 608 Fragment BuildLabeledStatement(); |
| 596 Fragment BuildBreakStatement(); | 609 Fragment BuildBreakStatement(); |
| 597 Fragment BuildWhileStatement(); | 610 Fragment BuildWhileStatement(); |
| 598 Fragment BuildDoStatement(); | 611 Fragment BuildDoStatement(); |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1517 private: | 1530 private: |
| 1518 Reader* reader_; | 1531 Reader* reader_; |
| 1519 intptr_t saved_offset_; | 1532 intptr_t saved_offset_; |
| 1520 }; | 1533 }; |
| 1521 | 1534 |
| 1522 } // namespace kernel | 1535 } // namespace kernel |
| 1523 } // namespace dart | 1536 } // namespace dart |
| 1524 | 1537 |
| 1525 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 1538 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| 1526 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ | 1539 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ |
| OLD | NEW |