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