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

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

Issue 2725933006: Reduce use of elements/resolution_types in enqueuer. (Closed)
Patch Set: Updated cf. comment. Created 3 years, 9 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 '../closure.dart'; 5 import '../closure.dart';
6 import '../common.dart'; 6 import '../common.dart';
7 import '../common_elements.dart'; 7 import '../common_elements.dart';
8 import '../compiler.dart'; 8 import '../compiler.dart';
9 import '../constants/values.dart'; 9 import '../constants/values.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 }); 305 });
306 } 306 }
307 }); 307 });
308 // 4) all overriding members of subclasses/subtypes (should be resolved) 308 // 4) all overriding members of subclasses/subtypes (should be resolved)
309 if (closedWorld.hasAnyStrictSubtype(cls)) { 309 if (closedWorld.hasAnyStrictSubtype(cls)) {
310 closedWorld.forEachStrictSubtypeOf(cls, (ClassElement subcls) { 310 closedWorld.forEachStrictSubtypeOf(cls, (ClassElement subcls) {
311 subcls.forEachClassMember((Member member) { 311 subcls.forEachClassMember((Member member) {
312 if (memberNames.contains(member.name)) { 312 if (memberNames.contains(member.name)) {
313 // TODO(20993): find out why this assertion fails. 313 // TODO(20993): find out why this assertion fails.
314 // assert(invariant(member.element, 314 // assert(invariant(member.element,
315 // resolution.hasBeenProcessed(member.element))); 315 // worldBuilder.isMemberUsed(member.element)));
316 if (worldBuilder.isMemberUsed(member.element)) { 316 if (worldBuilder.isMemberUsed(member.element)) {
317 reflectableMembers.add(member.element); 317 reflectableMembers.add(member.element);
318 } 318 }
319 } 319 }
320 }); 320 });
321 }); 321 });
322 } 322 }
323 // 5) all its closures 323 // 5) all its closures
324 List<LocalFunctionElement> closures = closureMap[cls]; 324 List<LocalFunctionElement> closures = closureMap[cls];
325 if (closures != null) { 325 if (closures != null) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 411 }
412 412
413 /// Called when [:const Symbol(name):] is seen. 413 /// Called when [:const Symbol(name):] is seen.
414 void registerConstSymbol(String name) { 414 void registerConstSymbol(String name) {
415 symbolsUsed.add(name); 415 symbolsUsed.add(name);
416 if (name.endsWith('=')) { 416 if (name.endsWith('=')) {
417 symbolsUsed.add(name.substring(0, name.length - 1)); 417 symbolsUsed.add(name.substring(0, name.length - 1));
418 } 418 }
419 } 419 }
420 } 420 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/enqueuer.dart ('k') | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698