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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen_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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/enqueuer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/codegen_listener.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen_listener.dart b/pkg/compiler/lib/src/js_backend/codegen_listener.dart
index 30f1ddc6ed9ea9ccd50fd3c40e30446a2234f9a4..cb3b2155d899d3beb3081f656acfe792f97c4b1d 100644
--- a/pkg/compiler/lib/src/js_backend/codegen_listener.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen_listener.dart
@@ -11,6 +11,7 @@ import '../elements/elements.dart';
import '../elements/entities.dart';
import '../elements/resolution_types.dart';
import '../enqueue.dart' show Enqueuer, EnqueuerListener;
+import '../native/enqueue.dart';
import '../universe/call_structure.dart' show CallStructure;
import '../universe/use.dart' show StaticUse, TypeUse;
import '../universe/world_impact.dart' show WorldImpact, WorldImpactBuilderImpl;
@@ -40,6 +41,8 @@ class CodegenEnqueuerListener extends EnqueuerListener {
final LookupMapAnalysis _lookupMapAnalysis;
final MirrorsAnalysis _mirrorsAnalysis;
+ final NativeCodegenEnqueuer _nativeEnqueuer;
+
bool _noSuchMethodEnabledForCodegen = false;
CodegenEnqueuerListener(
@@ -52,7 +55,8 @@ class CodegenEnqueuerListener extends EnqueuerListener {
this._customElementsAnalysis,
this._typeVariableHandler,
this._lookupMapAnalysis,
- this._mirrorsAnalysis);
+ this._mirrorsAnalysis,
+ this._nativeEnqueuer);
// TODO(johnniwinther): Change these to final fields.
DumpInfoTask get _dumpInfoTask => _backend.compiler.dumpInfoTask;
@@ -82,7 +86,10 @@ class CodegenEnqueuerListener extends EnqueuerListener {
@override
void registerInstantiatedType(ResolutionInterfaceType type,
- {bool isGlobal: false}) {
+ {bool isGlobal: false, bool nativeUsage: false}) {
+ if (nativeUsage) {
+ _nativeEnqueuer.onInstantiatedType(type);
+ }
_lookupMapAnalysis.registerInstantiatedType(type);
}
@@ -128,8 +135,7 @@ class CodegenEnqueuerListener 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));
}
@@ -261,4 +267,8 @@ class CodegenEnqueuerListener extends EnqueuerListener {
WorldImpact registerInstantiatedClass(ClassEntity cls) {
return _processClass(cls);
}
+
+ void logSummary(void log(String message)) {
+ _nativeEnqueuer.logSummary(log);
+ }
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/enqueuer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698