diff options
| author | 2019-11-22 15:40:50 -0500 | |
|---|---|---|
| committer | 2019-11-22 20:40:50 +0000 | |
| commit | 37cafdb5a837cbe29e4cc9a34737e24f496bc94f (patch) | |
| tree | 413ec17d5593984465ffc6005f3fa3c096d7225f /src/main/java/cuchaz/enigma/bytecode | |
| parent | Tweak runemoro's stats generator to be compatible with multiple services (#178) (diff) | |
| download | enigma-fork-37cafdb5a837cbe29e4cc9a34737e24f496bc94f.tar.gz enigma-fork-37cafdb5a837cbe29e4cc9a34737e24f496bc94f.tar.xz enigma-fork-37cafdb5a837cbe29e4cc9a34737e24f496bc94f.zip | |
Correctly decompile bridges, and add command to add bridges to mappings (#180)
Diffstat (limited to 'src/main/java/cuchaz/enigma/bytecode')
| -rw-r--r-- | src/main/java/cuchaz/enigma/bytecode/translators/SourceFixVisitor.java | 3 |
1 files changed, 3 insertions, 0 deletions
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; | |||
| 4 | import cuchaz.enigma.analysis.index.JarIndex; | 4 | import cuchaz.enigma.analysis.index.JarIndex; |
| 5 | import cuchaz.enigma.translation.representation.entry.ClassDefEntry; | 5 | import cuchaz.enigma.translation.representation.entry.ClassDefEntry; |
| 6 | import cuchaz.enigma.translation.representation.entry.MethodDefEntry; | 6 | import cuchaz.enigma.translation.representation.entry.MethodDefEntry; |
| 7 | import cuchaz.enigma.translation.representation.entry.MethodEntry; | ||
| 7 | import org.objectweb.asm.ClassVisitor; | 8 | import org.objectweb.asm.ClassVisitor; |
| 8 | import org.objectweb.asm.MethodVisitor; | 9 | import org.objectweb.asm.MethodVisitor; |
| 9 | import org.objectweb.asm.Opcodes; | 10 | import org.objectweb.asm.Opcodes; |
| @@ -30,6 +31,8 @@ public class SourceFixVisitor extends ClassVisitor { | |||
| 30 | BridgeMethodIndex bridgeIndex = index.getBridgeMethodIndex(); | 31 | BridgeMethodIndex bridgeIndex = index.getBridgeMethodIndex(); |
| 31 | if (bridgeIndex.isBridgeMethod(methodEntry)) { | 32 | if (bridgeIndex.isBridgeMethod(methodEntry)) { |
| 32 | access |= Opcodes.ACC_BRIDGE; | 33 | access |= Opcodes.ACC_BRIDGE; |
| 34 | } else if (bridgeIndex.isSpecializedMethod(methodEntry)) { | ||
| 35 | name = bridgeIndex.getBridgeFromSpecialized(methodEntry).getName(); | ||
| 33 | } | 36 | } |
| 34 | 37 | ||
| 35 | return super.visitMethod(access, name, descriptor, signature, exceptions); | 38 | return super.visitMethod(access, name, descriptor, signature, exceptions); |