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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 11788018: Recognize List.fixedLength factory constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index a7e52f8f3059f9f76461d865eaf23b1178883131..cba7f4c4e6a222d25ed8c55afd7ec005fa58aa28 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -1815,11 +1815,10 @@ static intptr_t GetResultCidOfConstructor(ConstructorCallNode* node) {
if (node->constructor().IsFactory()) {
if ((function_class.Name() == Symbols::List().raw()) &&
(function.name() == Symbols::ListFactory().raw())) {
- // If there are no arguments then the result is guaranteed to be a
- // GrowableObjectArray. However if there is an argument the result
- // is not guaranteed to be a fixed size array because the argument
- // can be null.
return kGrowableObjectArrayCid;
+ } else if ((function_class.Name() == Symbols::List().raw()) &&
+ (function.name() == Symbols::ListFixedLengthFactory().raw())) {
+ return kArrayCid;
} else {
if (IsRecognizedConstructor(function, Symbols::ObjectArray()) &&
(node->arguments()->length() == 1)) {
« no previous file with comments | « no previous file | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698