Exclude local variables and try catch blocks of non-inline functions from ABI
This commit is contained in:
+2
@@ -19,5 +19,7 @@ internal class ReplaceWithEmptyMethodVisitor(
|
||||
) : TransformationMethodVisitor(delegate, access, name, desc, signature, exceptions, api = ABI_EXTENSION_ASM_API_VERSION) {
|
||||
override fun performTransformations(methodNode: MethodNode) {
|
||||
methodNode.instructions.clear()
|
||||
methodNode.localVariables.clear()
|
||||
methodNode.tryCatchBlocks.clear()
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,10 @@
|
||||
package test
|
||||
|
||||
fun sum(x: Int, y: Int): Int = x + y
|
||||
fun sum(x: Int, y: Int): Int =
|
||||
try {
|
||||
var result = x
|
||||
result += y
|
||||
result
|
||||
} finally {
|
||||
// do nothing
|
||||
}
|
||||
Reference in New Issue
Block a user