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

Side by Side Diff: pkg/compiler/lib/src/universe/world_builder.dart

Issue 2595493002: Merge CoreTypes and CoreClasses into CommonElements. (Closed)
Patch Set: Updated cf. comment Created 4 years 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
« no previous file with comments | « pkg/compiler/lib/src/universe/function_set.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library universe; 5 library universe;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import '../cache_strategy.dart'; 9 import '../cache_strategy.dart';
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 this.cacheStrategy = cacheStrategy, 494 this.cacheStrategy = cacheStrategy,
495 alreadyPopulated = cacheStrategy.newSet() { 495 alreadyPopulated = cacheStrategy.newSet() {
496 _allFunctions = new FunctionSetBuilder(); 496 _allFunctions = new FunctionSetBuilder();
497 } 497 }
498 498
499 Iterable<ClassElement> get processedClasses => _processedClasses.keys 499 Iterable<ClassElement> get processedClasses => _processedClasses.keys
500 .where((cls) => _processedClasses[cls].isInstantiated); 500 .where((cls) => _processedClasses[cls].isInstantiated);
501 501
502 CommonElements get commonElements => _resolution.commonElements; 502 CommonElements get commonElements => _resolution.commonElements;
503 503
504 CoreTypes get coreTypes => _resolution.coreTypes;
505
506 ClosedWorld get closedWorldForTesting { 504 ClosedWorld get closedWorldForTesting {
507 if (!_closed) { 505 if (!_closed) {
508 throw new SpannableAssertionFailure( 506 throw new SpannableAssertionFailure(
509 NO_LOCATION_SPANNABLE, "The world builder has not yet been closed."); 507 NO_LOCATION_SPANNABLE, "The world builder has not yet been closed.");
510 } 508 }
511 return _closedWorldCache; 509 return _closedWorldCache;
512 } 510 }
513 511
514 /// All directly instantiated classes, that is, classes with a generative 512 /// All directly instantiated classes, that is, classes with a generative
515 /// constructor that has been called directly and not only through a 513 /// constructor that has been called directly and not only through a
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 // Use the [:seenClasses:] set to include non-instantiated 1089 // Use the [:seenClasses:] set to include non-instantiated
1092 // classes: if the superclass of these classes require RTI, then 1090 // classes: if the superclass of these classes require RTI, then
1093 // they also need RTI, so that a constructor passes the type 1091 // they also need RTI, so that a constructor passes the type
1094 // variables to the super constructor. 1092 // variables to the super constructor.
1095 forEachInstantiatedClass(addSubtypes); 1093 forEachInstantiatedClass(addSubtypes);
1096 1094
1097 _closed = true; 1095 _closed = true;
1098 return _closedWorldCache = new ClosedWorldImpl( 1096 return _closedWorldCache = new ClosedWorldImpl(
1099 backend: _backend, 1097 backend: _backend,
1100 commonElements: commonElements, 1098 commonElements: commonElements,
1101 coreTypes: coreTypes,
1102 resolverWorld: this, 1099 resolverWorld: this,
1103 functionSetBuilder: _allFunctions, 1100 functionSetBuilder: _allFunctions,
1104 allTypedefs: _allTypedefs, 1101 allTypedefs: _allTypedefs,
1105 mixinUses: _mixinUses, 1102 mixinUses: _mixinUses,
1106 typesImplementedBySubclasses: typesImplementedBySubclasses, 1103 typesImplementedBySubclasses: typesImplementedBySubclasses,
1107 classHierarchyNodes: _classHierarchyNodes, 1104 classHierarchyNodes: _classHierarchyNodes,
1108 classSets: _classSets); 1105 classSets: _classSets);
1109 } 1106 }
1110 1107
1111 void registerMixinUse( 1108 void registerMixinUse(
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 if (hasClosurization) { 1756 if (hasClosurization) {
1760 return MemberUses.NONE; 1757 return MemberUses.NONE;
1761 } 1758 }
1762 hasNormalUse = hasClosurization = true; 1759 hasNormalUse = hasClosurization = true;
1763 return _pendingUse.removeAll(MemberUses.ALL_STATIC); 1760 return _pendingUse.removeAll(MemberUses.ALL_STATIC);
1764 } 1761 }
1765 1762
1766 @override 1763 @override
1767 EnumSet<MemberUse> get _originalUse => MemberUses.ALL_STATIC; 1764 EnumSet<MemberUse> get _originalUse => MemberUses.ALL_STATIC;
1768 } 1765 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/universe/function_set.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698