| Index: runtime/vm/flow_graph_builder.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_builder.cc (revision 24832)
|
| +++ runtime/vm/flow_graph_builder.cc (working copy)
|
| @@ -854,7 +854,18 @@
|
|
|
|
|
| void ValueGraphVisitor::VisitTypeNode(TypeNode* node) {
|
| - ReturnDefinition(new ConstantInstr(node->type()));
|
| + const AbstractType& type = node->type();
|
| + ASSERT(type.IsFinalized() && !type.IsMalformed());
|
| + if (type.IsInstantiated()) {
|
| + ReturnDefinition(new ConstantInstr(type));
|
| + } else {
|
| + const Class& instantiator_class = Class::ZoneHandle(
|
| + owner()->parsed_function()->function().Owner());
|
| + Value* instantiator_value = BuildInstantiatorTypeArguments(
|
| + node->token_pos(), instantiator_class, NULL);
|
| + ReturnDefinition(new InstantiateTypeInstr(
|
| + node->token_pos(), type, instantiator_class, instantiator_value));
|
| + }
|
| }
|
|
|
|
|
|
|