Chromium Code Reviews| 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..3f7490b78d7d9d1453070ee1302727834259c441 100644 |
| --- a/pkg/compiler/lib/src/native/enqueue.dart |
| +++ b/pkg/compiler/lib/src/native/enqueue.dart |
| @@ -34,19 +34,15 @@ 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]. |
|
Harry Terkelsen
2016/06/08 16:34:42
do these do anything if the element is not native?
Johnni Winther
2016/06/10 07:58:51
Adding a TODO to make them return a bool; they act
|
| + /// 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 +367,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 +451,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; |