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

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

Issue 26703002: Final variables induce a setter that throws NSME (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « 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 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 : AstNode(token_pos), field_(field) { 1108 : AstNode(token_pos), field_(field) {
1109 ASSERT(field_.IsZoneHandle()); 1109 ASSERT(field_.IsZoneHandle());
1110 } 1110 }
1111 1111
1112 const Field& field() const { return field_; } 1112 const Field& field() const { return field_; }
1113 1113
1114 virtual void VisitChildren(AstNodeVisitor* visitor) const { } 1114 virtual void VisitChildren(AstNodeVisitor* visitor) const { }
1115 1115
1116 virtual AstNode* MakeAssignmentNode(AstNode* rhs); 1116 virtual AstNode* MakeAssignmentNode(AstNode* rhs);
1117 1117
1118 virtual bool IsPotentiallyConst() const {
1119 return field_.is_const();
1120 }
1121
1118 virtual const Instance* EvalConstExpr() const { 1122 virtual const Instance* EvalConstExpr() const {
1119 ASSERT(field_.is_static()); 1123 ASSERT(field_.is_static());
1120 return field_.is_const() ? &Instance::ZoneHandle(field_.value()) : NULL; 1124 return field_.is_const() ? &Instance::ZoneHandle(field_.value()) : NULL;
1121 } 1125 }
1122 1126
1123 DECLARE_COMMON_NODE_FUNCTIONS(LoadStaticFieldNode); 1127 DECLARE_COMMON_NODE_FUNCTIONS(LoadStaticFieldNode);
1124 1128
1125 private: 1129 private:
1126 const Field& field_; 1130 const Field& field_;
1127 1131
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 const intptr_t try_index_; 1757 const intptr_t try_index_;
1754 1758
1755 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1759 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1756 }; 1760 };
1757 1761
1758 } // namespace dart 1762 } // namespace dart
1759 1763
1760 #undef DECLARE_COMMON_NODE_FUNCTIONS 1764 #undef DECLARE_COMMON_NODE_FUNCTIONS
1761 1765
1762 #endif // VM_AST_H_ 1766 #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