| Index: pkg/compiler/lib/src/kernel/element_map_mixins.dart
|
| diff --git a/pkg/compiler/lib/src/kernel/element_map_mixins.dart b/pkg/compiler/lib/src/kernel/element_map_mixins.dart
|
| index 19f776edcc2ca7f2ee00c80f48182807a71ba52f..0edad4c27fd24d4be4fab60d00a9c5b2a1d31d5f 100644
|
| --- a/pkg/compiler/lib/src/kernel/element_map_mixins.dart
|
| +++ b/pkg/compiler/lib/src/kernel/element_map_mixins.dart
|
| @@ -306,6 +306,30 @@ abstract class KernelToElementMapBaseMixin implements KernelToElementMap {
|
| });
|
| return metadata;
|
| }
|
| +
|
| + FunctionEntity getSuperNoSuchMethod(ClassEntity cls) {
|
| + 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(function != null,
|
| + failedAt(cls, "No super noSuchMethod found for class $cls."));
|
| + return function;
|
| + }
|
| }
|
|
|
| abstract class KernelToElementMapForImpactMixin
|
| @@ -391,31 +415,6 @@ abstract class KernelToElementMapForImpactMixin
|
|
|
| abstract class KernelToElementMapForBuildingMixin
|
| implements KernelToElementMapForBuilding, KernelToElementMapBaseMixin {
|
| - @override
|
| - FunctionEntity getSuperNoSuchMethod(ClassEntity cls) {
|
| - 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(function != null,
|
| - failedAt(cls, "No super noSuchMethod found for class $cls."));
|
| - return function;
|
| - }
|
| -
|
| js.Template getJsBuiltinTemplate(
|
| ConstantValue constant, CodeEmitterTask emitter) {
|
| int index = _extractEnumIndexFromConstantValue(
|
|
|