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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart

Issue 2278213003: Rename the global inference task and reduce it's API surface by introducing the (Closed)
Patch Set: cl comments Created 4 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index 0c3fb312a670f4297df173fce03273cc477e0db5..feaed3e7536e13904d3793226496f731cfd4dad4 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -14,8 +14,9 @@ import '../dart_types.dart' show DartType, FunctionType, TypeKind;
import '../elements/elements.dart';
import '../tree/dartstring.dart' show DartString;
import '../tree/tree.dart' as ast show Node, LiteralBool, Send;
-import '../types/types.dart'
+import '../types/masks.dart'
show
+ CommonMasks,
ContainerTypeMask,
DictionaryTypeMask,
MapTypeMask,
@@ -491,18 +492,18 @@ class MemberTypeInformation extends ElementTypeInformation
}
}
- Compiler compiler = inferrer.compiler;
+ CommonMasks commonMasks = inferrer.commonMasks;
if (element.isConstructor) {
ConstructorElement constructor = element;
if (constructor.isIntFromEnvironmentConstructor) {
giveUp(inferrer);
- return compiler.typesTask.intType.nullable();
+ return commonMasks.intType.nullable();
} else if (constructor.isBoolFromEnvironmentConstructor) {
giveUp(inferrer);
- return compiler.typesTask.boolType.nullable();
+ return commonMasks.boolType.nullable();
} else if (constructor.isStringFromEnvironmentConstructor) {
giveUp(inferrer);
- return compiler.typesTask.stringType.nullable();
+ return commonMasks.stringType.nullable();
}
}
return null;
@@ -836,7 +837,7 @@ class DynamicCallSiteTypeInformation extends CallSiteTypeInformation {
TypeMask receiverType = receiver.type;
if (mask != receiverType) {
- return receiverType == inferrer.compiler.typesTask.dynamicType
+ return receiverType == inferrer.commonMasks.dynamicType
? null
: receiverType;
} else {
@@ -1725,12 +1726,12 @@ TypeMask _narrowType(Compiler compiler, TypeMask type, DartType annotation,
if (annotation.isObject) return type;
TypeMask otherType;
if (annotation.isTypedef || annotation.isFunctionType) {
- otherType = compiler.typesTask.functionType;
+ otherType = compiler.commonMasks.functionType;
} else if (annotation.isTypeVariable) {
// TODO(ngeoffray): Narrow to bound.
return type;
} else if (annotation.isVoid) {
- otherType = compiler.typesTask.nullType;
+ otherType = compiler.commonMasks.nullType;
} else {
assert(annotation.isInterfaceType);
otherType = new TypeMask.nonNullSubtype(annotation.element, compiler.world);
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698