Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: runtime/vm/parser.h

Issue 18801007: Support type parameters and classes as expression in the vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 Token::Kind binary_op, 591 Token::Kind binary_op,
592 AstNode* lhs, 592 AstNode* lhs,
593 AstNode* rhs); 593 AstNode* rhs);
594 AstNode* ExpandAssignableOp(intptr_t op_pos, 594 AstNode* ExpandAssignableOp(intptr_t op_pos,
595 Token::Kind assignment_op, 595 Token::Kind assignment_op,
596 AstNode* lhs, 596 AstNode* lhs,
597 AstNode* rhs); 597 AstNode* rhs);
598 LetNode* PrepareCompoundAssignmentNodes(AstNode** expr); 598 LetNode* PrepareCompoundAssignmentNodes(AstNode** expr);
599 LocalVariable* CreateTempConstVariable(intptr_t token_pos, const char* s); 599 LocalVariable* CreateTempConstVariable(intptr_t token_pos, const char* s);
600 600
601 static bool IsAssignableExpr(AstNode* expr);
602
603 static SequenceNode* NodeAsSequenceNode(intptr_t sequence_pos, 601 static SequenceNode* NodeAsSequenceNode(intptr_t sequence_pos,
604 AstNode* node, 602 AstNode* node,
605 LocalScope* scope); 603 LocalScope* scope);
606 604
607 SequenceNode* MakeImplicitConstructor(const Function& func); 605 SequenceNode* MakeImplicitConstructor(const Function& func);
608 AstNode* MakeStaticCall(const String& cls_name, 606 AstNode* MakeStaticCall(const String& cls_name,
609 const String& func_name, 607 const String& func_name,
610 ArgumentListNode* arguments); 608 ArgumentListNode* arguments);
611 String& Interpolate(const GrowableArray<AstNode*>& values); 609 String& Interpolate(const GrowableArray<AstNode*>& values);
612 AstNode* MakeAssertCall(intptr_t begin, intptr_t end); 610 AstNode* MakeAssertCall(intptr_t begin, intptr_t end);
613 AstNode* ThrowTypeError(intptr_t type_pos, const AbstractType& type); 611 AstNode* ThrowTypeError(intptr_t type_pos, const AbstractType& type);
614 AstNode* ThrowNoSuchMethodError(intptr_t call_pos, 612 AstNode* ThrowNoSuchMethodError(intptr_t call_pos,
615 const Class& cls, 613 const Class& cls,
616 const String& function_name, 614 const String& function_name,
617 InvocationMirror::Call call, 615 InvocationMirror::Call call,
618 InvocationMirror::Type type); 616 InvocationMirror::Type type);
619 617
620 void CheckOperatorArity(const MemberDesc& member); 618 void CheckOperatorArity(const MemberDesc& member);
621 619
622 void EnsureExpressionTemp(); 620 void EnsureExpressionTemp();
623 void EnsureSavedCurrentContext(); 621 void EnsureSavedCurrentContext();
624 AstNode* CreateAssignmentNode(AstNode* original, AstNode* rhs); 622 AstNode* CreateAssignmentNode(AstNode* original,
623 AstNode* rhs,
624 const String* left_ident,
625 intptr_t left_pos);
625 AstNode* InsertClosureCallNodes(AstNode* condition); 626 AstNode* InsertClosureCallNodes(AstNode* condition);
626 627
627 ConstructorCallNode* CreateConstructorCallNode( 628 ConstructorCallNode* CreateConstructorCallNode(
628 intptr_t token_pos, 629 intptr_t token_pos,
629 const AbstractTypeArguments& type_arguments, 630 const AbstractTypeArguments& type_arguments,
630 const Function& constructor, 631 const Function& constructor,
631 ArgumentListNode* arguments); 632 ArgumentListNode* arguments);
632 633
633 RawInstance* TryCanonicalize(const Instance& instance, intptr_t token_pos); 634 RawInstance* TryCanonicalize(const Instance& instance, intptr_t token_pos);
634 635
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 // code at all points in the try block where an exit from the block is 678 // code at all points in the try block where an exit from the block is
678 // done using 'return', 'break' or 'continue' statements. 679 // done using 'return', 'break' or 'continue' statements.
679 TryBlocks* try_blocks_list_; 680 TryBlocks* try_blocks_list_;
680 681
681 DISALLOW_COPY_AND_ASSIGN(Parser); 682 DISALLOW_COPY_AND_ASSIGN(Parser);
682 }; 683 };
683 684
684 } // namespace dart 685 } // namespace dart
685 686
686 #endif // VM_PARSER_H_ 687 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698