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

Side by Side Diff: pkg/compiler/lib/src/types/masks.dart

Issue 2488353004: Remove Compiler access from ResolutionEnqueuer (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 masks; 5 library masks;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/backend_api.dart' show BackendClasses; 8 import '../common/backend_api.dart' show BackendClasses;
9 import '../compiler.dart' show Compiler; 9 import '../compiler.dart' show Compiler;
10 import '../constants/values.dart' show PrimitiveConstantValue; 10 import '../constants/values.dart' show PrimitiveConstantValue;
(...skipping 15 matching lines...) Expand all
26 part 'flat_type_mask.dart'; 26 part 'flat_type_mask.dart';
27 part 'forwarding_type_mask.dart'; 27 part 'forwarding_type_mask.dart';
28 part 'map_type_mask.dart'; 28 part 'map_type_mask.dart';
29 part 'type_mask.dart'; 29 part 'type_mask.dart';
30 part 'union_type_mask.dart'; 30 part 'union_type_mask.dart';
31 part 'value_type_mask.dart'; 31 part 'value_type_mask.dart';
32 32
33 class CommonMasks { 33 class CommonMasks {
34 // TODO(sigmund): once we split out the backend common elements, depend 34 // TODO(sigmund): once we split out the backend common elements, depend
35 // directly on those instead. 35 // directly on those instead.
36 final Compiler compiler; 36 final ClosedWorld closedWorld;
37 37
38 CommonMasks(this.compiler); 38 CommonMasks(this.closedWorld);
39
40 ClosedWorld get closedWorld => compiler.closedWorld;
41 39
42 BackendClasses get backendClasses => closedWorld.backendClasses; 40 BackendClasses get backendClasses => closedWorld.backendClasses;
43 41
44 TypeMask _dynamicType; 42 TypeMask _dynamicType;
45 TypeMask _nonNullType; 43 TypeMask _nonNullType;
46 TypeMask _nullType; 44 TypeMask _nullType;
47 TypeMask _intType; 45 TypeMask _intType;
48 TypeMask _uint32Type; 46 TypeMask _uint32Type;
49 TypeMask _uint31Type; 47 TypeMask _uint31Type;
50 TypeMask _positiveIntType; 48 TypeMask _positiveIntType;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 _asyncFutureType ??= new TypeMask.nonNullExact( 126 _asyncFutureType ??= new TypeMask.nonNullExact(
129 backendClasses.asyncFutureImplementation, closedWorld); 127 backendClasses.asyncFutureImplementation, closedWorld);
130 128
131 TypeMask get asyncStarStreamType => 129 TypeMask get asyncStarStreamType =>
132 _asyncStarStreamType ??= new TypeMask.nonNullExact( 130 _asyncStarStreamType ??= new TypeMask.nonNullExact(
133 backendClasses.asyncStarStreamImplementation, closedWorld); 131 backendClasses.asyncStarStreamImplementation, closedWorld);
134 132
135 // TODO(johnniwinther): Assert that the null type has been resolved. 133 // TODO(johnniwinther): Assert that the null type has been resolved.
136 TypeMask get nullType => _nullType ??= const TypeMask.empty(); 134 TypeMask get nullType => _nullType ??= const TypeMask.empty();
137 } 135 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/types/forwarding_type_mask.dart ('k') | pkg/compiler/lib/src/types/type_mask.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698