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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2782583003: Extract the AST specific part of NoSuchMethodRegistry (Closed)
Patch Set: Created 3 years, 9 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
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
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_nodes.dart ('k') | pkg/compiler/lib/src/js_backend/backend_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698