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

Unified Diff: pkg/compiler/lib/src/kernel/no_such_method_resolver.dart

Issue 2904493002: Use KernelToElementMap (more) directly in KernelSsaBuilder (Closed)
Patch Set: Created 3 years, 7 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/kernel/element_map.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/no_such_method_resolver.dart
diff --git a/pkg/compiler/lib/src/kernel/no_such_method_resolver.dart b/pkg/compiler/lib/src/kernel/no_such_method_resolver.dart
index af80ffcf3fa3d4a32196a2e53d2cbac2ee840959..c57d9e18277eb51b54a397b04edaf80a9009cc4e 100644
--- a/pkg/compiler/lib/src/kernel/no_such_method_resolver.dart
+++ b/pkg/compiler/lib/src/kernel/no_such_method_resolver.dart
@@ -65,27 +65,6 @@ class KernelNoSuchMethodResolver implements NoSuchMethodResolver {
@override
FunctionEntity getSuperNoSuchMethod(FunctionEntity method) {
- ClassEntity cls = method.enclosingClass;
- while (cls != null) {
- cls = _elementEnvironment.getSuperClass(cls);
- MemberEntity member =
- _elementEnvironment.lookupClassMember(cls, Identifiers.noSuchMethod_);
- if (member != null) {
- if (member.isFunction) {
- FunctionEntity function = member;
- if (function.parameterStructure.positionalParameters >= 1) {
- return function;
- }
- }
- // If [member] is not a valid `noSuchMethod` the target is
- // `Object.superNoSuchMethod`.
- break;
- }
- }
- FunctionEntity function = _elementEnvironment.lookupClassMember(
- _commonElements.objectClass, Identifiers.noSuchMethod_);
- assert(invariant(method, function != null,
- message: "No super noSuchMethod found for $method."));
- return function;
+ return elementMap.getSuperNoSuchMethod(method.enclosingClass);
}
}
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698