| 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 { |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 compiler.backend.registerInstantiatedType( | 341 compiler.backend.registerInstantiatedType( |
| 342 classElement.rawType, world, compiler.globalDependencies); | 342 classElement.rawType, world, compiler.globalDependencies); |
| 343 | 343 |
| 344 if (firstTime) { | 344 if (firstTime) { |
| 345 queue.add(onFirstNativeClass); | 345 queue.add(onFirstNativeClass); |
| 346 } | 346 } |
| 347 } | 347 } |
| 348 | 348 |
| 349 registerElement(Element element) { | 349 registerElement(Element element) { |
| 350 reporter.withCurrentElement(element, () { | 350 reporter.withCurrentElement(element, () { |
| 351 if (element.isFunction || element.isGetter || element.isSetter) { | 351 if (element.isFunction || |
| 352 element.isFactoryConstructor || |
| 353 element.isGetter || |
| 354 element.isSetter) { |
| 352 handleMethodAnnotations(element); | 355 handleMethodAnnotations(element); |
| 353 if (element.isNative) { | 356 if (element.isNative) { |
| 354 registerMethodUsed(element); | 357 registerMethodUsed(element); |
| 355 } | 358 } |
| 356 } else if (element.isField) { | 359 } else if (element.isField) { |
| 357 handleFieldAnnotations(element); | 360 handleFieldAnnotations(element); |
| 358 if (element.isNative) { | 361 if (element.isNative) { |
| 359 registerFieldLoad(element); | 362 registerFieldLoad(element); |
| 360 registerFieldStore(element); | 363 registerFieldStore(element); |
| 361 } | 364 } |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 superclass, | 679 superclass, |
| 677 () => <ClassElement>[]); | 680 () => <ClassElement>[]); |
| 678 directSubtypes.add(cls); | 681 directSubtypes.add(cls); |
| 679 } | 682 } |
| 680 | 683 |
| 681 void logSummary(log(message)) { | 684 void logSummary(log(message)) { |
| 682 log('Compiled ${registeredClasses.length} native classes, ' | 685 log('Compiled ${registeredClasses.length} native classes, ' |
| 683 '${unusedClasses.length} native classes omitted.'); | 686 '${unusedClasses.length} native classes omitted.'); |
| 684 } | 687 } |
| 685 } | 688 } |
| OLD | NEW |