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

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

Issue 2569733002: Even less reliance on Compiler.closedWorld (Closed)
Patch Set: Updated cf. comments. 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
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 253e65f47a35aed6362deda2f39ba24fe78fa020..b60f5d6ea41b6cff4f57f2b902c06db8e1d8a7cd 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -1695,26 +1695,28 @@ class SimpleTypeInferrerVisitor<T>
}
T returnType = handleStaticSend(node, selector, mask, target, arguments);
- if (Elements.isGrowableListConstructorCall(constructor, node, compiler)) {
+ if (Elements.isGrowableListConstructorCall(
+ constructor, node, closedWorld.commonElements)) {
return inferrer.concreteTypes.putIfAbsent(
node,
() => types.allocateList(types.growableListType, node,
outermostElement, types.nonNullEmpty(), 0));
} else if (Elements.isFixedListConstructorCall(
- constructor, node, compiler) ||
- Elements.isFilledListConstructorCall(constructor, node, compiler)) {
+ constructor, node, closedWorld.commonElements) ||
+ Elements.isFilledListConstructorCall(
+ constructor, node, closedWorld.commonElements)) {
int length = findLength(node);
- T elementType =
- Elements.isFixedListConstructorCall(constructor, node, compiler)
- ? types.nullType
- : arguments.positional[1];
+ T elementType = Elements.isFixedListConstructorCall(
+ constructor, node, closedWorld.commonElements)
+ ? types.nullType
+ : arguments.positional[1];
return inferrer.concreteTypes.putIfAbsent(
node,
() => types.allocateList(types.fixedListType, node, outermostElement,
elementType, length));
} else if (Elements.isConstructorOfTypedArraySubclass(
- constructor, compiler)) {
+ constructor, closedWorld)) {
int length = findLength(node);
T elementType = inferrer
.returnTypeOfElement(target.enclosingClass.lookupMember('[]'));
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_visitor.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