| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 void SkipNewOperator(); | 284 void SkipNewOperator(); |
| 285 void SkipActualParameters(); | 285 void SkipActualParameters(); |
| 286 void SkipMapLiteral(); | 286 void SkipMapLiteral(); |
| 287 void SkipListLiteral(); | 287 void SkipListLiteral(); |
| 288 void SkipFunctionLiteral(); | 288 void SkipFunctionLiteral(); |
| 289 void SkipStringLiteral(); | 289 void SkipStringLiteral(); |
| 290 void SkipQualIdent(); | 290 void SkipQualIdent(); |
| 291 void SkipFunctionPreamble(); | 291 void SkipFunctionPreamble(); |
| 292 | 292 |
| 293 void CheckConstructorCallTypeArguments(intptr_t pos, | 293 void CheckConstructorCallTypeArguments(intptr_t pos, |
| 294 Function& constructor, | 294 const Function& constructor, |
| 295 const TypeArguments& type_arguments); | 295 const TypeArguments& type_arguments); |
| 296 | 296 |
| 297 // A null script means no source and a negative token_pos means no position. | 297 // A null script means no source and a negative token_pos means no position. |
| 298 static RawString* FormatMessage(const Script& script, | 298 static RawString* FormatMessage(const Script& script, |
| 299 intptr_t token_pos, | 299 intptr_t token_pos, |
| 300 LanguageError::Kind kind, | 300 LanguageError::Kind kind, |
| 301 const char* format, | 301 const char* format, |
| 302 va_list args); | 302 va_list args); |
| 303 | 303 |
| 304 // Reports error/warning msg at location of current token in current script. | 304 // Reports error/warning msg at location of current token in current script. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 const String& name, | 429 const String& name, |
| 430 ArgumentListNode* arguments, | 430 ArgumentListNode* arguments, |
| 431 bool resolve_getter, | 431 bool resolve_getter, |
| 432 bool* is_no_such_method); | 432 bool* is_no_such_method); |
| 433 AstNode* ParseSuperCall(const String& function_name); | 433 AstNode* ParseSuperCall(const String& function_name); |
| 434 AstNode* ParseSuperFieldAccess(const String& field_name, intptr_t field_pos); | 434 AstNode* ParseSuperFieldAccess(const String& field_name, intptr_t field_pos); |
| 435 AstNode* ParseSuperOperator(); | 435 AstNode* ParseSuperOperator(); |
| 436 AstNode* BuildUnarySuperOperator(Token::Kind op, PrimaryNode* super); | 436 AstNode* BuildUnarySuperOperator(Token::Kind op, PrimaryNode* super); |
| 437 | 437 |
| 438 static void SetupDefaultsForOptionalParams(const ParamList* params, | 438 static void SetupDefaultsForOptionalParams(const ParamList* params, |
| 439 Array& default_values); | 439 Array* default_values); |
| 440 ClosureNode* CreateImplicitClosureNode(const Function& func, | 440 ClosureNode* CreateImplicitClosureNode(const Function& func, |
| 441 intptr_t token_pos, | 441 intptr_t token_pos, |
| 442 AstNode* receiver); | 442 AstNode* receiver); |
| 443 static void AddFormalParamsToFunction(const ParamList* params, | 443 static void AddFormalParamsToFunction(const ParamList* params, |
| 444 const Function& func); | 444 const Function& func); |
| 445 void AddFormalParamsToScope(const ParamList* params, LocalScope* scope); | 445 void AddFormalParamsToScope(const ParamList* params, LocalScope* scope); |
| 446 | 446 |
| 447 SequenceNode* ParseConstructor(const Function& func, | 447 SequenceNode* ParseConstructor(const Function& func, |
| 448 Array& default_parameter_values); | 448 Array* default_parameter_values); |
| 449 SequenceNode* ParseFunc(const Function& func, | 449 SequenceNode* ParseFunc(const Function& func, |
| 450 Array& default_parameter_values); | 450 Array* default_parameter_values); |
| 451 | 451 |
| 452 void ParseNativeFunctionBlock(const ParamList* params, const Function& func); | 452 void ParseNativeFunctionBlock(const ParamList* params, const Function& func); |
| 453 | 453 |
| 454 SequenceNode* ParseInstanceGetter(const Function& func); | 454 SequenceNode* ParseInstanceGetter(const Function& func); |
| 455 SequenceNode* ParseInstanceSetter(const Function& func); | 455 SequenceNode* ParseInstanceSetter(const Function& func); |
| 456 SequenceNode* ParseStaticFinalGetter(const Function& func); | 456 SequenceNode* ParseStaticFinalGetter(const Function& func); |
| 457 SequenceNode* ParseStaticInitializer(const Function& func); | 457 SequenceNode* ParseStaticInitializer(const Function& func); |
| 458 SequenceNode* ParseMethodExtractor(const Function& func); | 458 SequenceNode* ParseMethodExtractor(const Function& func); |
| 459 SequenceNode* ParseNoSuchMethodDispatcher(const Function& func, | 459 SequenceNode* ParseNoSuchMethodDispatcher(const Function& func, |
| 460 Array& default_values); | 460 Array* default_values); |
| 461 SequenceNode* ParseInvokeFieldDispatcher(const Function& func, | 461 SequenceNode* ParseInvokeFieldDispatcher(const Function& func, |
| 462 Array& default_values); | 462 Array* default_values); |
| 463 void BuildDispatcherScope(const Function& func, | 463 void BuildDispatcherScope(const Function& func, |
| 464 const ArgumentsDescriptor& desc, | 464 const ArgumentsDescriptor& desc, |
| 465 Array& default_values); | 465 Array* default_values); |
| 466 | 466 |
| 467 void ChainNewBlock(LocalScope* outer_scope); | 467 void ChainNewBlock(LocalScope* outer_scope); |
| 468 void OpenBlock(); | 468 void OpenBlock(); |
| 469 void OpenLoopBlock(); | 469 void OpenLoopBlock(); |
| 470 void OpenFunctionBlock(const Function& func); | 470 void OpenFunctionBlock(const Function& func); |
| 471 SequenceNode* CloseBlock(); | 471 SequenceNode* CloseBlock(); |
| 472 | 472 |
| 473 LocalVariable* LookupPhaseParameter(); | 473 LocalVariable* LookupPhaseParameter(); |
| 474 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only); | 474 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only); |
| 475 LocalVariable* LookupTypeArgumentsParameter(LocalScope* from_scope, | 475 LocalVariable* LookupTypeArgumentsParameter(LocalScope* from_scope, |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 intptr_t last_used_try_index_; | 720 intptr_t last_used_try_index_; |
| 721 | 721 |
| 722 bool unregister_pending_function_; | 722 bool unregister_pending_function_; |
| 723 | 723 |
| 724 DISALLOW_COPY_AND_ASSIGN(Parser); | 724 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 725 }; | 725 }; |
| 726 | 726 |
| 727 } // namespace dart | 727 } // namespace dart |
| 728 | 728 |
| 729 #endif // VM_PARSER_H_ | 729 #endif // VM_PARSER_H_ |
| OLD | NEW |