mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
[dart2js] cleanup element_map_impl
Small follow up cleanup in element_map_impl addressing comments from the previous code review. Change-Id: I1eea8bba35575b953de4686351e60f0cbf353d84 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260066 Commit-Queue: Sigmund Cherem <sigmund@google.com> Reviewed-by: Mayank Patke <fishythefish@google.com>
This commit is contained in:
parent
755f124fcd
commit
3add88c955
|
@ -1521,12 +1521,12 @@ class JsKernelToElementMap
|
|||
}
|
||||
|
||||
@override
|
||||
FunctionEntity getSuperNoSuchMethod(ClassEntity? cls) {
|
||||
while (cls != null) {
|
||||
cls = elementEnvironment.getSuperClass(cls);
|
||||
if (cls == null) break;
|
||||
MemberEntity? member =
|
||||
elementEnvironment.lookupLocalClassMember(cls, Names.noSuchMethod_);
|
||||
FunctionEntity getSuperNoSuchMethod(ClassEntity cls) {
|
||||
while (true) {
|
||||
ClassEntity? superclass = elementEnvironment.getSuperClass(cls);
|
||||
if (superclass == null) break;
|
||||
MemberEntity? member = elementEnvironment.lookupLocalClassMember(
|
||||
superclass, Names.noSuchMethod_);
|
||||
if (member != null && !member.isAbstract) {
|
||||
if (member.isFunction) {
|
||||
final function = member as FunctionEntity;
|
||||
|
@ -1538,6 +1538,7 @@ class JsKernelToElementMap
|
|||
// `Object.superNoSuchMethod`.
|
||||
break;
|
||||
}
|
||||
cls = superclass;
|
||||
}
|
||||
return elementEnvironment.lookupLocalClassMember(
|
||||
commonElements.objectClass, Names.noSuchMethod_)! as FunctionEntity;
|
||||
|
|
Loading…
Reference in a new issue