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

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

Issue 10368004: Properly set the element type of literal lists. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/lib/error.h ('k') | runtime/vm/code_generator.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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 }; 283 };
284 284
285 285
286 class ArrayNode : public AstNode { 286 class ArrayNode : public AstNode {
287 public: 287 public:
288 ArrayNode(intptr_t token_index, const AbstractTypeArguments& type_arguments) 288 ArrayNode(intptr_t token_index, const AbstractTypeArguments& type_arguments)
289 : AstNode(token_index), 289 : AstNode(token_index),
290 type_arguments_(type_arguments), 290 type_arguments_(type_arguments),
291 elements_(4) { 291 elements_(4) {
292 ASSERT(type_arguments_.IsZoneHandle()); 292 ASSERT(type_arguments_.IsZoneHandle());
293 ASSERT(type_arguments.IsNull() || type_arguments_.IsInstantiated());
294 } 293 }
295 294
296 void VisitChildren(AstNodeVisitor* visitor) const; 295 void VisitChildren(AstNodeVisitor* visitor) const;
297 296
298 intptr_t length() const { return elements_.length(); } 297 intptr_t length() const { return elements_.length(); }
299 298
300 AstNode* ElementAt(intptr_t index) const { return elements_[index]; } 299 AstNode* ElementAt(intptr_t index) const { return elements_[index]; }
301 void SetElementAt(intptr_t index, AstNode* value) { 300 void SetElementAt(intptr_t index, AstNode* value) {
302 elements_[index] = value; 301 elements_[index] = value;
303 } 302 }
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 const LocalVariable& context_var_; 1663 const LocalVariable& context_var_;
1665 1664
1666 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1665 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1667 }; 1666 };
1668 1667
1669 } // namespace dart 1668 } // namespace dart
1670 1669
1671 #undef DECLARE_COMMON_NODE_FUNCTIONS 1670 #undef DECLARE_COMMON_NODE_FUNCTIONS
1672 1671
1673 #endif // VM_AST_H_ 1672 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « runtime/lib/error.h ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698