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

Unified Diff: pkg/compiler/lib/src/universe/selector.dart

Issue 2320583002: Introduce OpenWorld. (Closed)
Patch Set: Updated cf. comments. Created 4 years, 3 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
« no previous file with comments | « pkg/compiler/lib/src/universe/function_set.dart ('k') | pkg/compiler/lib/src/universe/universe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/universe/selector.dart
diff --git a/pkg/compiler/lib/src/universe/selector.dart b/pkg/compiler/lib/src/universe/selector.dart
index 19ce7c6b72fdb5c30ad03bf4da7ca24315a4864b..14d8b3adaf90b734fd3789e4e9fb2ed0f592a600 100644
--- a/pkg/compiler/lib/src/universe/selector.dart
+++ b/pkg/compiler/lib/src/universe/selector.dart
@@ -16,7 +16,7 @@ import '../elements/elements.dart'
LibraryElement,
PublicName;
import '../util/util.dart' show Hashing;
-import '../world.dart' show World;
+import '../common/resolution.dart' show Target;
import 'call_structure.dart' show CallStructure;
class SelectorKind {
@@ -217,20 +217,20 @@ class Selector {
return kind;
}
- bool appliesUnnamed(Element element, World world) {
- assert(sameNameHack(element, world));
- return appliesUntyped(element, world);
+ bool appliesUnnamed(Element element, Target target) {
+ assert(sameNameHack(element));
+ return appliesUntyped(element, target);
}
- bool appliesUntyped(Element element, World world) {
- assert(sameNameHack(element, world));
+ bool appliesUntyped(Element element, Target target) {
+ assert(sameNameHack(element));
if (Elements.isUnresolved(element)) return false;
if (memberName.isPrivate && memberName.library != element.library) {
// TODO(johnniwinther): Maybe this should be
// `memberName != element.memberName`.
return false;
}
- if (world.isForeign(element)) return true;
+ if (target.isForeign(element)) return true;
if (element.isSetter) return isSetter;
if (element.isGetter) return isGetter || isCall;
if (element.isField) {
@@ -248,14 +248,14 @@ class Selector {
return callStructure.signatureApplies(function.functionSignature);
}
- bool sameNameHack(Element element, World world) {
+ bool sameNameHack(Element element) {
// TODO(ngeoffray): Remove workaround checks.
return element.isConstructor || name == element.name;
}
- bool applies(Element element, World world) {
- if (!sameNameHack(element, world)) return false;
- return appliesUnnamed(element, world);
+ bool applies(Element element, Target target) {
+ if (!sameNameHack(element)) return false;
+ return appliesUnnamed(element, target);
}
bool match(SelectorKind kind, Name memberName, CallStructure callStructure) {
« no previous file with comments | « pkg/compiler/lib/src/universe/function_set.dart ('k') | pkg/compiler/lib/src/universe/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698