| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 VM_PARSER_H_ | 5 #ifndef VM_PARSER_H_ |
| 6 #define VM_PARSER_H_ | 6 #define VM_PARSER_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 | 9 |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 const Class& toplevel_class, | 356 const Class& toplevel_class, |
| 357 intptr_t metadata_pos); | 357 intptr_t metadata_pos); |
| 358 void ParseTypedef(const GrowableObjectArray& pending_classes, | 358 void ParseTypedef(const GrowableObjectArray& pending_classes, |
| 359 const Class& toplevel_class, | 359 const Class& toplevel_class, |
| 360 intptr_t metadata_pos); | 360 intptr_t metadata_pos); |
| 361 void ParseTopLevelVariable(TopLevel* top_level, intptr_t metadata_pos); | 361 void ParseTopLevelVariable(TopLevel* top_level, intptr_t metadata_pos); |
| 362 void ParseTopLevelFunction(TopLevel* top_level, intptr_t metadata_pos); | 362 void ParseTopLevelFunction(TopLevel* top_level, intptr_t metadata_pos); |
| 363 void ParseTopLevelAccessor(TopLevel* top_level, intptr_t metadata_pos); | 363 void ParseTopLevelAccessor(TopLevel* top_level, intptr_t metadata_pos); |
| 364 RawArray* EvaluateMetadata(); | 364 RawArray* EvaluateMetadata(); |
| 365 | 365 |
| 366 RawFunction::AsyncModifier ParseFunctionModifier(); | |
| 367 | |
| 368 // Support for parsing libraries. | 366 // Support for parsing libraries. |
| 369 RawObject* CallLibraryTagHandler(Dart_LibraryTag tag, | 367 RawObject* CallLibraryTagHandler(Dart_LibraryTag tag, |
| 370 intptr_t token_pos, | 368 intptr_t token_pos, |
| 371 const String& url); | 369 const String& url); |
| 372 void ParseIdentList(GrowableObjectArray* names); | 370 void ParseIdentList(GrowableObjectArray* names); |
| 373 void ParseLibraryDefinition(); | 371 void ParseLibraryDefinition(); |
| 374 void ParseLibraryName(); | 372 void ParseLibraryName(); |
| 375 void ParseLibraryImportExport(intptr_t metadata_pos); | 373 void ParseLibraryImportExport(intptr_t metadata_pos); |
| 376 void ParseLibraryPart(); | 374 void ParseLibraryPart(); |
| 377 void ParsePartHeader(); | 375 void ParsePartHeader(); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 intptr_t token_pos, | 456 intptr_t token_pos, |
| 459 AstNode* receiver); | 457 AstNode* receiver); |
| 460 static void AddFormalParamsToFunction(const ParamList* params, | 458 static void AddFormalParamsToFunction(const ParamList* params, |
| 461 const Function& func); | 459 const Function& func); |
| 462 void AddFormalParamsToScope(const ParamList* params, LocalScope* scope); | 460 void AddFormalParamsToScope(const ParamList* params, LocalScope* scope); |
| 463 | 461 |
| 464 SequenceNode* ParseConstructor(const Function& func, | 462 SequenceNode* ParseConstructor(const Function& func, |
| 465 Array* default_parameter_values); | 463 Array* default_parameter_values); |
| 466 SequenceNode* ParseFunc(const Function& func, | 464 SequenceNode* ParseFunc(const Function& func, |
| 467 Array* default_parameter_values); | 465 Array* default_parameter_values); |
| 468 RawClass* GetClassForAsync(const String& class_name); | |
| 469 | 466 |
| 470 void ParseNativeFunctionBlock(const ParamList* params, const Function& func); | 467 void ParseNativeFunctionBlock(const ParamList* params, const Function& func); |
| 471 | 468 |
| 472 SequenceNode* ParseInstanceGetter(const Function& func); | 469 SequenceNode* ParseInstanceGetter(const Function& func); |
| 473 SequenceNode* ParseInstanceSetter(const Function& func); | 470 SequenceNode* ParseInstanceSetter(const Function& func); |
| 474 SequenceNode* ParseStaticFinalGetter(const Function& func); | 471 SequenceNode* ParseStaticFinalGetter(const Function& func); |
| 475 SequenceNode* ParseStaticInitializer(const Function& func); | 472 SequenceNode* ParseStaticInitializer(const Function& func); |
| 476 SequenceNode* ParseMethodExtractor(const Function& func); | 473 SequenceNode* ParseMethodExtractor(const Function& func); |
| 477 SequenceNode* ParseNoSuchMethodDispatcher(const Function& func, | 474 SequenceNode* ParseNoSuchMethodDispatcher(const Function& func, |
| 478 Array* default_values); | 475 Array* default_values); |
| 479 SequenceNode* ParseInvokeFieldDispatcher(const Function& func, | 476 SequenceNode* ParseInvokeFieldDispatcher(const Function& func, |
| 480 Array* default_values); | 477 Array* default_values); |
| 481 void BuildDispatcherScope(const Function& func, | 478 void BuildDispatcherScope(const Function& func, |
| 482 const ArgumentsDescriptor& desc, | 479 const ArgumentsDescriptor& desc, |
| 483 Array* default_values); | 480 Array* default_values); |
| 484 | 481 |
| 485 void ChainNewBlock(LocalScope* outer_scope); | 482 void ChainNewBlock(LocalScope* outer_scope); |
| 486 void OpenBlock(); | 483 void OpenBlock(); |
| 487 void OpenLoopBlock(); | 484 void OpenLoopBlock(); |
| 488 void OpenFunctionBlock(const Function& func); | 485 void OpenFunctionBlock(const Function& func); |
| 489 RawFunction* OpenAsyncFunction(intptr_t formal_param_pos); | |
| 490 SequenceNode* CloseBlock(); | 486 SequenceNode* CloseBlock(); |
| 491 SequenceNode* CloseAsyncFunction(const Function& closure, | |
| 492 SequenceNode* closure_node); | |
| 493 void CloseAsyncClosure(SequenceNode* body); | |
| 494 | |
| 495 | 487 |
| 496 LocalVariable* LookupPhaseParameter(); | 488 LocalVariable* LookupPhaseParameter(); |
| 497 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only); | 489 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only); |
| 498 LocalVariable* LookupTypeArgumentsParameter(LocalScope* from_scope, | 490 LocalVariable* LookupTypeArgumentsParameter(LocalScope* from_scope, |
| 499 bool test_only); | 491 bool test_only); |
| 500 void CaptureInstantiator(); | 492 void CaptureInstantiator(); |
| 501 AstNode* LoadReceiver(intptr_t token_pos); | 493 AstNode* LoadReceiver(intptr_t token_pos); |
| 502 AstNode* LoadTypeArgumentsParameter(intptr_t token_pos); | 494 AstNode* LoadTypeArgumentsParameter(intptr_t token_pos); |
| 503 AstNode* LoadFieldIfUnresolved(AstNode* node); | 495 AstNode* LoadFieldIfUnresolved(AstNode* node); |
| 504 AstNode* LoadClosure(PrimaryNode* primary); | 496 AstNode* LoadClosure(PrimaryNode* primary); |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 int16_t last_used_try_index_; | 732 int16_t last_used_try_index_; |
| 741 | 733 |
| 742 bool unregister_pending_function_; | 734 bool unregister_pending_function_; |
| 743 | 735 |
| 744 DISALLOW_COPY_AND_ASSIGN(Parser); | 736 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 745 }; | 737 }; |
| 746 | 738 |
| 747 } // namespace dart | 739 } // namespace dart |
| 748 | 740 |
| 749 #endif // VM_PARSER_H_ | 741 #endif // VM_PARSER_H_ |
| OLD | NEW |