| 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 class NativeResolutionEnqueuer extends NativeEnqueuerBase { | 535 class NativeResolutionEnqueuer extends NativeEnqueuerBase { |
| 536 | 536 |
| 537 Map<String, ClassElement> tagOwner = new Map<String, ClassElement>(); | 537 Map<String, ClassElement> tagOwner = new Map<String, ClassElement>(); |
| 538 | 538 |
| 539 NativeResolutionEnqueuer(Enqueuer world, Compiler compiler) | 539 NativeResolutionEnqueuer(Enqueuer world, Compiler compiler) |
| 540 : super(world, compiler, compiler.enableNativeLiveTypeAnalysis); | 540 : super(world, compiler, compiler.enableNativeLiveTypeAnalysis); |
| 541 | 541 |
| 542 void processNativeClass(ClassElement classElement) { | 542 void processNativeClass(ClassElement classElement) { |
| 543 super.processNativeClass(classElement); | 543 super.processNativeClass(classElement); |
| 544 | 544 |
| 545 // Js Interop interfaces do not have tags. |
| 546 if (classElement.isJsInterop) return; |
| 545 // Since we map from dispatch tags to classes, a dispatch tag must be used | 547 // Since we map from dispatch tags to classes, a dispatch tag must be used |
| 546 // on only one native class. | 548 // on only one native class. |
| 547 for (String tag in nativeTagsOfClass(classElement)) { | 549 for (String tag in nativeTagsOfClass(classElement)) { |
| 548 ClassElement owner = tagOwner[tag]; | 550 ClassElement owner = tagOwner[tag]; |
| 549 if (owner != null) { | 551 if (owner != null) { |
| 550 if (owner != classElement) { | 552 if (owner != classElement) { |
| 551 compiler.internalError( | 553 compiler.internalError( |
| 552 classElement, "Tag '$tag' already in use by '${owner.name}'"); | 554 classElement, "Tag '$tag' already in use by '${owner.name}'"); |
| 553 } | 555 } |
| 554 } else { | 556 } else { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 superclass, | 673 superclass, |
| 672 () => <ClassElement>[]); | 674 () => <ClassElement>[]); |
| 673 directSubtypes.add(cls); | 675 directSubtypes.add(cls); |
| 674 } | 676 } |
| 675 | 677 |
| 676 void logSummary(log(message)) { | 678 void logSummary(log(message)) { |
| 677 log('Compiled ${registeredClasses.length} native classes, ' | 679 log('Compiled ${registeredClasses.length} native classes, ' |
| 678 '${unusedClasses.length} native classes omitted.'); | 680 '${unusedClasses.length} native classes omitted.'); |
| 679 } | 681 } |
| 680 } | 682 } |
| OLD | NEW |