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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 7 years, 10 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
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 33fad69afca7109c49c68967186f8a48629d4fd8..96d82a53b6035bdbfd1311bc1260602049ba38b3 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2005,9 +2005,9 @@ static intptr_t GetResultCidOfConstructor(ConstructorCallNode* node) {
if (node->constructor().IsFactory()) {
if ((function_class.Name() == Symbols::List().raw()) &&
(function.name() == Symbols::ListFactory().raw())) {
- return kGrowableObjectArrayCid;
- } else if ((function_class.Name() == Symbols::List().raw()) &&
- (function.name() == Symbols::ListFixedLengthFactory().raw())) {
+ if (node->arguments()->length() == 0) {
Florian Schneider 2013/02/27 12:26:55 style suggestion: return (node->arguments()->leng
+ return kGrowableObjectArrayCid;
+ }
return kArrayCid;
} else {
if (IsRecognizedConstructor(function, Symbols::ObjectArray()) &&

Powered by Google App Engine
This is Rietveld 408576698