|
|
@ -181,7 +181,8 @@ private val SIMPLE_OPCODES = mapOf( |
|
|
|
Opcodes.IFNONNULL to POP1 |
|
|
|
Opcodes.IFNONNULL to POP1 |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
fun AbstractInsnNode.stackMetadata(): StackMetadata = when (this) { |
|
|
|
val AbstractInsnNode.stackMetadata |
|
|
|
|
|
|
|
get() = when (this) { |
|
|
|
is LdcInsnNode -> if (cst is Double || cst is Long) { |
|
|
|
is LdcInsnNode -> if (cst is Double || cst is Long) { |
|
|
|
PUSH2 |
|
|
|
PUSH2 |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -213,4 +214,4 @@ fun AbstractInsnNode.stackMetadata(): StackMetadata = when (this) { |
|
|
|
is InvokeDynamicInsnNode -> throw UnsupportedOperationException() |
|
|
|
is InvokeDynamicInsnNode -> throw UnsupportedOperationException() |
|
|
|
is MultiANewArrayInsnNode -> StackMetadata(dims, 1) |
|
|
|
is MultiANewArrayInsnNode -> StackMetadata(dims, 1) |
|
|
|
else -> SIMPLE_OPCODES[opcode] ?: throw IllegalArgumentException() |
|
|
|
else -> SIMPLE_OPCODES[opcode] ?: throw IllegalArgumentException() |
|
|
|
} |
|
|
|
} |
|
|
|