Signed-off-by: Graham <gpe@openrs2.dev>
@ -25,7 +25,9 @@ import java.lang.Character.PARAGRAPH_SEPARATOR
import java.lang.Character.PRIVATE_USE
import java.lang.Character.SURROGATE
import java.lang.Character.UNASSIGNED
import javax.inject.Singleton
@Singleton
class CharLiteralTransformer : Transformer() {
override fun transformUnit(group: LibraryGroup, library: Library, unit: CompilationUnit) {
unit.walk { expr: BinaryExpr ->
@ -11,7 +11,9 @@ import dev.openrs2.deob.ast.util.checkedAsInt
import dev.openrs2.deob.ast.util.checkedAsLong
import dev.openrs2.deob.ast.util.toHexLiteralExpr
import dev.openrs2.deob.ast.util.walk
class HexLiteralTransformer : Transformer() {
@ -13,7 +13,9 @@ import com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclarati
import dev.openrs2.deob.ast.Library
import dev.openrs2.deob.ast.LibraryGroup
class RedundantCastTransformer : Transformer() {
// remove double casts
@ -17,7 +17,9 @@ import org.objectweb.asm.tree.FieldInsnNode
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.MethodNode
import org.objectweb.asm.tree.analysis.Analyzer
class FinalFieldTransformer : Transformer() {
private lateinit var inheritedFieldSets: DisjointSet<MemberRef>
private val nonFinalFields = mutableSetOf<DisjointSet.Partition<MemberRef>>()