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) { | 80 void registerTypeLiteral(DartType type) { |
78 if (type.isInterfaceType) { | 81 if (type.isInterfaceType) { |
79 // TODO(sra): If we had a flow query from the type literal expression to | 82 // TODO(sra): If we had a flow query from the type literal expression to |
80 // the Type argument of the metadata lookup, we could tell if this type | 83 // the Type argument of the metadata lookup, we could tell if this type |
81 // literal is really a demand for the metadata. | 84 // literal is really a demand for the metadata. |
82 resolutionJoin.selectedClasses.add(type.element); | 85 resolutionJoin.selectedClasses.add(type.element); |
83 } else if (type.isTypeVariable) { | 86 } else if (type.isTypeVariable) { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 result.add(member); | 196 result.add(member); |
194 } | 197 } |
195 } | 198 } |
196 } | 199 } |
197 classElement.forEachMember(selectGenerativeConstructors, | 200 classElement.forEachMember(selectGenerativeConstructors, |
198 includeBackendMembers: false, | 201 includeBackendMembers: false, |
199 includeSuperAndInjectedMembers: false); | 202 includeSuperAndInjectedMembers: false); |
200 return result; | 203 return result; |
201 } | 204 } |
202 } | 205 } |
OLD | NEW |