|
|
@ -4,6 +4,7 @@ import com.github.michaelbull.logging.InlineLogger |
|
|
|
import dev.openrs2.asm.MemberRef |
|
|
|
import dev.openrs2.asm.MemberRef |
|
|
|
import dev.openrs2.asm.classpath.ClassPath |
|
|
|
import dev.openrs2.asm.classpath.ClassPath |
|
|
|
import dev.openrs2.asm.classpath.Library |
|
|
|
import dev.openrs2.asm.classpath.Library |
|
|
|
|
|
|
|
import dev.openrs2.asm.copy |
|
|
|
import dev.openrs2.asm.createIntConstant |
|
|
|
import dev.openrs2.asm.createIntConstant |
|
|
|
import dev.openrs2.asm.deleteExpression |
|
|
|
import dev.openrs2.asm.deleteExpression |
|
|
|
import dev.openrs2.asm.hasCode |
|
|
|
import dev.openrs2.asm.hasCode |
|
|
@ -105,14 +106,7 @@ class ConstantArgTransformer : Transformer() { |
|
|
|
* final pass, as we might discover more routes through the call graph |
|
|
|
* final pass, as we might discover more routes through the call graph |
|
|
|
* later which reduce the number of branches we can simplify. |
|
|
|
* later which reduce the number of branches we can simplify. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
val method = MethodNode( |
|
|
|
val method = originalMethod.copy() |
|
|
|
originalMethod.access, |
|
|
|
|
|
|
|
originalMethod.name, |
|
|
|
|
|
|
|
originalMethod.desc, |
|
|
|
|
|
|
|
originalMethod.signature, |
|
|
|
|
|
|
|
originalMethod.exceptions?.toTypedArray() |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
originalMethod.accept(method) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// find existing constant arguments |
|
|
|
// find existing constant arguments |
|
|
|
val args = getArgs(ref) |
|
|
|
val args = getArgs(ref) |
|
|
|