|
|
@ -9,6 +9,7 @@ import org.objectweb.asm.tree.LabelNode |
|
|
|
import org.objectweb.asm.tree.LdcInsnNode |
|
|
|
import org.objectweb.asm.tree.LdcInsnNode |
|
|
|
import org.objectweb.asm.tree.LookupSwitchInsnNode |
|
|
|
import org.objectweb.asm.tree.LookupSwitchInsnNode |
|
|
|
import org.objectweb.asm.tree.TableSwitchInsnNode |
|
|
|
import org.objectweb.asm.tree.TableSwitchInsnNode |
|
|
|
|
|
|
|
import org.objectweb.asm.tree.TryCatchBlockNode |
|
|
|
import org.objectweb.asm.util.Textifier |
|
|
|
import org.objectweb.asm.util.Textifier |
|
|
|
import org.objectweb.asm.util.TraceMethodVisitor |
|
|
|
import org.objectweb.asm.util.TraceMethodVisitor |
|
|
|
import java.io.PrintWriter |
|
|
|
import java.io.PrintWriter |
|
|
@ -306,3 +307,16 @@ fun AbstractInsnNode.toPrettyString(): String { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun TryCatchBlockNode.isBodyEmpty(): Boolean { |
|
|
|
|
|
|
|
var current = start.next |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (true) { |
|
|
|
|
|
|
|
when { |
|
|
|
|
|
|
|
current == null -> return false |
|
|
|
|
|
|
|
current === end -> return true |
|
|
|
|
|
|
|
current.opcode != -1 -> return false |
|
|
|
|
|
|
|
else -> current = current.next |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|