forked from openrs2/openrs2
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
552 B
16 lines
552 B
package dev.openrs2.deob.ir.translation
|
|
|
|
import dev.openrs2.deob.ir.Method
|
|
import dev.openrs2.deob.ir.translation.decompiler.IrAnalyzer
|
|
import dev.openrs2.deob.ir.translation.decompiler.IrInterpreter
|
|
import org.objectweb.asm.tree.ClassNode
|
|
import org.objectweb.asm.tree.MethodNode
|
|
|
|
class BytecodeToIrTranlator {
|
|
fun decompile(owner: ClassNode, method: MethodNode): Method {
|
|
val irAnalyzer = IrAnalyzer(IrInterpreter())
|
|
val entryBlock = irAnalyzer.decode(owner.name, method)
|
|
|
|
return Method(owner, method, entryBlock)
|
|
}
|
|
}
|
|
|