mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 21:47:42 -05:00
Update to use threaded fernflower
This commit is contained in:
@@ -66,6 +66,7 @@ public class FernFlowerTask extends AbstractDecompileTask implements ForkingJava
|
||||
options.put(IFernflowerPreferences.BYTECODE_SOURCE_MAPPING, "1");
|
||||
options.put(IFernflowerPreferences.REMOVE_SYNTHETIC, "1");
|
||||
options.put(IFernflowerPreferences.LOG_LEVEL, "trace");
|
||||
options.put(IFernflowerPreferences.THREADS, getNumThreads());
|
||||
getLogging().captureStandardOutput(LogLevel.LIFECYCLE);
|
||||
|
||||
List<String> args = new ArrayList<>();
|
||||
@@ -78,7 +79,6 @@ public class FernFlowerTask extends AbstractDecompileTask implements ForkingJava
|
||||
args.add("-l=" + getLineMapFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
args.add("-t=" + getNumThreads());
|
||||
args.add("-m=" + getExtension().getMappingsProvider().tinyMappings.getAbsolutePath());
|
||||
|
||||
//TODO, Decompiler breaks on jemalloc, J9 module-info.class?
|
||||
|
||||
@@ -53,7 +53,6 @@ public class ForkedFFExecutor {
|
||||
File lineMap = null;
|
||||
File mappings = null;
|
||||
List<File> libraries = new ArrayList<>();
|
||||
int numThreads = 0;
|
||||
|
||||
boolean isOption = true;
|
||||
|
||||
@@ -91,8 +90,6 @@ public class ForkedFFExecutor {
|
||||
}
|
||||
|
||||
mappings = new File(arg.substring(3));
|
||||
} else if (arg.startsWith("-t=")) {
|
||||
numThreads = Integer.parseInt(arg.substring(3));
|
||||
} else {
|
||||
if (input != null) {
|
||||
throw new RuntimeException("Unable to set more than one input.");
|
||||
|
||||
@@ -92,15 +92,11 @@ public class ThreadIDFFLogger extends IFernflowerLogger {
|
||||
|
||||
@Override
|
||||
public void startMethod(String methodName) {
|
||||
String className = workingClass.get().peek();
|
||||
line.get().push("Decompiling " + className + "." + methodName.substring(0, methodName.indexOf(" ")));
|
||||
print();
|
||||
//No need to print out methods
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endMethod() {
|
||||
line.get().pop();
|
||||
print();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user