| 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 "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 80 } |
| 81 | 81 |
| 82 LocalVariable* saved_entry_context_var() const { | 82 LocalVariable* saved_entry_context_var() const { |
| 83 return saved_entry_context_var_; | 83 return saved_entry_context_var_; |
| 84 } | 84 } |
| 85 void set_saved_entry_context_var(LocalVariable* saved_entry_context_var) { | 85 void set_saved_entry_context_var(LocalVariable* saved_entry_context_var) { |
| 86 ASSERT(saved_entry_context_var != NULL); | 86 ASSERT(saved_entry_context_var != NULL); |
| 87 saved_entry_context_var_ = saved_entry_context_var; | 87 saved_entry_context_var_ = saved_entry_context_var; |
| 88 } | 88 } |
| 89 | 89 |
| 90 // Returns NULL if this function does not save the arguments descriptor on | |
| 91 // entry. | |
| 92 LocalVariable* GetSavedArgumentsDescriptorVar() const; | |
| 93 | |
| 94 LocalVariable* expression_temp_var() const { | 90 LocalVariable* expression_temp_var() const { |
| 95 ASSERT(has_expression_temp_var()); | 91 ASSERT(has_expression_temp_var()); |
| 96 return expression_temp_var_; | 92 return expression_temp_var_; |
| 97 } | 93 } |
| 98 void set_expression_temp_var(LocalVariable* value) { | 94 void set_expression_temp_var(LocalVariable* value) { |
| 99 ASSERT(!has_expression_temp_var()); | 95 ASSERT(!has_expression_temp_var()); |
| 100 expression_temp_var_ = value; | 96 expression_temp_var_ = value; |
| 101 } | 97 } |
| 102 bool has_expression_temp_var() const { | 98 bool has_expression_temp_var() const { |
| 103 return expression_temp_var_ != NULL; | 99 return expression_temp_var_ != NULL; |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 AstNode* ParseStringLiteral(); | 522 AstNode* ParseStringLiteral(); |
| 527 String* ParseImportStringLiteral(); | 523 String* ParseImportStringLiteral(); |
| 528 AstNode* ParseCompoundLiteral(); | 524 AstNode* ParseCompoundLiteral(); |
| 529 AstNode* ParseListLiteral(intptr_t type_pos, | 525 AstNode* ParseListLiteral(intptr_t type_pos, |
| 530 bool is_const, | 526 bool is_const, |
| 531 const AbstractTypeArguments& type_arguments); | 527 const AbstractTypeArguments& type_arguments); |
| 532 AstNode* ParseMapLiteral(intptr_t type_pos, | 528 AstNode* ParseMapLiteral(intptr_t type_pos, |
| 533 bool is_const, | 529 bool is_const, |
| 534 const AbstractTypeArguments& type_arguments); | 530 const AbstractTypeArguments& type_arguments); |
| 535 AstNode* ParseNewOperator(Token::Kind op_kind); | 531 AstNode* ParseNewOperator(Token::Kind op_kind); |
| 536 AstNode* ParseArgumentDefinitionTest(); | |
| 537 | 532 |
| 538 // An implicit argument, if non-null, is prepended to the returned list. | 533 // An implicit argument, if non-null, is prepended to the returned list. |
| 539 ArgumentListNode* ParseActualParameters(ArgumentListNode* implicit_arguments, | 534 ArgumentListNode* ParseActualParameters(ArgumentListNode* implicit_arguments, |
| 540 bool require_const); | 535 bool require_const); |
| 541 AstNode* ParseStaticCall(const Class& cls, | 536 AstNode* ParseStaticCall(const Class& cls, |
| 542 const String& method_name, | 537 const String& method_name, |
| 543 intptr_t ident_pos); | 538 intptr_t ident_pos); |
| 544 AstNode* ParseInstanceCall(AstNode* receiver, const String& method_name); | 539 AstNode* ParseInstanceCall(AstNode* receiver, const String& method_name); |
| 545 AstNode* ParseClosureCall(AstNode* closure); | 540 AstNode* ParseClosureCall(AstNode* closure); |
| 546 AstNode* GenerateStaticFieldLookup(const Field& field, | 541 AstNode* GenerateStaticFieldLookup(const Field& field, |
| 547 intptr_t ident_pos); | 542 intptr_t ident_pos); |
| 548 AstNode* ParseStaticFieldAccess(const Class& cls, | 543 AstNode* ParseStaticFieldAccess(const Class& cls, |
| 549 const String& field_name, | 544 const String& field_name, |
| 550 intptr_t ident_pos, | 545 intptr_t ident_pos, |
| 551 bool consume_cascades); | 546 bool consume_cascades); |
| 552 | 547 |
| 553 LocalVariable* LookupLocalScope(const String& ident); | 548 LocalVariable* LookupLocalScope(const String& ident); |
| 554 bool IsFormalParameter(const String& ident, | |
| 555 Function* owner_function, | |
| 556 LocalScope** owner_scope, | |
| 557 intptr_t* local_index); | |
| 558 void CheckInstanceFieldAccess(intptr_t field_pos, const String& field_name); | 549 void CheckInstanceFieldAccess(intptr_t field_pos, const String& field_name); |
| 559 bool ParsingStaticMember() const; | 550 bool ParsingStaticMember() const; |
| 560 const Type* ReceiverType(intptr_t type_pos) const; | 551 const Type* ReceiverType(intptr_t type_pos) const; |
| 561 bool IsInstantiatorRequired() const; | 552 bool IsInstantiatorRequired() const; |
| 562 bool ResolveIdentInLocalScope(intptr_t ident_pos, | 553 bool ResolveIdentInLocalScope(intptr_t ident_pos, |
| 563 const String &ident, | 554 const String &ident, |
| 564 AstNode** node); | 555 AstNode** node); |
| 565 static const bool kResolveLocally = true; | 556 static const bool kResolveLocally = true; |
| 566 static const bool kResolveIncludingImports = false; | 557 static const bool kResolveIncludingImports = false; |
| 567 | 558 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 // code at all points in the try block where an exit from the block is | 677 // code at all points in the try block where an exit from the block is |
| 687 // done using 'return', 'break' or 'continue' statements. | 678 // done using 'return', 'break' or 'continue' statements. |
| 688 TryBlocks* try_blocks_list_; | 679 TryBlocks* try_blocks_list_; |
| 689 | 680 |
| 690 DISALLOW_COPY_AND_ASSIGN(Parser); | 681 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 691 }; | 682 }; |
| 692 | 683 |
| 693 } // namespace dart | 684 } // namespace dart |
| 694 | 685 |
| 695 #endif // VM_PARSER_H_ | 686 #endif // VM_PARSER_H_ |
| OLD | NEW |