| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 Iterable<Element> escapingConstructors = | 162 Iterable<Element> escapingConstructors = |
| 163 computeEscapingConstructors(classElement); | 163 computeEscapingConstructors(classElement); |
| 164 escapingConstructors.forEach(enqueuer.registerStaticUse); | 164 escapingConstructors.forEach(enqueuer.registerStaticUse); |
| 165 escapingConstructors | 165 escapingConstructors |
| 166 .forEach(compiler.globalDependencies.registerDependency); | 166 .forEach(compiler.globalDependencies.registerDependency); |
| 167 // Force the generaton of the type constant that is the key to an entry | 167 // Force the generaton of the type constant that is the key to an entry |
| 168 // in the generated table. | 168 // in the generated table. |
| 169 ConstantValue constant = makeTypeConstant(classElement); | 169 ConstantValue constant = makeTypeConstant(classElement); |
| 170 backend.registerCompileTimeConstant( | 170 backend.registerCompileTimeConstant( |
| 171 constant, compiler.globalDependencies); | 171 constant, compiler.globalDependencies); |
| 172 backend.constants.addCompileTimeConstantForEmission(constant); | |
| 173 } | 172 } |
| 174 } | 173 } |
| 175 activeClasses.addAll(newActiveClasses); | 174 activeClasses.addAll(newActiveClasses); |
| 176 instantiatedClasses.removeAll(newActiveClasses); | 175 instantiatedClasses.removeAll(newActiveClasses); |
| 177 } | 176 } |
| 178 | 177 |
| 179 TypeConstantValue makeTypeConstant(ClassElement element) { | 178 TypeConstantValue makeTypeConstant(ClassElement element) { |
| 180 DartType elementType = element.rawType; | 179 DartType elementType = element.rawType; |
| 181 return backend.constantSystem.createType(compiler, elementType); | 180 return backend.constantSystem.createType(compiler, elementType); |
| 182 } | 181 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 198 result.add(member); | 197 result.add(member); |
| 199 } | 198 } |
| 200 } | 199 } |
| 201 } | 200 } |
| 202 classElement.forEachMember(selectGenerativeConstructors, | 201 classElement.forEachMember(selectGenerativeConstructors, |
| 203 includeBackendMembers: false, | 202 includeBackendMembers: false, |
| 204 includeSuperAndInjectedMembers: false); | 203 includeSuperAndInjectedMembers: false); |
| 205 return result; | 204 return result; |
| 206 } | 205 } |
| 207 } | 206 } |
| OLD | NEW |