| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of native; | 5 part of native; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * This could be an abstract class but we use it as a stub for the dart_backend. | 8 * This could be an abstract class but we use it as a stub for the dart_backend. |
| 9 */ | 9 */ |
| 10 class NativeEnqueuer { | 10 class NativeEnqueuer { |
| 11 /// Initial entry point to native enqueuer. | 11 /// Initial entry point to native enqueuer. |
| 12 void processNativeClasses(Iterable<LibraryElement> libraries) {} | 12 void processNativeClasses(Iterable<LibraryElement> libraries) {} |
| 13 | 13 |
| 14 /// Notification of a main Enqueuer worklist element. For methods, adds | 14 /// Notification of a main Enqueuer worklist element. For methods, adds |
| 15 /// information from metadata attributes, and computes types instantiated due | 15 /// information from metadata attributes, and computes types instantiated due |
| 16 /// to calling the method. | 16 /// to calling the method. |
| 17 void registerElement(Element element) {} | 17 void registerElement(Element element) {} |
| 18 | 18 |
| 19 /// Notification of native field. Adds information from metadata attributes. | 19 /// Notification of native field. Adds information from metadata attributes. |
| 20 void handleFieldAnnotations(Element field) {} | 20 void handleFieldAnnotations(Element field) {} |
| 21 | 21 |
| 22 /// Computes types instantiated due to getting a native field. | 22 /// Computes types instantiated due to getting a native field. |
| 23 void registerFieldLoad(Element field) {} | 23 void registerFieldLoad(Element field) {} |
| 24 | 24 |
| 25 /// Computes types instantiated due to setting a native field. | 25 /// Computes types instantiated due to setting a native field. |
| 26 void registerFieldStore(Element field) {} | 26 void registerFieldStore(Element field) {} |
| 27 | 27 |
| 28 NativeBehavior getNativeBehaviorOf(Send node) => NativeBehavior.NONE; | 28 NativeBehavior getNativeBehaviorOf(Send node) => new NativeBehavior(); |
| 29 | 29 |
| 30 /// Returns whether native classes are being used. | 30 /// Returns whether native classes are being used. |
| 31 bool hasInstantiatedNativeClasses() => false; | 31 bool hasInstantiatedNativeClasses() => false; |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * Handles JS-calls, which can be an instantiation point for types. | 34 * Handles JS-calls, which can be an instantiation point for types. |
| 35 * | 35 * |
| 36 * For example, the following code instantiates and returns native classes | 36 * For example, the following code instantiates and returns native classes |
| 37 * that are `_DOMWindowImpl` or a subtype. | 37 * that are `_DOMWindowImpl` or a subtype. |
| 38 * | 38 * |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 superclass, | 632 superclass, |
| 633 () => <ClassElement>[]); | 633 () => <ClassElement>[]); |
| 634 directSubtypes.add(cls); | 634 directSubtypes.add(cls); |
| 635 } | 635 } |
| 636 | 636 |
| 637 void logSummary(log(message)) { | 637 void logSummary(log(message)) { |
| 638 log('Compiled ${registeredClasses.length} native classes, ' | 638 log('Compiled ${registeredClasses.length} native classes, ' |
| 639 '${unusedClasses.length} native classes omitted.'); | 639 '${unusedClasses.length} native classes omitted.'); |
| 640 } | 640 } |
| 641 } | 641 } |
| OLD | NEW |