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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 15960009: Streamline IL for instantiating type arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 23201)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -2299,10 +2299,16 @@
owner()->parsed_function().function().Owner());
Value* instantiator_value =
BuildInstantiatorTypeArguments(token_pos, instantiator_class, NULL);
- return Bind(new InstantiateTypeArgumentsInstr(token_pos,
- type_arguments,
- instantiator_class,
- instantiator_value));
+ const bool use_instantiator_type_args =
+ type_arguments.IsUninstantiatedIdentity() ||
Kevin Millikin (Google) 2013/05/27 09:22:03 This predicate or its negation appears over and ov
Florian Schneider 2013/05/27 10:20:11 Possibly. I don't have a really good name for such
+ type_arguments.CanShareInstantiatorTypeArguments(
+ instantiator_class);
+ return use_instantiator_type_args
+ ? instantiator_value
+ : Bind(new InstantiateTypeArgumentsInstr(token_pos,
+ type_arguments,
+ instantiator_class,
+ instantiator_value));
}
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698