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

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

Issue 2563443007: Reduce use of Compiler.closedWorld (Closed)
Patch Set: Created 4 years 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/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index f6cdaceffac2cc245792f6c055f5d8873bc9e034..6295deda4d7013959a74cfa4803921d33c02e555 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -180,7 +180,7 @@ abstract class InferrerEngine<T, V extends TypeSystem>
void forEachElementMatching(
Selector selector, TypeMask mask, bool f(Element element)) {
Iterable<Element> elements =
- compiler.closedWorld.allFunctions.filter(selector, mask);
+ closedWorld.allFunctions.filter(selector, mask);
for (Element e in elements) {
if (!f(e.implementation)) return;
}
@@ -492,7 +492,7 @@ class SimpleTypeInferrerVisitor<T>
});
}
if (analyzedElement.isGenerativeConstructor && cls.isAbstract) {
- if (compiler.closedWorld.isInstantiated(cls)) {
+ if (closedWorld.isInstantiated(cls)) {
returnType = types.nonNullSubclass(cls);
} else {
// TODO(johnniwinther): Avoid analyzing [analyzedElement] in this
@@ -655,7 +655,7 @@ class SimpleTypeInferrerVisitor<T>
bool isInClassOrSubclass(Element element) {
ClassElement cls = outermostElement.enclosingClass.declaration;
ClassElement enclosing = element.enclosingClass.declaration;
- return compiler.closedWorld.isSubclassOf(enclosing, cls);
+ return closedWorld.isSubclassOf(enclosing, cls);
}
void checkIfExposesThis(Selector selector, TypeMask mask) {
@@ -1362,7 +1362,7 @@ class SimpleTypeInferrerVisitor<T>
(node.asSendSet() != null) &&
(node.asSendSet().receiver != null) &&
node.asSendSet().receiver.isThis()) {
- Iterable<Element> targets = compiler.closedWorld.allFunctions.filter(
+ Iterable<Element> targets = closedWorld.allFunctions.filter(
setterSelector, types.newTypedSelector(thisType, setterMask));
// We just recognized a field initialization of the form:
// `this.foo = 42`. If there is only one target, we can update
@@ -1635,7 +1635,7 @@ class SimpleTypeInferrerVisitor<T>
} else if (element != null &&
element.isField &&
Elements.isStaticOrTopLevelField(element) &&
- compiler.closedWorld.fieldNeverChanges(element)) {
+ closedWorld.fieldNeverChanges(element)) {
FieldElement fieldElement = element;
ConstantValue value =
compiler.backend.constants.getConstantValue(fieldElement.constant);
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698