Index: pkg/compiler/lib/src/native/enqueue.dart |
diff --git a/pkg/compiler/lib/src/native/enqueue.dart b/pkg/compiler/lib/src/native/enqueue.dart |
index f38ccc43f10663e59d0e43ec2f63206d2c9ead90..63b601d898b3c905a0ce96b43c5b7e28f7af1b92 100644 |
--- a/pkg/compiler/lib/src/native/enqueue.dart |
+++ b/pkg/compiler/lib/src/native/enqueue.dart |
@@ -34,19 +34,17 @@ class NativeEnqueuer { |
/// types to the world. |
void registerNativeBehavior(NativeBehavior nativeBehavior, cause) {} |
- /// Notification of a main Enqueuer worklist element. For methods, adds |
- /// information from metadata attributes, and computes types instantiated due |
- /// to calling the method. |
- void registerElement(Element element) {} |
- |
- /// Notification of native field. Adds information from metadata attributes. |
+ // TODO(johnniwinther): Move [handleFieldAnnotations] and |
+ // [handleMethodAnnotations] to [JavaScriptBackend] or [NativeData]. |
+ // TODO(johnniwinther): Change the return type to 'bool' and rename them to |
+ // something like `computeNativeField`. |
+ /// Process the potentially native [field]. Adds information from metadata |
+ /// attributes. |
void handleFieldAnnotations(Element field) {} |
- /// Computes types instantiated due to getting a native field. |
- void registerFieldLoad(Element field) {} |
- |
- /// Computes types instantiated due to setting a native field. |
- void registerFieldStore(Element field) {} |
+ /// Process the potentially native [method]. Adds information from metadata |
+ /// attributes. |
+ void handleMethodAnnotations(Element method) {} |
/// Returns whether native classes are being used. |
bool hasInstantiatedNativeClasses() => false; |
@@ -371,26 +369,6 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer { |
} |
} |
- registerElement(Element element) { |
- reporter.withCurrentElement(element, () { |
- if (element.isFunction || |
- element.isFactoryConstructor || |
- element.isGetter || |
- element.isSetter) { |
- handleMethodAnnotations(element); |
- if (backend.isNative(element)) { |
- registerMethodUsed(element); |
- } |
- } else if (element.isField) { |
- handleFieldAnnotations(element); |
- if (backend.isNative(element)) { |
- registerFieldLoad(element); |
- registerFieldStore(element); |
- } |
- } |
- }); |
- } |
- |
void handleFieldAnnotations(Element element) { |
if (compiler.serialization.isDeserialized(element)) { |
return; |
@@ -475,18 +453,6 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer { |
flushQueue(); |
} |
- void registerMethodUsed(Element method) { |
- registerNativeBehavior(NativeBehavior.ofMethod(method, compiler), method); |
- } |
- |
- void registerFieldLoad(Element field) { |
- registerNativeBehavior(NativeBehavior.ofFieldLoad(field, compiler), field); |
- } |
- |
- void registerFieldStore(Element field) { |
- registerNativeBehavior(NativeBehavior.ofFieldStore(field, compiler), field); |
- } |
- |
processNativeBehavior(NativeBehavior behavior, cause) { |
// TODO(ahe): Is this really a global dependency? |
Registry registry = compiler.globalDependencies; |