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

Unified Diff: runtime/vm/intermediate_language.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 | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 11328)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -1342,15 +1342,20 @@
CreateArrayComp(intptr_t token_pos,
intptr_t try_index,
ZoneGrowableArray<PushArgumentInstr*>* arguments,
+ const AbstractType& type,
Value* element_type)
: token_pos_(token_pos),
try_index_(try_index),
- arguments_(arguments) {
+ arguments_(arguments),
+ type_(type) {
#if defined(DEBUG)
for (int i = 0; i < ArgumentCount(); ++i) {
ASSERT(ArgumentAt(i) != NULL);
}
ASSERT(element_type != NULL);
+ ASSERT(type_.IsZoneHandle());
+ ASSERT(!type_.IsNull());
+ ASSERT(type_.IsFinalized());
#endif
inputs_[0] = element_type;
}
@@ -1362,6 +1367,7 @@
intptr_t token_pos() const { return token_pos_; }
intptr_t try_index() const { return try_index_; }
PushArgumentInstr* ArgumentAt(intptr_t i) const { return (*arguments_)[i]; }
+ const AbstractType& type() const { return type_; }
Value* element_type() const { return inputs_[0]; }
virtual void PrintOperandsTo(BufferFormatter* f) const;
@@ -1372,6 +1378,7 @@
const intptr_t token_pos_;
const intptr_t try_index_;
ZoneGrowableArray<PushArgumentInstr*>* const arguments_;
+ const AbstractType& type_;
DISALLOW_COPY_AND_ASSIGN(CreateArrayComp);
};
@@ -1491,6 +1498,7 @@
: token_pos_(token_pos),
try_index_(try_index),
type_arguments_(type_arguments) {
+ ASSERT(type_arguments.IsZoneHandle());
ASSERT(instantiator != NULL);
inputs_[0] = instantiator;
}
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698