Update to use threaded fernflower

This commit is contained in:
modmuss50
2020-04-24 13:36:50 +01:00
parent 26755cb82c
commit 3ce6fcd9a4
4 changed files with 3 additions and 10 deletions

View File

@@ -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?

View File

@@ -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.");

View File

@@ -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