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

Unified Diff: pkg/compiler/lib/src/world.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/world.dart
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 99aca9f29bcf87d8a42f0a0ba9b0b2ab3ab6d625..19fb9a2008e283ccdaf56d25563f1cd4812f52c8 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -19,7 +19,7 @@ import 'elements/elements.dart'
TypedefElement,
VariableElement;
import 'ordered_typeset.dart';
-import 'types/types.dart' as ti;
+import 'types/masks.dart' show TypeMask, FlatTypeMask;
import 'universe/class_set.dart';
import 'universe/function_set.dart' show FunctionSet;
import 'universe/selector.dart' show Selector;
@@ -190,10 +190,10 @@ class World implements ClassWorld {
ClassElement get stringClass => coreClasses.stringClass;
ClassElement get nullClass => coreClasses.nullClass;
- /// Cache of [ti.FlatTypeMask]s grouped by the 8 possible values of the
- /// [ti.FlatTypeMask.flags] property.
- List<Map<ClassElement, ti.TypeMask>> canonicalizedTypeMasks =
- new List<Map<ClassElement, ti.TypeMask>>.filled(8, null);
+ /// Cache of [FlatTypeMask]s grouped by the 8 possible values of the
+ /// `FlatTypeMask.flags` property.
+ List<Map<ClassElement, TypeMask>> canonicalizedTypeMasks =
+ new List<Map<ClassElement, TypeMask>>.filled(8, null);
bool checkInvariants(ClassElement cls, {bool mustBeInstantiated: true}) {
return invariant(cls, cls.isDeclaration,
@@ -710,7 +710,7 @@ class World implements ClassWorld {
users.add(mixinApplication);
}
- bool hasAnyUserDefinedGetter(Selector selector, ti.TypeMask mask) {
+ bool hasAnyUserDefinedGetter(Selector selector, TypeMask mask) {
return allFunctions.filter(selector, mask).any((each) => each.isGetter);
}
@@ -720,23 +720,23 @@ class World implements ClassWorld {
}
}
- VariableElement locateSingleField(Selector selector, ti.TypeMask mask) {
+ VariableElement locateSingleField(Selector selector, TypeMask mask) {
Element result = locateSingleElement(selector, mask);
return (result != null && result.isField) ? result : null;
}
- Element locateSingleElement(Selector selector, ti.TypeMask mask) {
- mask = mask == null ? compiler.typesTask.dynamicType : mask;
+ Element locateSingleElement(Selector selector, TypeMask mask) {
+ mask ??= compiler.commonMasks.dynamicType;
return mask.locateSingleElement(selector, mask, compiler);
}
- ti.TypeMask extendMaskIfReachesAll(Selector selector, ti.TypeMask mask) {
+ TypeMask extendMaskIfReachesAll(Selector selector, TypeMask mask) {
bool canReachAll = true;
if (mask != null) {
canReachAll = compiler.enabledInvokeOn &&
mask.needsNoSuchMethodHandling(selector, this);
}
- return canReachAll ? compiler.typesTask.dynamicType : mask;
+ return canReachAll ? compiler.commonMasks.dynamicType : mask;
}
void addFunctionCalledInLoop(Element element) {
@@ -791,7 +791,7 @@ class World implements ClassWorld {
sideEffectsFreeElements.add(element);
}
- SideEffects getSideEffectsOfSelector(Selector selector, ti.TypeMask mask) {
+ SideEffects getSideEffectsOfSelector(Selector selector, TypeMask mask) {
// We're not tracking side effects of closures.
if (selector.isClosureCall) return new SideEffects();
SideEffects sideEffects = new SideEffects.empty();
« no previous file with comments | « pkg/compiler/lib/src/types/value_type_mask.dart ('k') | tests/compiler/dart2js/call_site_simple_type_inferer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698