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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 10905233: Whenever possible use length passed to the List constructor for bounds checks instead of loading it… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address Srdjan's comments Created 8 years, 3 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/intermediate_language.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 927ee050ef0c1d2a26ff190836777ab951b7e3fa..4a66bdd661fe7d4217cb7f7cb0859e13a70fcb3d 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -1687,7 +1687,9 @@ void EffectGraphVisitor::VisitConstructorCallNode(ConstructorCallNode* node) {
node->arguments()->names(),
arguments);
// List factories return kArrayCid or kGrowableObjectArrayCid.
- call->set_result_cid(GetResultCidOfConstructor(node));
+ const intptr_t result_cid = GetResultCidOfConstructor(node);
+ call->set_result_cid(result_cid);
+ call->set_is_known_constructor(result_cid != kDynamicCid);
ReturnDefinition(call);
return;
}
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698