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 e9b29b94460b317ae358562241d412cfa2d6b171..76e42015c8f2f8f809b758f395763d2f92d06edc 100644 |
--- a/pkg/compiler/lib/src/js_backend/backend.dart |
+++ b/pkg/compiler/lib/src/js_backend/backend.dart |
@@ -520,7 +520,8 @@ class JavaScriptBackend { |
lookupMapResolutionAnalysis = |
new LookupMapResolutionAnalysis(reporter, compiler.elementEnvironment); |
- noSuchMethodRegistry = new NoSuchMethodRegistry(this); |
+ noSuchMethodRegistry = |
+ new NoSuchMethodRegistry(helpers, new NoSuchMethodResolverImpl()); |
kernelTask = new KernelTask(compiler); |
patchResolverTask = new PatchResolverTask(compiler); |
functionCompiler = |
@@ -681,10 +682,6 @@ class JavaScriptBackend { |
return constantCompilerTask.jsConstantCompiler; |
} |
- bool isDefaultNoSuchMethod(MethodElement element) { |
- return noSuchMethodRegistry.isDefaultNoSuchMethodImplementation(element); |
- } |
- |
MethodElement resolveExternalFunction(MethodElement element) { |
if (isForeign(element)) { |
return element; |
@@ -805,16 +802,8 @@ class JavaScriptBackend { |
mirrorsResolutionAnalysis.onResolutionComplete(); |
} |
- void onTypeInferenceComplete() { |
- noSuchMethodRegistry.onTypeInferenceComplete(); |
- } |
- |
- /// Register a runtime type variable bound tests between [typeArgument] and |
- /// [bound]. |
- void registerTypeVariableBoundsSubtypeCheck( |
- ResolutionDartType typeArgument, ResolutionDartType bound) { |
- rtiChecksBuilder.registerTypeVariableBoundsSubtypeCheck( |
- typeArgument, bound); |
+ void onTypeInferenceComplete(GlobalTypeInferenceResults results) { |
+ noSuchMethodRegistry.onTypeInferenceComplete(results); |
} |
/// Returns the [WorldImpact] of enabling deferred loading. |
@@ -855,9 +844,6 @@ class JavaScriptBackend { |
return null; |
} |
- bool isComplexNoSuchMethod(FunctionElement element) => |
- noSuchMethodRegistry.isComplex(element); |
- |
ResolutionEnqueuer createResolutionEnqueuer( |
CompilerTask task, Compiler compiler) { |
_nativeBasicData = |
@@ -1069,7 +1055,7 @@ class JavaScriptBackend { |
/// Generates the output and returns the total size of the generated code. |
int assembleProgram(ClosedWorld closedWorld) { |
int programSize = emitter.assembleProgram(namer, closedWorld); |
- noSuchMethodRegistry.emitDiagnostic(); |
+ noSuchMethodRegistry.emitDiagnostic(reporter); |
int totalMethodCount = generatedCode.length; |
if (totalMethodCount != mirrorsCodegenAnalysis.preMirrorsMethodCount) { |
int mirrorCount = |
@@ -1578,7 +1564,7 @@ class JavaScriptBackendTarget extends Target { |
@override |
bool isDefaultNoSuchMethod(MethodElement element) { |
- return _backend.isDefaultNoSuchMethod(element); |
+ return _backend.helpers.isDefaultNoSuchMethodImplementation(element); |
} |
@override |