Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart

Issue 221873002: Compute frontend/backend specific constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if ((isNative && selectedClasses.contains(classElement)) || 156 if ((isNative && selectedClasses.contains(classElement)) ||
157 (isExtension && 157 (isExtension &&
158 (allClassesSelected || selectedClasses.contains(classElement)))) { 158 (allClassesSelected || selectedClasses.contains(classElement)))) {
159 newActiveClasses.add(classElement); 159 newActiveClasses.add(classElement);
160 escapingConstructors(classElement).forEach(enqueuer.registerStaticUse); 160 escapingConstructors(classElement).forEach(enqueuer.registerStaticUse);
161 // Force the generaton of the type constant that is the key to an entry 161 // Force the generaton of the type constant that is the key to an entry
162 // in the generated table. 162 // in the generated table.
163 Constant constant = makeTypeConstant(classElement); 163 Constant constant = makeTypeConstant(classElement);
164 backend.registerCompileTimeConstant( 164 backend.registerCompileTimeConstant(
165 constant, compiler.globalDependencies); 165 constant, compiler.globalDependencies);
166 compiler.constantHandler.addCompileTimeConstantForEmission(constant); 166 backend.constants.addCompileTimeConstantForEmission(constant);
167 } 167 }
168 } 168 }
169 activeClasses.addAll(newActiveClasses); 169 activeClasses.addAll(newActiveClasses);
170 instantiatedClasses.removeAll(newActiveClasses); 170 instantiatedClasses.removeAll(newActiveClasses);
171 } 171 }
172 172
173 TypeConstant makeTypeConstant(ClassElement element) { 173 TypeConstant makeTypeConstant(ClassElement element) {
174 DartType elementType = element.rawType; 174 DartType elementType = element.rawType;
175 DartType constantType = backend.typeImplementation.rawType; 175 DartType constantType = backend.typeImplementation.rawType;
176 return new TypeConstant(elementType, constantType); 176 return new TypeConstant(elementType, constantType);
(...skipping 15 matching lines...) Expand all
192 result.add(member); 192 result.add(member);
193 } 193 }
194 } 194 }
195 } 195 }
196 classElement.forEachMember(selectGenerativeConstructors, 196 classElement.forEachMember(selectGenerativeConstructors,
197 includeBackendMembers: false, 197 includeBackendMembers: false,
198 includeSuperAndInjectedMembers: false); 198 includeSuperAndInjectedMembers: false);
199 return result; 199 return result;
200 } 200 }
201 } 201 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698