| 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);
|
| + }
|
| }
|
|
|