Index: pkg/compiler/lib/src/ssa/builder.dart |
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart |
index bfa55fe0d41a79d2524d69c94d912ac61d91abea..fc906e54b72041bc7853c3a43711ad8d5e8f1c8a 100644 |
--- a/pkg/compiler/lib/src/ssa/builder.dart |
+++ b/pkg/compiler/lib/src/ssa/builder.dart |
@@ -3107,9 +3107,7 @@ class SsaBuilder extends NewResolvedVisitor { |
push(new HForeignNew(closureClassElement, type, capturedVariables)); |
Element methodElement = nestedClosureData.closureElement; |
- if (compiler.backend.methodNeedsRti(methodElement)) { |
- registry.registerClosureWithFreeTypeVariables(methodElement); |
- } |
+ registry.registerInstantiatedClosure(methodElement); |
} |
visitFunctionDeclaration(ast.FunctionDeclaration node) { |