| Index: pkg/compiler/lib/src/types/constants.dart
|
| diff --git a/pkg/compiler/lib/src/types/constants.dart b/pkg/compiler/lib/src/types/constants.dart
|
| index 219e6b1043c8c879d9ab78394a280fe1783705ca..b4689ce2de7e71d1c48ab3bc9d418daf641dc206 100644
|
| --- a/pkg/compiler/lib/src/types/constants.dart
|
| +++ b/pkg/compiler/lib/src/types/constants.dart
|
| @@ -8,7 +8,7 @@ import '../common.dart';
|
| import '../compiler.dart' show Compiler;
|
| import '../constants/values.dart';
|
| import '../js_backend/js_backend.dart' show SyntheticConstantKind;
|
| -import 'types.dart';
|
| +import 'masks.dart';
|
|
|
| /// Computes the [TypeMask] for the constant [value].
|
| TypeMask computeTypeMask(Compiler compiler, ConstantValue value) {
|
| @@ -22,7 +22,7 @@ class ConstantValueTypeMasks extends ConstantValueVisitor<TypeMask, Compiler> {
|
| TypeMask visitConstructed(
|
| ConstructedConstantValue constant, Compiler compiler) {
|
| if (compiler.backend.isInterceptorClass(constant.type.element)) {
|
| - return compiler.typesTask.nonNullType;
|
| + return compiler.commonMasks.nonNullType;
|
| }
|
| return new TypeMask.nonNullExact(constant.type.element, compiler.world);
|
| }
|
| @@ -37,13 +37,13 @@ class ConstantValueTypeMasks extends ConstantValueVisitor<TypeMask, Compiler> {
|
| // We have to recognize double constants that are 'is int'.
|
| if (compiler.backend.constantSystem.isInt(constant)) {
|
| if (constant.isMinusZero) {
|
| - return compiler.typesTask.uint31Type;
|
| + return compiler.commonMasks.uint31Type;
|
| } else {
|
| assert(constant.isPositiveInfinity || constant.isNegativeInfinity);
|
| - return compiler.typesTask.intType;
|
| + return compiler.commonMasks.intType;
|
| }
|
| }
|
| - return compiler.typesTask.doubleType;
|
| + return compiler.commonMasks.doubleType;
|
| }
|
|
|
| @override
|
| @@ -54,9 +54,9 @@ class ConstantValueTypeMasks extends ConstantValueVisitor<TypeMask, Compiler> {
|
| case SyntheticConstantKind.EMPTY_VALUE:
|
| return constant.payload;
|
| case SyntheticConstantKind.TYPEVARIABLE_REFERENCE:
|
| - return compiler.typesTask.intType;
|
| + return compiler.commonMasks.intType;
|
| case SyntheticConstantKind.NAME:
|
| - return compiler.typesTask.stringType;
|
| + return compiler.commonMasks.stringType;
|
| default:
|
| DiagnosticReporter reporter = compiler.reporter;
|
| reporter.internalError(
|
| @@ -67,55 +67,55 @@ class ConstantValueTypeMasks extends ConstantValueVisitor<TypeMask, Compiler> {
|
|
|
| @override
|
| TypeMask visitBool(BoolConstantValue constant, Compiler compiler) {
|
| - return compiler.typesTask.boolType;
|
| + return compiler.commonMasks.boolType;
|
| }
|
|
|
| @override
|
| TypeMask visitFunction(FunctionConstantValue constant, Compiler compiler) {
|
| - return compiler.typesTask.functionType;
|
| + return compiler.commonMasks.functionType;
|
| }
|
|
|
| @override
|
| TypeMask visitInt(IntConstantValue constant, Compiler compiler) {
|
| - if (constant.isUInt31()) return compiler.typesTask.uint31Type;
|
| - if (constant.isUInt32()) return compiler.typesTask.uint32Type;
|
| - if (constant.isPositive()) return compiler.typesTask.positiveIntType;
|
| - return compiler.typesTask.intType;
|
| + if (constant.isUInt31()) return compiler.commonMasks.uint31Type;
|
| + if (constant.isUInt32()) return compiler.commonMasks.uint32Type;
|
| + if (constant.isPositive()) return compiler.commonMasks.positiveIntType;
|
| + return compiler.commonMasks.intType;
|
| }
|
|
|
| @override
|
| TypeMask visitInterceptor(
|
| InterceptorConstantValue constant, Compiler compiler) {
|
| - return compiler.typesTask.nonNullType;
|
| + return compiler.commonMasks.nonNullType;
|
| }
|
|
|
| @override
|
| TypeMask visitList(ListConstantValue constant, Compiler compiler) {
|
| - return compiler.typesTask.constListType;
|
| + return compiler.commonMasks.constListType;
|
| }
|
|
|
| @override
|
| TypeMask visitMap(MapConstantValue constant, Compiler compiler) {
|
| - return compiler.typesTask.constMapType;
|
| + return compiler.commonMasks.constMapType;
|
| }
|
|
|
| @override
|
| TypeMask visitNull(NullConstantValue constant, Compiler compiler) {
|
| - return compiler.typesTask.nullType;
|
| + return compiler.commonMasks.nullType;
|
| }
|
|
|
| @override
|
| TypeMask visitNonConstant(NonConstantValue constant, Compiler compiler) {
|
| - return compiler.typesTask.nullType;
|
| + return compiler.commonMasks.nullType;
|
| }
|
|
|
| @override
|
| TypeMask visitString(StringConstantValue constant, Compiler compiler) {
|
| - return compiler.typesTask.stringType;
|
| + return compiler.commonMasks.stringType;
|
| }
|
|
|
| @override
|
| TypeMask visitType(TypeConstantValue constant, Compiler compiler) {
|
| - return compiler.typesTask.typeType;
|
| + return compiler.commonMasks.typeType;
|
| }
|
| }
|
|
|