Version 2.17.0-91.0.dev
Merge commit 'ef028410836f30a32b8aa41a1b0d7e3f7c74cb89' into 'dev'
diff --git a/pkg/compiler/lib/src/native/enqueue.dart b/pkg/compiler/lib/src/native/enqueue.dart
index 1876079..2b6355c 100644
--- a/pkg/compiler/lib/src/native/enqueue.dart
+++ b/pkg/compiler/lib/src/native/enqueue.dart
@@ -14,33 +14,11 @@
import 'behavior.dart';
import 'resolver.dart' show NativeClassFinder;
-/// This could be an abstract class but we use it as a stub for the
-/// dart_backend.
-class NativeEnqueuer {
- /// Called when a [type] has been instantiated natively.
- void onInstantiatedType(InterfaceType type) {}
-
- /// Initial entry point to native enqueuer.
- WorldImpact processNativeClasses(Iterable<Uri> libraries) =>
- const WorldImpact();
-
- /// Registers the [nativeBehavior]. Adds the liveness of its instantiated
- /// types to the world.
- void registerNativeBehavior(
- WorldImpactBuilder impactBuilder, NativeBehavior nativeBehavior, cause) {}
-
- /// Returns whether native classes are being used.
- bool get hasInstantiatedNativeClasses => false;
-
- /// Emits a summary information using the [log] function.
- void logSummary(void log(String message)) {}
-}
-
-abstract class NativeEnqueuerBase implements NativeEnqueuer {
+abstract class NativeEnqueuer {
final Set<ClassEntity> _registeredClasses = {};
final Set<ClassEntity> _unusedClasses = {};
- @override
+ /// Returns whether native classes are being used.
bool get hasInstantiatedNativeClasses => !_registeredClasses.isEmpty;
/// Log message reported if all native types are used.
@@ -52,18 +30,21 @@
final CommonElements _commonElements;
/// Subclasses of [NativeEnqueuerBase] are constructed by the backend.
- NativeEnqueuerBase(this._options, this._elementEnvironment,
- this._commonElements, this._dartTypes);
+ NativeEnqueuer(this._options, this._elementEnvironment, this._commonElements,
+ this._dartTypes);
bool get enableLiveTypeAnalysis => _options.enableNativeLiveTypeAnalysis;
- @override
+ /// Called when a [type] has been instantiated natively.
void onInstantiatedType(InterfaceType type) {
if (_unusedClasses.remove(type.element)) {
_registeredClasses.add(type.element);
}
}
+ /// Initial entry point to native enqueuer.
+ WorldImpact processNativeClasses(Iterable<Uri> libraries);
+
/// Register [classes] as natively instantiated in [impactBuilder].
void _registerTypeUses(
WorldImpactBuilder impactBuilder, Set<ClassEntity> classes, cause) {
@@ -79,7 +60,8 @@
}
}
- @override
+ /// Registers the [nativeBehavior]. Adds the liveness of its instantiated
+ /// types to the world.
void registerNativeBehavior(
WorldImpactBuilder impactBuilder, NativeBehavior nativeBehavior, cause) {
_processNativeBehavior(impactBuilder, nativeBehavior, cause);
@@ -169,7 +151,7 @@
});
}
- @override
+ /// Emits a summary information using the [log] function.
void logSummary(void log(String message)) {
if (_allUsedMessage != null) {
log(_allUsedMessage);
@@ -177,7 +159,7 @@
}
}
-class NativeResolutionEnqueuer extends NativeEnqueuerBase {
+class NativeResolutionEnqueuer extends NativeEnqueuer {
final NativeClassFinder _nativeClassFinder;
/// The set of all native classes. Each native class is in [nativeClasses]
@@ -219,7 +201,7 @@
}
}
-class NativeCodegenEnqueuer extends NativeEnqueuerBase {
+class NativeCodegenEnqueuer extends NativeEnqueuer {
final CodeEmitterTask _emitter;
final Iterable<ClassEntity> _nativeClasses;
final NativeData _nativeData;
diff --git a/tools/VERSION b/tools/VERSION
index cd65607..b70f26b 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 17
PATCH 0
-PRERELEASE 90
+PRERELEASE 91
PRERELEASE_PATCH 0
\ No newline at end of file