fix(plugins): improve custom passes merge ordering

This commit is contained in:
Skylot
2023-03-30 17:14:10 +01:00
parent ee3a653c1b
commit a992c93198
24 changed files with 437 additions and 61 deletions
@@ -15,4 +15,12 @@ class Debug(private val jadx: JadxScriptInstance) {
fun saveCFG(mth: MethodNode, file: File = File("dump-mth-raw")) {
DotGraphVisitor.dumpRaw().save(file, mth)
}
fun printPreparePasses() {
jadx.internalDecompiler.root.preDecompilePasses.forEach { jadx.log.info { it.name } }
}
fun printPasses() {
jadx.internalDecompiler.root.passes.forEach { jadx.log.info { it.name } }
}
}
@@ -13,8 +13,7 @@ class Decompile(private val jadx: JadxScriptInstance) {
fun allThreaded(threadsCount: Int = JadxArgs.DEFAULT_THREADS_COUNT) {
val executor = Executors.newFixedThreadPool(threadsCount)
val dec = jadx.internalDecompiler
val batches = dec.decompileScheduler.buildBatches(jadx.classes)
val batches = jadx.internalDecompiler.decompileScheduler.buildBatches(jadx.classes)
for (batch in batches) {
executor.submit {
batch.forEach(JavaClass::decompile)