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

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

Issue 2732633002: Remove Enqueuer.nativeEnqueuer (Closed)
Patch Set: Updated cf. comment 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/resolution_listener.dart
diff --git a/pkg/compiler/lib/src/js_backend/resolution_listener.dart b/pkg/compiler/lib/src/js_backend/resolution_listener.dart
index 4ad08c5bc566525373ebebf3fd6c7850d92c505e..da95c9e78cfd35c627c853cc96487e6376368efe 100644
--- a/pkg/compiler/lib/src/js_backend/resolution_listener.dart
+++ b/pkg/compiler/lib/src/js_backend/resolution_listener.dart
@@ -12,6 +12,7 @@ import '../elements/entities.dart';
import '../elements/types.dart';
import '../enqueue.dart' show Enqueuer, EnqueuerListener;
import '../kernel/task.dart';
+import '../native/enqueue.dart';
import '../options.dart' show CompilerOptions;
import '../universe/call_structure.dart' show CallStructure;
import '../universe/use.dart' show StaticUse, TypeUse;
@@ -52,6 +53,8 @@ class ResolutionEnqueuerListener extends EnqueuerListener {
final LookupMapLibraryAccess _lookupMapLibraryAccess;
final MirrorsAnalysis _mirrorsAnalysis;
+ final NativeResolutionEnqueuer _nativeEnqueuer;
+
/// True when we enqueue the loadLibrary code.
bool _isLoadLibraryFunctionResolved = false;
ResolutionEnqueuerListener(
@@ -69,7 +72,8 @@ class ResolutionEnqueuerListener extends EnqueuerListener {
this._noSuchMethodRegistry,
this._customElementsAnalysis,
this._lookupMapLibraryAccess,
- this._mirrorsAnalysis);
+ this._mirrorsAnalysis,
+ this._nativeEnqueuer);
// TODO(johnniwinther): Avoid the need for these.
Resolution get _resolution => _backend.resolution;
@@ -117,10 +121,14 @@ class ResolutionEnqueuerListener extends EnqueuerListener {
}
@override
- void registerInstantiatedType(InterfaceType type, {bool isGlobal: false}) {
+ void registerInstantiatedType(InterfaceType type,
+ {bool isGlobal: false, bool nativeUsage: false}) {
if (isGlobal) {
_backendUsage.registerGlobalClassDependency(type.element);
}
+ if (nativeUsage) {
+ _nativeEnqueuer.onInstantiatedType(type);
+ }
}
/// Called to enable support for isolates. Any backend specific [WorldImpact]
@@ -170,8 +178,7 @@ class ResolutionEnqueuerListener extends EnqueuerListener {
@override
void onQueueOpen(Enqueuer enqueuer, FunctionEntity mainMethod,
Iterable<LibraryEntity> libraries) {
- enqueuer
- .applyImpact(enqueuer.nativeEnqueuer.processNativeClasses(libraries));
+ enqueuer.applyImpact(_nativeEnqueuer.processNativeClasses(libraries));
if (mainMethod != null) {
enqueuer.applyImpact(_computeMainImpact(mainMethod));
}
@@ -415,4 +422,8 @@ class ResolutionEnqueuerListener extends EnqueuerListener {
_registerBackendImpact(
impactBuilder, new BackendImpact(globalUses: staticUses));
}
+
+ void logSummary(void log(String message)) {
+ _nativeEnqueuer.logSummary(log);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698