OLD | NEW |
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 Backend; | 8 import '../common/backend_api.dart' show Backend; |
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 19 matching lines...) Expand all Loading... |
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 final ClassWorld classWorld; | 34 final ClassWorld classWorld; |
35 // TODO(sigmund): once we split out the backend common elements, depend | 35 // TODO(sigmund): once we split out the backend common elements, depend |
36 // directly on those instead. | 36 // directly on those instead. |
37 final Compiler compiler; | 37 final Compiler compiler; |
38 | 38 |
39 CommonMasks(Compiler compiler) | 39 CommonMasks(Compiler compiler) |
40 : this.classWorld = compiler.closedWorld, | 40 : this.classWorld = compiler.openWorld, |
41 compiler = compiler; | 41 compiler = compiler; |
42 | 42 |
43 TypeMask _dynamicType; | 43 TypeMask _dynamicType; |
44 TypeMask _nonNullType; | 44 TypeMask _nonNullType; |
45 TypeMask _nullType; | 45 TypeMask _nullType; |
46 TypeMask _intType; | 46 TypeMask _intType; |
47 TypeMask _uint32Type; | 47 TypeMask _uint32Type; |
48 TypeMask _uint31Type; | 48 TypeMask _uint31Type; |
49 TypeMask _positiveIntType; | 49 TypeMask _positiveIntType; |
50 TypeMask _doubleType; | 50 TypeMask _doubleType; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 _asyncFutureType ??= new TypeMask.nonNullExact( | 127 _asyncFutureType ??= new TypeMask.nonNullExact( |
128 compiler.backend.asyncFutureImplementation, classWorld); | 128 compiler.backend.asyncFutureImplementation, classWorld); |
129 | 129 |
130 TypeMask get asyncStarStreamType => | 130 TypeMask get asyncStarStreamType => |
131 _asyncStarStreamType ??= new TypeMask.nonNullExact( | 131 _asyncStarStreamType ??= new TypeMask.nonNullExact( |
132 compiler.backend.asyncStarStreamImplementation, classWorld); | 132 compiler.backend.asyncStarStreamImplementation, classWorld); |
133 | 133 |
134 // TODO(johnniwinther): Assert that the null type has been resolved. | 134 // TODO(johnniwinther): Assert that the null type has been resolved. |
135 TypeMask get nullType => _nullType ??= const TypeMask.empty(); | 135 TypeMask get nullType => _nullType ??= const TypeMask.empty(); |
136 } | 136 } |
OLD | NEW |