OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 js_backend; | 5 part of js_backend; |
6 | 6 |
7 /** | 7 /** |
8 * Support for Custom Elements. | 8 * Support for Custom Elements. |
9 * | 9 * |
10 * The support for custom elements the compiler builds a table that maps the | 10 * The support for custom elements the compiler builds a table that maps the |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 } | 64 } |
65 | 65 |
66 CustomElementsAnalysisJoin joinFor(Enqueuer enqueuer) => | 66 CustomElementsAnalysisJoin joinFor(Enqueuer enqueuer) => |
67 enqueuer.isResolutionQueue ? resolutionJoin : codegenJoin; | 67 enqueuer.isResolutionQueue ? resolutionJoin : codegenJoin; |
68 | 68 |
69 void registerInstantiatedClass(ClassElement classElement, Enqueuer enqueuer) { | 69 void registerInstantiatedClass(ClassElement classElement, Enqueuer enqueuer) { |
70 classElement.ensureResolved(compiler.resolution); | 70 classElement.ensureResolved(compiler.resolution); |
71 if (!Elements.isNativeOrExtendsNative(classElement)) return; | 71 if (!Elements.isNativeOrExtendsNative(classElement)) return; |
72 if (classElement.isMixinApplication) return; | 72 if (classElement.isMixinApplication) return; |
73 if (classElement.isAbstract) return; | 73 if (classElement.isAbstract) return; |
| 74 // JsInterop classes are opaque interfaces without a concrete |
| 75 // implementation. |
| 76 if (classElement.isJsInterop) return; |
74 joinFor(enqueuer).instantiatedClasses.add(classElement); | 77 joinFor(enqueuer).instantiatedClasses.add(classElement); |
75 } | 78 } |
76 | 79 |
77 void registerTypeLiteral(DartType type, Registry registry) { | 80 void registerTypeLiteral(DartType type, Registry registry) { |
78 assert(registry.isForResolution); | 81 assert(registry.isForResolution); |
79 // In codegen we see the TypeConstants instead. | 82 // In codegen we see the TypeConstants instead. |
80 if (!registry.isForResolution) return; | 83 if (!registry.isForResolution) return; |
81 | 84 |
82 if (type.isInterfaceType) { | 85 if (type.isInterfaceType) { |
83 // TODO(sra): If we had a flow query from the type literal expression to | 86 // TODO(sra): If we had a flow query from the type literal expression to |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 result.add(member); | 200 result.add(member); |
198 } | 201 } |
199 } | 202 } |
200 } | 203 } |
201 classElement.forEachMember(selectGenerativeConstructors, | 204 classElement.forEachMember(selectGenerativeConstructors, |
202 includeBackendMembers: false, | 205 includeBackendMembers: false, |
203 includeSuperAndInjectedMembers: false); | 206 includeSuperAndInjectedMembers: false); |
204 return result; | 207 return result; |
205 } | 208 } |
206 } | 209 } |
OLD | NEW |