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

Unified Diff: pkg/compiler/lib/src/world.dart

Issue 2810683002: Use entities in Selector methods (Closed)
Patch Set: Created 3 years, 8 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/selector.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/world.dart
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 0a0a2f3a491fa6f5d4f866848e9f212768725505..c5f2755adc74489e3980835fa536e1e8a5b03fb7 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -930,13 +930,12 @@ class ClosedWorldImpl implements ClosedWorld, ClosedWorldRefiner {
: result.implementation == element.implementation;
}
- Element findMatchIn(ClassElement cls, Selector selector,
+ MemberElement findMatchIn(ClassElement cls, Selector selector,
{ClassElement stopAtSuperclass}) {
// Use the [:implementation] of [cls] in case the found [element]
// is in the patch class.
- var result = cls.implementation
+ return cls.implementation
.lookupByName(selector.memberName, stopAt: stopAtSuperclass);
- return result;
}
/// Returns whether a [selector] call on an instance of [cls]
@@ -945,7 +944,7 @@ class ClosedWorldImpl implements ClosedWorld, ClosedWorldRefiner {
{ClassElement stopAtSuperclass}) {
assert(invariant(cls, isInstantiated(cls),
message: '$cls has not been instantiated.'));
- Element element = findMatchIn(cls, selector);
+ MemberElement element = findMatchIn(cls, selector);
if (element == null) return false;
if (element.isAbstract) {
« no previous file with comments | « pkg/compiler/lib/src/universe/selector.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698