Remove existing FrameNode manipulation support

This code is no longer used. Remove it to avoid bit rot.

Signed-off-by: Graham <gpe@openrs2.dev>
bzip2
Graham 5 years ago
parent 43646bbd9d
commit 3a29f61d7c
  1. 13
      asm/src/main/java/dev/openrs2/asm/ClassNodeRemapper.kt
  2. 10
      asm/src/main/java/dev/openrs2/asm/MethodNodeUtils.kt

@ -45,20 +45,9 @@ fun ClassNode.remap(remapper: Remapper) {
}
}
private fun Remapper.mapFrameType(type: Any?): Any? {
return if (type is String) {
mapType(type)
} else {
type
}
}
private fun AbstractInsnNode.remap(remapper: Remapper) {
when (this) {
is FrameNode -> {
local = local?.map(remapper::mapFrameType)
stack = stack?.map(remapper::mapFrameType)
}
is FrameNode -> throw UnsupportedOperationException("SKIP_FRAMES and COMPUTE_FRAMES must be used")
is FieldInsnNode -> {
val originalOwner = owner
owner = remapper.mapType(originalOwner)

@ -96,15 +96,7 @@ fun MethodNode.removeArgument(argIndex: Int) {
when (insn) {
is VarInsnNode -> insn.`var` = remap(insn.`var`, argType, localIndex)
is IincInsnNode -> insn.`var` = remap(insn.`var`, argType, localIndex)
is FrameNode -> {
if (insn.type != Opcodes.F_NEW) {
throw UnsupportedOperationException("Only F_NEW frames are supported")
}
for (i in 0 until argType.size) {
insn.local.removeAt(localIndex)
}
}
is FrameNode -> throw UnsupportedOperationException("SKIP_FRAMES and COMPUTE_FRAMES must be used")
}
}
}

Loading…
Cancel
Save