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

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

Issue 11265047: Implement const expressions for local variables (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/ast.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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 const LocalVariable& local() const { return local_; } 957 const LocalVariable& local() const { return local_; }
958 AstNode* pseudo() const { return pseudo_; } // Can be NULL. 958 AstNode* pseudo() const { return pseudo_; } // Can be NULL.
959 bool HasPseudo() const { return pseudo_ != NULL; } 959 bool HasPseudo() const { return pseudo_ != NULL; }
960 960
961 virtual void VisitChildren(AstNodeVisitor* visitor) const { 961 virtual void VisitChildren(AstNodeVisitor* visitor) const {
962 if (HasPseudo()) { 962 if (HasPseudo()) {
963 pseudo()->Visit(visitor); 963 pseudo()->Visit(visitor);
964 } 964 }
965 } 965 }
966 966
967 virtual const Instance* EvalConstExpr() const;
967 virtual AstNode* MakeAssignmentNode(AstNode* rhs); 968 virtual AstNode* MakeAssignmentNode(AstNode* rhs);
968 969
969 DECLARE_COMMON_NODE_FUNCTIONS(LoadLocalNode); 970 DECLARE_COMMON_NODE_FUNCTIONS(LoadLocalNode);
970 971
971 private: 972 private:
972 const LocalVariable& local_; 973 const LocalVariable& local_;
973 AstNode* pseudo_; 974 AstNode* pseudo_;
974 975
975 DISALLOW_IMPLICIT_CONSTRUCTORS(LoadLocalNode); 976 DISALLOW_IMPLICIT_CONSTRUCTORS(LoadLocalNode);
976 }; 977 };
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 const LocalVariable& context_var_; 1704 const LocalVariable& context_var_;
1704 1705
1705 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1706 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1706 }; 1707 };
1707 1708
1708 } // namespace dart 1709 } // namespace dart
1709 1710
1710 #undef DECLARE_COMMON_NODE_FUNCTIONS 1711 #undef DECLARE_COMMON_NODE_FUNCTIONS
1711 1712
1712 #endif // VM_AST_H_ 1713 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698