diff --git a/asm/src/main/java/dev/openrs2/asm/ClassNodeRemapper.kt b/asm/src/main/java/dev/openrs2/asm/ClassNodeRemapper.kt index 896c01e7e1..095106c167 100644 --- a/asm/src/main/java/dev/openrs2/asm/ClassNodeRemapper.kt +++ b/asm/src/main/java/dev/openrs2/asm/ClassNodeRemapper.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) diff --git a/asm/src/main/java/dev/openrs2/asm/MethodNodeUtils.kt b/asm/src/main/java/dev/openrs2/asm/MethodNodeUtils.kt index 6fad19e13e..bb6556b1de 100644 --- a/asm/src/main/java/dev/openrs2/asm/MethodNodeUtils.kt +++ b/asm/src/main/java/dev/openrs2/asm/MethodNodeUtils.kt @@ -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") } } }