Index: dart/pkg/compiler/lib/src/js_backend/backend.dart |
diff --git a/dart/pkg/compiler/lib/src/js_backend/backend.dart b/dart/pkg/compiler/lib/src/js_backend/backend.dart |
index 49e67c160181e26cd4598f109ac98d4e06392789..d6932e56cbd7d72fc8e13a556d07016b8f17c963 100644 |
--- a/dart/pkg/compiler/lib/src/js_backend/backend.dart |
+++ b/dart/pkg/compiler/lib/src/js_backend/backend.dart |
@@ -2184,6 +2184,15 @@ class JavaScriptBackend extends Backend { |
customElementsAnalysis.onQueueEmpty(enqueuer); |
if (!enqueuer.queueIsEmpty) return false; |
+ if (compiler.hasIncrementalSupport) { |
+ // Always enable tear-off closures during incremental compilation. |
+ Element e = findHelper('closureFromTearOff'); |
+ if (e != null && !enqueuer.isProcessed(e)) { |
+ registerBackendUse(e); |
+ enqueuer.addToWorkList(e); |
+ } |
+ } |
+ |
if (!enqueuer.isResolutionQueue && preMirrorsMethodCount == 0) { |
preMirrorsMethodCount = generatedCode.length; |
} |