Minor, inline FunctionCodegen.getSignatureMapper
This commit is contained in:
@@ -434,7 +434,7 @@ public class FunctionCodegen {
|
|||||||
mv.visitLabel(methodBegin);
|
mv.visitLabel(methodBegin);
|
||||||
|
|
||||||
KotlinTypeMapper typeMapper = parentCodegen.typeMapper;
|
KotlinTypeMapper typeMapper = parentCodegen.typeMapper;
|
||||||
if (BuiltinSpecialBridgesUtil.shouldHaveTypeSafeBarrier(functionDescriptor, getSignatureMapper(typeMapper))) {
|
if (BuiltinSpecialBridgesUtil.shouldHaveTypeSafeBarrier(functionDescriptor, typeMapper::mapAsmMethod)) {
|
||||||
generateTypeCheckBarrierIfNeeded(
|
generateTypeCheckBarrierIfNeeded(
|
||||||
new InstructionAdapter(mv), functionDescriptor, signature.getReturnType(), /* delegateParameterTypes = */null);
|
new InstructionAdapter(mv), functionDescriptor, signature.getReturnType(), /* delegateParameterTypes = */null);
|
||||||
}
|
}
|
||||||
@@ -759,11 +759,8 @@ public class FunctionCodegen {
|
|||||||
|
|
||||||
Set<Bridge<Method>> bridgesToGenerate;
|
Set<Bridge<Method>> bridgesToGenerate;
|
||||||
if (!isSpecial) {
|
if (!isSpecial) {
|
||||||
bridgesToGenerate = ImplKt.generateBridgesForFunctionDescriptor(
|
bridgesToGenerate =
|
||||||
descriptor,
|
ImplKt.generateBridgesForFunctionDescriptor(descriptor, typeMapper::mapAsmMethod, IS_PURE_INTERFACE_CHECKER);
|
||||||
getSignatureMapper(typeMapper),
|
|
||||||
IS_PURE_INTERFACE_CHECKER
|
|
||||||
);
|
|
||||||
if (!bridgesToGenerate.isEmpty()) {
|
if (!bridgesToGenerate.isEmpty()) {
|
||||||
PsiElement origin = descriptor.getKind() == DECLARATION ? getSourceFromDescriptor(descriptor) : null;
|
PsiElement origin = descriptor.getKind() == DECLARATION ? getSourceFromDescriptor(descriptor) : null;
|
||||||
boolean isSpecialBridge =
|
boolean isSpecialBridge =
|
||||||
@@ -776,9 +773,7 @@ public class FunctionCodegen {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Set<BridgeForBuiltinSpecial<Method>> specials = BuiltinSpecialBridgesUtil.generateBridgesForBuiltinSpecial(
|
Set<BridgeForBuiltinSpecial<Method>> specials = BuiltinSpecialBridgesUtil.generateBridgesForBuiltinSpecial(
|
||||||
descriptor,
|
descriptor, typeMapper::mapAsmMethod, IS_PURE_INTERFACE_CHECKER
|
||||||
getSignatureMapper(typeMapper),
|
|
||||||
IS_PURE_INTERFACE_CHECKER
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!specials.isEmpty()) {
|
if (!specials.isEmpty()) {
|
||||||
@@ -811,11 +806,6 @@ public class FunctionCodegen {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private static Function1<FunctionDescriptor, Method> getSignatureMapper(@NotNull KotlinTypeMapper typeMapper) {
|
|
||||||
return typeMapper::mapAsmMethod;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isMethodOfAny(@NotNull FunctionDescriptor descriptor) {
|
public static boolean isMethodOfAny(@NotNull FunctionDescriptor descriptor) {
|
||||||
String name = descriptor.getName().asString();
|
String name = descriptor.getName().asString();
|
||||||
List<ValueParameterDescriptor> parameters = descriptor.getValueParameters();
|
List<ValueParameterDescriptor> parameters = descriptor.getValueParameters();
|
||||||
|
|||||||
Reference in New Issue
Block a user