File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -19,19 +19,21 @@ package org.jetbrains.kotlin.codegen.intrinsics
19
19
import org.jetbrains.kotlin.codegen.AsmUtil.numberFunctionOperandType
20
20
import org.jetbrains.kotlin.codegen.Callable
21
21
import org.jetbrains.kotlin.codegen.CallableMethod
22
+ import org.jetbrains.kotlin.codegen.StackValue
22
23
import org.jetbrains.org.objectweb.asm.Type
23
24
24
25
class Inv : IntrinsicMethod () {
25
26
override fun toCallable (method : CallableMethod ): Callable {
26
- val type = numberFunctionOperandType(method.returnType)
27
- return createUnaryIntrinsicCallable(method, newThisType = type ) {
27
+ val intermediateResultType = numberFunctionOperandType(method.returnType)
28
+ return createUnaryIntrinsicCallable(method) {
28
29
if (returnType == Type .LONG_TYPE ) {
29
30
it.lconst(- 1 )
30
31
}
31
32
else {
32
33
it.iconst(- 1 )
33
34
}
34
- it.xor(returnType)
35
+ it.xor(intermediateResultType)
36
+ StackValue .coerce(intermediateResultType, returnType, it)
35
37
}
36
38
}
37
39
}
You can’t perform that action at this time.
0 commit comments