| 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 "vm/ast.h" | 10 #include "vm/ast.h" |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 SequenceNode* ParseStaticConstGetter(const Function& func); | 358 SequenceNode* ParseStaticConstGetter(const Function& func); |
| 359 | 359 |
| 360 void ChainNewBlock(LocalScope* outer_scope); | 360 void ChainNewBlock(LocalScope* outer_scope); |
| 361 void OpenBlock(); | 361 void OpenBlock(); |
| 362 void OpenLoopBlock(); | 362 void OpenLoopBlock(); |
| 363 void OpenFunctionBlock(const Function& func); | 363 void OpenFunctionBlock(const Function& func); |
| 364 SequenceNode* CloseBlock(); | 364 SequenceNode* CloseBlock(); |
| 365 | 365 |
| 366 LocalVariable* LookupPhaseParameter(); | 366 LocalVariable* LookupPhaseParameter(); |
| 367 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only); | 367 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only); |
| 368 void CaptureReceiver(); | 368 LocalVariable* LookupTypeArgumentsParameter(LocalScope* from_scope, |
| 369 bool test_only); |
| 370 void CaptureInstantiator(); |
| 369 AstNode* LoadReceiver(intptr_t token_pos); | 371 AstNode* LoadReceiver(intptr_t token_pos); |
| 372 AstNode* LoadTypeArgumentsParameter(intptr_t token_pos); |
| 370 AstNode* LoadFieldIfUnresolved(AstNode* node); | 373 AstNode* LoadFieldIfUnresolved(AstNode* node); |
| 371 AstNode* LoadClosure(PrimaryNode* primary); | 374 AstNode* LoadClosure(PrimaryNode* primary); |
| 372 AstNode* CallGetter(intptr_t token_pos, AstNode* object, const String& name); | 375 AstNode* CallGetter(intptr_t token_pos, AstNode* object, const String& name); |
| 373 | 376 |
| 374 AstNode* ParseAssertStatement(); | 377 AstNode* ParseAssertStatement(); |
| 375 AstNode* ParseJump(String* label_name); | 378 AstNode* ParseJump(String* label_name); |
| 376 AstNode* ParseIfStatement(String* label_name); | 379 AstNode* ParseIfStatement(String* label_name); |
| 377 AstNode* ParseWhileStatement(String* label_name); | 380 AstNode* ParseWhileStatement(String* label_name); |
| 378 AstNode* ParseDoWhileStatement(String* label_name); | 381 AstNode* ParseDoWhileStatement(String* label_name); |
| 379 AstNode* ParseForStatement(String* label_name); | 382 AstNode* ParseForStatement(String* label_name); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 AstNode* ParseClosureCall(AstNode* closure); | 460 AstNode* ParseClosureCall(AstNode* closure); |
| 458 AstNode* GenerateStaticFieldLookup(const Field& field, | 461 AstNode* GenerateStaticFieldLookup(const Field& field, |
| 459 intptr_t ident_pos); | 462 intptr_t ident_pos); |
| 460 AstNode* ParseStaticFieldAccess(const Class& cls, | 463 AstNode* ParseStaticFieldAccess(const Class& cls, |
| 461 const String& field_name, | 464 const String& field_name, |
| 462 intptr_t ident_pos, | 465 intptr_t ident_pos, |
| 463 bool consume_cascades); | 466 bool consume_cascades); |
| 464 | 467 |
| 465 LocalVariable* LookupLocalScope(const String& ident); | 468 LocalVariable* LookupLocalScope(const String& ident); |
| 466 void CheckInstanceFieldAccess(intptr_t field_pos, const String& field_name); | 469 void CheckInstanceFieldAccess(intptr_t field_pos, const String& field_name); |
| 467 RawClass* TypeParametersScopeClass(); | 470 RawClass* TypeParametersScopeClass() const; |
| 471 const Type* ReceiverType(intptr_t type_pos) const; |
| 468 bool IsInstantiatorRequired() const; | 472 bool IsInstantiatorRequired() const; |
| 469 bool IsDefinedInLexicalScope(const String& ident); | 473 bool IsDefinedInLexicalScope(const String& ident); |
| 470 bool ResolveIdentInLocalScope(intptr_t ident_pos, | 474 bool ResolveIdentInLocalScope(intptr_t ident_pos, |
| 471 const String &ident, | 475 const String &ident, |
| 472 AstNode** node); | 476 AstNode** node); |
| 473 static const bool kResolveLocally = true; | 477 static const bool kResolveLocally = true; |
| 474 static const bool kResolveIncludingImports = false; | 478 static const bool kResolveIncludingImports = false; |
| 475 AstNode* ResolveIdentInLibraryScope(const Library& lib, | 479 AstNode* ResolveIdentInLibraryScope(const Library& lib, |
| 476 const QualIdent& qual_ident, | 480 const QualIdent& qual_ident, |
| 477 bool resolve_locally); | 481 bool resolve_locally); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 | 567 |
| 564 // Allocate temporary only once per function. | 568 // Allocate temporary only once per function. |
| 565 LocalVariable* expression_temp_; | 569 LocalVariable* expression_temp_; |
| 566 | 570 |
| 567 DISALLOW_COPY_AND_ASSIGN(Parser); | 571 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 568 }; | 572 }; |
| 569 | 573 |
| 570 } // namespace dart | 574 } // namespace dart |
| 571 | 575 |
| 572 #endif // VM_PARSER_H_ | 576 #endif // VM_PARSER_H_ |
| OLD | NEW |