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

Side by Side Diff: pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart

Issue 2696483005: Move global dependencies to BackendUsage (Closed)
Patch Set: Created 3 years, 10 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
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 import '../compiler.dart' show Compiler; 5 import '../compiler.dart' show Compiler;
6 import '../constants/values.dart'; 6 import '../constants/values.dart';
7 import '../elements/resolution_types.dart'; 7 import '../elements/resolution_types.dart';
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../universe/use.dart' show StaticUse; 9 import '../universe/use.dart' show StaticUse;
10 import '../universe/world_impact.dart' 10 import '../universe/world_impact.dart'
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 (isExtension && 166 (isExtension &&
167 (allClassesSelected || selectedClasses.contains(classElement)))) { 167 (allClassesSelected || selectedClasses.contains(classElement)))) {
168 newActiveClasses.add(classElement); 168 newActiveClasses.add(classElement);
169 Iterable<ConstructorElement> escapingConstructors = 169 Iterable<ConstructorElement> escapingConstructors =
170 computeEscapingConstructors(classElement); 170 computeEscapingConstructors(classElement);
171 for (ConstructorElement constructor in escapingConstructors) { 171 for (ConstructorElement constructor in escapingConstructors) {
172 impactBuilder 172 impactBuilder
173 .registerStaticUse(new StaticUse.foreignUse(constructor)); 173 .registerStaticUse(new StaticUse.foreignUse(constructor));
174 } 174 }
175 escapingConstructors 175 escapingConstructors
176 .forEach(compiler.globalDependencies.registerDependency); 176 .forEach(backend.backendUsage.registerGlobalDependency);
177 // Force the generaton of the type constant that is the key to an entry 177 // Force the generaton of the type constant that is the key to an entry
178 // in the generated table. 178 // in the generated table.
179 ConstantValue constant = makeTypeConstant(classElement); 179 ConstantValue constant = makeTypeConstant(classElement);
180 backend.computeImpactForCompileTimeConstant( 180 backend.computeImpactForCompileTimeConstant(
181 constant, impactBuilder, false); 181 constant, impactBuilder, false);
182 backend.addCompileTimeConstantForEmission(constant); 182 backend.addCompileTimeConstantForEmission(constant);
183 } 183 }
184 } 184 }
185 activeClasses.addAll(newActiveClasses); 185 activeClasses.addAll(newActiveClasses);
186 instantiatedClasses.removeAll(newActiveClasses); 186 instantiatedClasses.removeAll(newActiveClasses);
(...skipping 24 matching lines...) Expand all
211 result.add(member); 211 result.add(member);
212 } 212 }
213 } 213 }
214 } 214 }
215 215
216 classElement.forEachMember(selectGenerativeConstructors, 216 classElement.forEachMember(selectGenerativeConstructors,
217 includeBackendMembers: false, includeSuperAndInjectedMembers: false); 217 includeBackendMembers: false, includeSuperAndInjectedMembers: false);
218 return result; 218 return result;
219 } 219 }
220 } 220 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend_usage.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698