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

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

Issue 11342027: Handle super call to unary operators (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « no previous file | runtime/vm/flow_graph_builder.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_AST_H_ 5 #ifndef VM_AST_H_
6 #define VM_AST_H_ 6 #define VM_AST_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 // field access nodes. 451 // field access nodes.
452 class PrimaryNode : public AstNode { 452 class PrimaryNode : public AstNode {
453 public: 453 public:
454 PrimaryNode(intptr_t token_pos, const Object& primary) 454 PrimaryNode(intptr_t token_pos, const Object& primary)
455 : AstNode(token_pos), primary_(primary) { 455 : AstNode(token_pos), primary_(primary) {
456 ASSERT(primary_.IsZoneHandle()); 456 ASSERT(primary_.IsZoneHandle());
457 } 457 }
458 458
459 const Object& primary() const { return primary_; } 459 const Object& primary() const { return primary_; }
460 460
461 bool IsSuper() const {
462 return primary().IsString() && (primary().raw() == Symbols::Super());
463 }
464
461 virtual void VisitChildren(AstNodeVisitor* visitor) const; 465 virtual void VisitChildren(AstNodeVisitor* visitor) const;
462 466
463 DECLARE_COMMON_NODE_FUNCTIONS(PrimaryNode); 467 DECLARE_COMMON_NODE_FUNCTIONS(PrimaryNode);
464 468
465 private: 469 private:
466 const Object& primary_; 470 const Object& primary_;
467 471
468 DISALLOW_IMPLICIT_CONSTRUCTORS(PrimaryNode); 472 DISALLOW_IMPLICIT_CONSTRUCTORS(PrimaryNode);
469 }; 473 };
470 474
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 const LocalVariable& context_var_; 1714 const LocalVariable& context_var_;
1711 1715
1712 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1716 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1713 }; 1717 };
1714 1718
1715 } // namespace dart 1719 } // namespace dart
1716 1720
1717 #undef DECLARE_COMMON_NODE_FUNCTIONS 1721 #undef DECLARE_COMMON_NODE_FUNCTIONS
1718 1722
1719 #endif // VM_AST_H_ 1723 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698