| Index: pkg/compiler/lib/src/js_backend/backend.dart
|
| diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
|
| index 08fa0a74db29be482239a6f7e62b6111c4bfc36d..1af1fd46cd1b719c4399db04621d48ed8e7639d4 100644
|
| --- a/pkg/compiler/lib/src/js_backend/backend.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/backend.dart
|
| @@ -585,6 +585,9 @@ class JavaScriptBackend extends Backend {
|
| /// constructors for custom elements.
|
| CustomElementsAnalysis customElementsAnalysis;
|
|
|
| + /// Support for classifying `noSuchMethod` implementations.
|
| + NoSuchMethodAnalysis noSuchMethodAnalysis;
|
| +
|
| JavaScriptConstantTask constantCompilerTask;
|
|
|
| JavaScriptResolutionCallbacks resolutionCallbacks;
|
| @@ -603,6 +606,7 @@ class JavaScriptBackend extends Backend {
|
| emitter = new CodeEmitterTask(compiler, namer, generateSourceMap);
|
| typeVariableHandler = new TypeVariableHandler(this);
|
| customElementsAnalysis = new CustomElementsAnalysis(this);
|
| + noSuchMethodAnalysis = new NoSuchMethodAnalysis(this);
|
| constantCompilerTask = new JavaScriptConstantTask(compiler);
|
| resolutionCallbacks = new JavaScriptResolutionCallbacks(this);
|
| patchResolverTask = new PatchResolverTask(compiler);
|
| @@ -1206,11 +1210,13 @@ class JavaScriptBackend extends Backend {
|
| enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, registry);
|
| }
|
|
|
| - void enableNoSuchMethod(Element context, Enqueuer world) {
|
| + void registerNoSuchMethod(Element noSuchMethod, Enqueuer enqueuer) {
|
| + noSuchMethodAnalysis.registerNoSuchMethod(noSuchMethod);
|
| + }
|
| +
|
| + void enableNoSuchMethod(Enqueuer world) {
|
| enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies);
|
| world.registerInvocation(compiler.noSuchMethodSelector);
|
| - // TODO(tyoverby): Send the context element to DumpInfoTask to be
|
| - // blamed.
|
| }
|
|
|
| void enableIsolateSupport(Enqueuer enqueuer) {
|
| @@ -2399,6 +2405,8 @@ class JavaScriptBackend extends Backend {
|
| customElementsAnalysis.onQueueEmpty(enqueuer);
|
| if (!enqueuer.queueIsEmpty) return false;
|
|
|
| + noSuchMethodAnalysis.onQueueEmpty(enqueuer);
|
| +
|
| if (compiler.hasIncrementalSupport) {
|
| // Always enable tear-off closures during incremental compilation.
|
| Element e = findHelper('closureFromTearOff');
|
|
|