fix: show all methods for 'simple' and 'fallback' decompilation modes

This commit is contained in:
Skylot
2024-12-23 21:18:04 +00:00
parent 1449354c54
commit 60a8d8b9fd
2 changed files with 18 additions and 1 deletions
@@ -19,5 +19,18 @@ public enum DecompilationMode {
/**
* Raw instructions without modifications
*/
FALLBACK
FALLBACK;
public boolean isSpecial() {
switch (this) {
case AUTO:
case RESTRUCTURE:
return false;
case SIMPLE:
case FALLBACK:
return true;
default:
throw new RuntimeException("Unexpected decompilation mode: " + this);
}
}
}
@@ -347,6 +347,10 @@ public class ClassGen {
* Additional checks for inlined methods
*/
private boolean skipMethod(MethodNode mth) {
if (cls.root().getArgs().getDecompilationMode().isSpecial()) {
// show all methods for special decompilation modes
return false;
}
MethodInlineAttr inlineAttr = mth.get(AType.METHOD_INLINE);
if (inlineAttr == null || inlineAttr.notNeeded()) {
return false;