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

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: added comment and sync 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
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/object.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 a0117588de04c408b256db0ad1617848580852d8..1d07093e5810947472f8e144ce40c890851e951f 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2344,11 +2344,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(kCurrentClass)) {
Value* closure_tmp_val =
Bind(new (Z) LoadLocalInstr(*closure_tmp_var, node->token_pos()));
Value* type_arguments = BuildInstantiatorTypeArguments(node->token_pos());
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698