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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // literal is really a demand for the metadata. | 84 // literal is really a demand for the metadata. |
85 resolutionJoin.selectedClasses.add(type.element); | 85 resolutionJoin.selectedClasses.add(type.element); |
86 } else if (type.isTypeVariable) { | 86 } else if (type.isTypeVariable) { |
87 // This is a type parameter of a parameterized class. | 87 // This is a type parameter of a parameterized class. |
88 // TODO(sra): Is there a way to determine which types are bound to the | 88 // TODO(sra): Is there a way to determine which types are bound to the |
89 // parameter? | 89 // parameter? |
90 resolutionJoin.allClassesSelected = true; | 90 resolutionJoin.allClassesSelected = true; |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
94 void registerTypeConstant(Element element, Enqueuer enqueuer) { | 94 void registerTypeConstant(Element element) { |
95 assert(element.isClass); | 95 assert(element.isClass); |
96 assert(!enqueuer.isResolutionQueue); | |
97 codegenJoin.selectedClasses.add(element); | 96 codegenJoin.selectedClasses.add(element); |
98 } | 97 } |
99 | 98 |
100 void registerStaticUse(Element element, Enqueuer enqueuer) { | 99 void registerStaticUse(Element element, Enqueuer enqueuer) { |
101 assert(element != null); | 100 assert(element != null); |
102 if (!fetchedTableAccessorMethod) { | 101 if (!fetchedTableAccessorMethod) { |
103 fetchedTableAccessorMethod = true; | 102 fetchedTableAccessorMethod = true; |
104 tableAccessorMethod = backend.findInterceptor( | 103 tableAccessorMethod = backend.findInterceptor( |
105 'findIndexForNativeSubclassType'); | 104 'findIndexForNativeSubclassType'); |
106 } | 105 } |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 result.add(member); | 196 result.add(member); |
198 } | 197 } |
199 } | 198 } |
200 } | 199 } |
201 classElement.forEachMember(selectGenerativeConstructors, | 200 classElement.forEachMember(selectGenerativeConstructors, |
202 includeBackendMembers: false, | 201 includeBackendMembers: false, |
203 includeSuperAndInjectedMembers: false); | 202 includeSuperAndInjectedMembers: false); |
204 return result; | 203 return result; |
205 } | 204 } |
206 } | 205 } |
OLD | NEW |