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

Side by Side Diff: pkg/compiler/lib/src/world.dart

Issue 2585223002: Access ConstantSystem through ClosedWorld. (Closed)
Patch Set: 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
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 dart2js.world; 5 library dart2js.world;
6 6
7 import 'cache_strategy.dart'; 7 import 'cache_strategy.dart';
8 import 'closure.dart' show SynthesizedCallMethodElementX; 8 import 'closure.dart' show SynthesizedCallMethodElementX;
9 import 'common/backend_api.dart' show BackendClasses; 9 import 'common/backend_api.dart' show BackendClasses;
10 import 'common.dart'; 10 import 'common.dart';
11 import 'constants/constant_system.dart';
11 import 'core_types.dart' show CoreTypes, CoreClasses, CommonElements; 12 import 'core_types.dart' show CoreTypes, CoreClasses, CommonElements;
12 import 'dart_types.dart'; 13 import 'dart_types.dart';
13 import 'elements/elements.dart' 14 import 'elements/elements.dart'
14 show 15 show
15 ClassElement, 16 ClassElement,
16 Element, 17 Element,
17 FunctionElement, 18 FunctionElement,
18 MixinApplicationElement, 19 MixinApplicationElement,
19 TypedefElement, 20 TypedefElement,
20 FieldElement; 21 FieldElement;
(...skipping 25 matching lines...) Expand all
46 47
47 /// Access to core classes used in the Dart language. 48 /// Access to core classes used in the Dart language.
48 CoreClasses get coreClasses; 49 CoreClasses get coreClasses;
49 50
50 CoreTypes get coreTypes; 51 CoreTypes get coreTypes;
51 52
52 CommonElements get commonElements; 53 CommonElements get commonElements;
53 54
54 CommonMasks get commonMasks; 55 CommonMasks get commonMasks;
55 56
57 ConstantSystem get constantSystem;
58
56 /// Returns `true` if [cls] is either directly or indirectly instantiated. 59 /// Returns `true` if [cls] is either directly or indirectly instantiated.
57 bool isInstantiated(ClassElement cls); 60 bool isInstantiated(ClassElement cls);
58 61
59 /// Returns `true` if [cls] is directly instantiated. This means that at 62 /// Returns `true` if [cls] is directly instantiated. This means that at
60 /// runtime instances of exactly [cls] are assumed to exist. 63 /// runtime instances of exactly [cls] are assumed to exist.
61 bool isDirectlyInstantiated(ClassElement cls); 64 bool isDirectlyInstantiated(ClassElement cls);
62 65
63 /// Returns `true` if [cls] is abstractly instantiated. This means that at 66 /// Returns `true` if [cls] is abstractly instantiated. This means that at
64 /// runtime instances of [cls] or unknown subclasses of [cls] are assumed to 67 /// runtime instances of [cls] or unknown subclasses of [cls] are assumed to
65 /// exist. 68 /// exist.
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 904
902 FunctionSet get allFunctions => _allFunctions; 905 FunctionSet get allFunctions => _allFunctions;
903 906
904 CommonMasks get commonMasks { 907 CommonMasks get commonMasks {
905 assert(isClosed); 908 assert(isClosed);
906 return _commonMasks; 909 return _commonMasks;
907 } 910 }
908 911
909 CoreClasses get coreClasses => commonElements; 912 CoreClasses get coreClasses => commonElements;
910 913
914 ConstantSystem get constantSystem => _backend.constantSystem;
915
911 /// Called to add [cls] to the set of known classes. 916 /// Called to add [cls] to the set of known classes.
912 /// 917 ///
913 /// This ensures that class hierarchy queries can be performed on [cls] and 918 /// This ensures that class hierarchy queries can be performed on [cls] and
914 /// classes that extend or implement it. 919 /// classes that extend or implement it.
915 void registerClass(ClassElement cls) => _registerClass(cls); 920 void registerClass(ClassElement cls) => _registerClass(cls);
916 921
917 void registerClosureClass(ClassElement cls) { 922 void registerClosureClass(ClassElement cls) {
918 _registerClass(cls, isDirectlyInstantiated: true); 923 _registerClass(cls, isDirectlyInstantiated: true);
919 } 924 }
920 925
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 /// Only the class itself is included. 1232 /// Only the class itself is included.
1228 EXACT, 1233 EXACT,
1229 1234
1230 /// The class and all subclasses (transitively) are included. 1235 /// The class and all subclasses (transitively) are included.
1231 SUBCLASS, 1236 SUBCLASS,
1232 1237
1233 /// The class and all classes that implement or subclass it (transitively) 1238 /// The class and all classes that implement or subclass it (transitively)
1234 /// are included. 1239 /// are included.
1235 SUBTYPE, 1240 SUBTYPE,
1236 } 1241 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698