From 37cafdb5a837cbe29e4cc9a34737e24f496bc94f Mon Sep 17 00:00:00 2001 From: Runemoro Date: Fri, 22 Nov 2019 15:40:50 -0500 Subject: Correctly decompile bridges, and add command to add bridges to mappings (#180) --- src/main/java/cuchaz/enigma/bytecode/translators/SourceFixVisitor.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java/cuchaz/enigma/bytecode') diff --git a/src/main/java/cuchaz/enigma/bytecode/translators/SourceFixVisitor.java b/src/main/java/cuchaz/enigma/bytecode/translators/SourceFixVisitor.java index 735a65f..d672622 100644 --- a/src/main/java/cuchaz/enigma/bytecode/translators/SourceFixVisitor.java +++ b/src/main/java/cuchaz/enigma/bytecode/translators/SourceFixVisitor.java @@ -4,6 +4,7 @@ import cuchaz.enigma.analysis.index.BridgeMethodIndex; import cuchaz.enigma.analysis.index.JarIndex; import cuchaz.enigma.translation.representation.entry.ClassDefEntry; import cuchaz.enigma.translation.representation.entry.MethodDefEntry; +import cuchaz.enigma.translation.representation.entry.MethodEntry; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; @@ -30,6 +31,8 @@ public class SourceFixVisitor extends ClassVisitor { BridgeMethodIndex bridgeIndex = index.getBridgeMethodIndex(); if (bridgeIndex.isBridgeMethod(methodEntry)) { access |= Opcodes.ACC_BRIDGE; + } else if (bridgeIndex.isSpecializedMethod(methodEntry)) { + name = bridgeIndex.getBridgeFromSpecialized(methodEntry).getName(); } return super.visitMethod(access, name, descriptor, signature, exceptions); -- cgit v1.2.3