Skip to content

Commit

Permalink
replace ComposedGeneralCleanTransformer in favor of ComposedPeepholeC…
Browse files Browse the repository at this point in the history
…leanTransformer
  • Loading branch information
EpicPlayerA10 committed Sep 24, 2024
1 parent 4318c48 commit da92448
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import uwu.narumi.deobfuscator.core.other.composed.ComposedZelixTransformer;
import uwu.narumi.deobfuscator.core.other.composed.general.ComposedGeneralFlowTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.PeepholeCleanTransformer;
import uwu.narumi.deobfuscator.core.other.composed.general.ComposedPeepholeCleanTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.peephole.JsrInlinerTransformer;
import uwu.narumi.deobfuscator.core.other.impl.pool.InlineLocalVariablesTransformer;
import uwu.narumi.deobfuscator.core.other.impl.pool.InlineStaticFieldTransformer;
Expand All @@ -19,7 +19,7 @@ public class TestDeobfuscation extends TestDeobfuscationBase {
protected void registerAll() {
register("Inlining local variables", InputType.JAVA_CODE, List.of(
InlineLocalVariablesTransformer::new,
PeepholeCleanTransformer::new
ComposedPeepholeCleanTransformer::new
), Source.of("TestInlineLocalVariables"));
register("Simple flow obfuscation", InputType.JAVA_CODE, List.of(ComposedGeneralFlowTransformer::new), Source.of("TestSimpleFlowObfuscation"));
register("Universal Number Transformer", InputType.JAVA_CODE, List.of(UniversalNumberTransformer::new), Source.of("TestUniversalNumberTransformer"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package uwu.narumi.deobfuscator.core.other.composed;

import uwu.narumi.deobfuscator.api.transformer.ComposedTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.PeepholeCleanTransformer;
import uwu.narumi.deobfuscator.core.other.composed.general.ComposedPeepholeCleanTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.peephole.JsrInlinerTransformer;
import uwu.narumi.deobfuscator.core.other.impl.pool.InlineStaticFieldTransformer;
import uwu.narumi.deobfuscator.core.other.impl.universal.RecoverSyntheticsTransformer;
Expand Down Expand Up @@ -39,7 +39,7 @@ public ComposedZelixTransformer(Map<String, String> classInitializationOrder) {
UniversalNumberTransformer::new,

// Cleanup
PeepholeCleanTransformer::new
ComposedPeepholeCleanTransformer::new
);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import uwu.narumi.deobfuscator.api.transformer.ComposedTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.InvalidMethodCleanTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.PeepholeCleanTransformer;
import uwu.narumi.deobfuscator.core.other.impl.pool.InlineLocalVariablesTransformer;
import uwu.narumi.deobfuscator.core.other.impl.pool.InlineStaticFieldTransformer;
import uwu.narumi.deobfuscator.core.other.impl.universal.UniversalFlowTransformer;
Expand All @@ -20,7 +19,7 @@ public ComposedGeneralFlowTransformer() {
UniversalFlowTransformer::new,

// Clean up garbage
PeepholeCleanTransformer::new
ComposedPeepholeCleanTransformer::new
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

import uwu.narumi.deobfuscator.api.transformer.ComposedTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.ClassDebugInfoCleanTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.LocalVariableNamesCleanTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.MethodDebugInfoCleanTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.SignatureCleanTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.UnknownAttributeCleanTransformer;
import uwu.narumi.deobfuscator.core.other.impl.universal.AccessRepairTransformer;
import uwu.narumi.deobfuscator.core.other.impl.universal.AnnotationFilterTransformer;
import uwu.narumi.deobfuscator.core.other.impl.universal.TryCatchRepairTransformer;

/**
* If methods are hidden from decompiler, or something uncommon happen, then this transformer will try to fix it.
*/
public class ComposedGeneralRepairTransformer extends ComposedTransformer {

public ComposedGeneralRepairTransformer() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package uwu.narumi.deobfuscator.core.other.impl.clean;
package uwu.narumi.deobfuscator.core.other.composed.general;

import uwu.narumi.deobfuscator.api.transformer.ComposedTransformer;
import uwu.narumi.deobfuscator.core.other.impl.clean.peephole.DeadCodeCleanTransformer;
Expand All @@ -11,9 +11,9 @@
/**
* A transformer that cleans up garbage instructions.
*/
public class PeepholeCleanTransformer extends ComposedTransformer {
public class ComposedPeepholeCleanTransformer extends ComposedTransformer {

public PeepholeCleanTransformer() {
public ComposedPeepholeCleanTransformer() {
super(
// Remove dead code
DeadCodeCleanTransformer::new,
Expand Down

0 comments on commit da92448

Please sign in to comment.