Graham
a82d2e3cef
Transform class literals to Java 5 format
...
In Java 1.4 and earlier, the compiler creates a synthetic method for
invoking Class.forName() and a static field for caching the Class<?>
instance.
This will not interact well with the static scrambling transformer. The
obfuscator strips some synthetic flags. Furthermore, the field and
method need to be moved together with the code that uses them for
decompilers like Fernflower to recognise them and convert them back to
class literals.
If Fernflower misses one, the decompiled Class.forName() helper does not
compile cleanly (as the bytecode is missing a CHECKCAST).
Rather than complicating the future static scrambling transformer, it's
easier to convert these to use LDC and upgrade the .class file version
to Java 5.
5 years ago
Graham
752941f9f3
Add unpackclass to DEFAULT_PUBLIC_CTOR_CLASSES
...
It is loaded with ClassLoader::loadClass() instead of Class.forName(),
so our automatic detection code doesn't find it.
5 years ago
Graham
626cbacc06
Remove colons from debug log messages for consistency
5 years ago
Graham
caf7efdd6c
Use weakest possible visibility for each method/field
...
This is a prerequisite for the static scrambling transformer. As it
moves methods/fields around, it requires their visibilities to be
updated.
5 years ago
Graham
fda857963b
Make ClassPath::get() return null if a class is not found
5 years ago
Graham
c7f5b0b6b3
Replace isNative() with more generic getAccess() method
5 years ago
Graham
a66e3eeb9b
Move CounterTransformer later in the pipeline
...
This allows us to remove a counter whose code I suspect was mixed with a dummy
local variable declaration.
5 years ago
Graham
d817856da1
Remove counters with multiple increments
5 years ago
Graham
3124624b5e
Make EXCLUDED_{METHODS,FIELDS} public
...
These will be required for the future static scrambling transformer.
5 years ago
Graham
54aec42f90
Format .kts files
5 years ago
Graham
3f2335859d
Add support for impure expressions to InsnListUtils
5 years ago
Graham
c0da020649
Fix handling of argumentsAndReturnSizes for static methods
5 years ago
Graham
ccbbf873af
Switch from Maven to Gradle
5 years ago
Graham
248cad99e3
Improve safety of IFEQ/IFNE check in OpaquePredicateTransformer
5 years ago
Graham
c4e08242aa
Fix handling of opaque predicate embedded in flow obstructor initializer
5 years ago
Graham
abf803f017
Replace contains() calls with the in operator
...
These are artifacts of the Java port.
5 years ago
Graham
64abe46971
Replace forEach calls with for loops
...
These are artifacts of the Java port.
5 years ago
Graham
29e55df5a4
Use live variable analysis in DummyLocalTransformer
...
This allows us to catch a few extra locals, which in turn allows us to remove a
few more dummy arguments.
5 years ago
Graham
400a10f8d2
Add live variable analysis
5 years ago
Graham
f0eabb0619
Add generic data flow analysis framework
5 years ago
Graham
fee7cf82cd
Add Analyzer for creating control flow graphs
5 years ago
Graham
89b274077f
Use infix union operator
5 years ago
Graham
d9762d65bc
Fix Kotlin inspections
5 years ago
Graham
575632413a
Add missing private modifier
5 years ago
Graham
c6cf9a4d94
Add initial client bundler
5 years ago
Graham
099d9c591d
Replace listOf() with emptyList()
...
I think this makes the meaning slightly clearer.
5 years ago
Graham
41dac20719
Make @Override annotations invisible
...
Normally they wouldn't be retained in the bytecode at all, but for obvious
reasons we can't do that! Making them invisible is at least closer to the
RetentionPolicy's intention than a visible annotation.
5 years ago
Graham
5038d1d671
Replace ByteStreams with Kotlin extension method
5 years ago
Graham
06b8af41e2
Replace Stream with Sequence
5 years ago
Graham
98692c7d78
Add Java 8 compatibility
...
As a result of the Kotlin port, using Java 11 becomes less important.
Java 8 is still fairly widespread, so I think supporting it is still
worthwhile.
5 years ago
Graham
c2809a16f8
Add OverrideTransformer
5 years ago
Graham
e9a9a8f962
Format with ktlint
5 years ago
Graham
77e8b0cdc0
Use top-level Kotlin main() functions
5 years ago
Graham
a99d5973ae
Replace Guice's repeat with Kotlin's
5 years ago
Graham
5c367073c0
Use named parameters for clarity in Deobfuscator
5 years ago
Graham
15e9636b79
Replace Guava ImmutableList with Kotlin List in ClassPath
5 years ago
Graham
86fe02f32d
Remove @JvmStatic annotations
...
We only need to keep it on the main() methods for the moment.
5 years ago
Graham
0b834fb223
Remove @Throws annotations
...
We don't need them now we have no more Java code left.
5 years ago
Graham
b6d96ac4e6
Convert TypedRemapper to Kotlin
5 years ago
Graham
0db3d979c9
Convert Deobfuscator to Kotlin
5 years ago
Graham
0f78c9582c
Convert IntValue to a sealed class
5 years ago
Graham
84f18c4d10
Convert ConstSourceValue to a sealed class
5 years ago
Graham
8aa3a79166
Replace Guava's ImmutableSet with Kotlin's Set type
5 years ago
Graham
5fa44c9016
Convert DummyArgTransformer to Kotlin
5 years ago
Graham
6ad99645dc
Replace for loop with enhanced for
5 years ago
Graham
0823a0253f
Convert UnusedArgTransformer to Kotlin
5 years ago
Graham
e05653cdcc
Rename util to common
5 years ago
Graham
dd88e3ca2c
Improve positions of line breaks in ConstSourceInterpreter
5 years ago
Graham
1864b6b630
Convert IntInterpreter to Kotlin
5 years ago
Graham
f56b288663
Convert OpaquePredicateTransformer to Kotlin
5 years ago