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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 2793033005: Keep types in signatures of function types properly instantiated as the function (Closed)
Patch Set: Created 3 years, 8 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
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 46aeb72b2d2a968a766aca48655943621ce10861..cdc9455e217932125274e1d006756fc90d241f39 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2361,11 +2361,8 @@ void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) {
Value* closure_val = Bind(alloc);
{
LocalVariable* closure_tmp_var = EnterTempLocalScope(closure_val);
- // Store instantiator type arguments if scope class is generic.
- const Type& function_type = Type::ZoneHandle(Z, function.SignatureType());
- const Class& scope_cls = Class::ZoneHandle(Z, function_type.type_class());
- if (scope_cls.IsGeneric()) {
- ASSERT(function.Owner() == scope_cls.raw());
+ // Store instantiator type arguments if signature is uninstantiated.
+ if (!function.HasInstantiatedSignature(kClass)) {
Value* closure_tmp_val =
Bind(new (Z) LoadLocalInstr(*closure_tmp_var, node->token_pos()));
Value* type_arguments = BuildInstantiatorTypeArguments(node->token_pos());

Powered by Google App Engine
This is Rietveld 408576698