TotalOrderEquals: Handle nulls
This commit is contained in:
committed by
Dmitry Petrov
parent
b1474b11f2
commit
1bf0354e35
@@ -139,7 +139,12 @@ class TotalOrderEquals(operandType: Type) : IntrinsicMethod() {
|
||||
): IrIntrinsicFunction =
|
||||
object : IrIntrinsicFunction(expression, signature, context, listOf(boxedType, boxedType)) {
|
||||
override fun genInvokeInstruction(v: InstructionAdapter) {
|
||||
v.invokevirtual(boxedType.internalName, "equals", Type.getMethodDescriptor(Type.BOOLEAN_TYPE, AsmTypes.OBJECT_TYPE), false)
|
||||
v.invokestatic(
|
||||
IntrinsicMethods.INTRINSICS_CLASS_NAME,
|
||||
"areEqual",
|
||||
Type.getMethodDescriptor(Type.BOOLEAN_TYPE, AsmTypes.OBJECT_TYPE, AsmTypes.OBJECT_TYPE),
|
||||
false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user