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

Unified Diff: runtime/vm/ast.h

Issue 10878042: Propagate type of list literal from parser to ast, graph, and optimizer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | runtime/vm/object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
===================================================================
--- runtime/vm/ast.h (revision 11283)
+++ runtime/vm/ast.h (working copy)
@@ -246,11 +246,13 @@
class ArrayNode : public AstNode {
public:
- ArrayNode(intptr_t token_pos, const AbstractTypeArguments& type_arguments)
+ ArrayNode(intptr_t token_pos, const AbstractType& type)
: AstNode(token_pos),
- type_arguments_(type_arguments),
- elements_(4) {
- ASSERT(type_arguments_.IsZoneHandle());
+ type_(type),
+ elements_() {
+ ASSERT(type_.IsZoneHandle());
+ ASSERT(!type_.IsNull());
+ ASSERT(type_.IsFinalized());
}
void VisitChildren(AstNodeVisitor* visitor) const;
@@ -263,14 +265,12 @@
}
void AddElement(AstNode* expr) { elements_.Add(expr); }
- const AbstractTypeArguments& type_arguments() const {
- return type_arguments_;
- }
+ const AbstractType& type() const { return type_; }
DECLARE_COMMON_NODE_FUNCTIONS(ArrayNode);
private:
- const AbstractTypeArguments& type_arguments_;
+ const AbstractType& type_;
GrowableArray<AstNode*> elements_;
DISALLOW_IMPLICIT_CONSTRUCTORS(ArrayNode);
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698