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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 9978014: Implement closure with type arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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/flow_graph_compiler_x64.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 6195)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -1187,11 +1187,14 @@
const Class& cls = Class::Handle(function.signature_class());
ASSERT(!cls.IsNull());
const bool requires_type_arguments = cls.HasTypeArguments();
+ Value* type_arguments = NULL;
if (requires_type_arguments) {
- Bailout("Closure creation requiring type arguments");
+ ASSERT(!function.IsImplicitStaticClosureFunction());
+ type_arguments =
+ BuildInstantiatorTypeArguments(node->token_index(), temp_index());
}
- CreateClosureComp* create = new CreateClosureComp(node);
+ CreateClosureComp* create = new CreateClosureComp(node, type_arguments);
ReturnComputation(create);
}
@@ -2073,7 +2076,12 @@
void FlowGraphPrinter::VisitCreateClosure(CreateClosureComp* comp) {
- OS::Print("CreateClosure(%s)", comp->function().ToCString());
+ OS::Print("CreateClosure(%s", comp->function().ToCString());
+ if (comp->type_arguments() != NULL) {
+ OS::Print(", ");
+ comp->type_arguments()->Accept(this);
+ }
+ OS::Print(")");
}
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698