Graham
8cac7a48b5
Add getFieldAccess
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
8b5f3402e2
Rename getAccess to getMethodAccess
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Major
a9312f3cd2
Remove empty try-catch blocks in DCE
...
Signed-off-by: Major <major@emulate.rs>
5 years ago
Major
5fa9e9a621
Remove spurious toCollection calls
...
Signed-off-by: Major <major@emulate.rs>
5 years ago
Graham
3a29f61d7c
Remove existing FrameNode manipulation support
...
This code is no longer used. Remove it to avoid bit rot.
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
e6402d52c2
Add StackFrameClassWriter
...
This allows us to avoid needing to worry about manipulating stack frames
in individual transformers, which adds lots of complexity. It's much
easier to just make ASM generate them for us.
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Major
097b334646
Propagate null frame types when remapping
...
Signed-off-by: Major <major@emulate.rs>
5 years ago
Graham
077fda4bab
Remove blank line for consistency
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
8ca3f428d2
Remove field.value null check
...
The mapValue() method already accepts and returns nulls.
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
00f0279e15
Use safe call operator
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Major
5e32296905
Fix NPE for FrameNodes that aren't NEW/FULL
...
All of the other types have a value of null for their list of
locals/stack elements.
Signed-off-by: Major <major@emulate.rs>
5 years ago
Major
b391191b75
Add error messages to AsmClassMetadata
...
Signed-off-by: Major <major@emulate.rs>
5 years ago
Graham
be14ffdc2d
Add custom Attribute for tracking original instruction indexes
5 years ago
Graham
6464f8dc77
Remap ClassNodes directly
...
This is necessary for a future commit that will track the original
indexes of AbstractInsnNodes throughout the deobfuscator, with the aim
of using this information to track local variables in the decompiled
code.
I suspect this will also improve performance, as we don't need to
re-allocate all of the tree objects.
5 years ago
Major
45bf24c51d
Remove copies in InsnMatcher
...
Signed-off-by: Major <major@emulate.rs>
5 years ago
Graham
70d46e7f64
Sort imports
5 years ago
Graham
bfcb373ade
Add ClassVersionUtils
5 years ago
Graham
fda857963b
Make ClassPath::get() return null if a class is not found
5 years ago
Graham
59ac765ef8
Add method for finding classes loaded with Class.forName()
5 years ago
Graham
34ef4f9a5e
Rename ClassForNameRemapper to ClassForNameUtils
...
A future commit will add functionality beyond remapping.
5 years ago
Graham
cad451d3e1
Make ClassForNameRemapper compatible with packaged classes
5 years ago
Graham
3c7989455b
Add ClassNameExtensions
5 years ago
Graham
c7f5b0b6b3
Replace isNative() with more generic getAccess() method
5 years ago
Graham
7bb1218b42
Add sequential property to AbstractInsnNode
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
713009470f
Fix NEW StackMetadata
5 years ago
Graham
a0d6a48922
Fix StackMetadata for MethodInsnNodes
5 years ago
Graham
64a9ae33cb
Fix StackMetadata for FieldInsnNodes
5 years ago
Graham
e0d6390f87
Add getSimpleExpression method
5 years ago
Graham
abf803f017
Replace contains() calls with the in operator
...
These are artifacts of the Java port.
5 years ago
Graham
701b162dec
Remove redundant public modifier
5 years ago
Graham
64abe46971
Replace forEach calls with for loops
...
These are artifacts of the Java port.
5 years ago
Graham
8f3591670b
Use elvis operator in readJar()
5 years ago
Graham
e3df684f4f
Inline JSRs
...
This is required for some later analyses to work correctly.
5 years ago
Graham
11ef4b0227
Sign loaders
5 years ago
Graham
dc75b05429
Switch back to the native Pack200 implementation for the moment
...
This isn't ideal as it's deprecated. However, while Apache Harmony's
unpack200 implementation seems fine, its pack200 implementation doesn't
work with the client and produces invalid output.
I've fixed some of the easy to fix bugs, but tracking down any remaining
bugs will be difficult - it'll involve tracing through the native
unpack200 code.
When Pack200 is removed from the JDK, hopefully someone will take up the
mantle of maintaining it outside of the JDK. If that doesn't happen,
we'll have to consider writing our own Pack200 implementation,
extracting OpenJDK's implementation out of the tree or fixing the bugs
in Apache Harmony.
5 years ago
Graham
c769feab3e
Add manifest support to writeJar
5 years ago
Graham
3ae85d50ef
Add skeleton writeJs5 method
5 years ago
Graham
02ed6d7455
Make writeJar and writePack accept an OutputStream
5 years ago
Graham
06b8af41e2
Replace Stream with Sequence
5 years ago
Graham
c2809a16f8
Add OverrideTransformer
5 years ago
Graham
e9a9a8f962
Format with ktlint
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
c10134c1f6
Tidy toPrettyString()
...
I missed this during the initial InsnNodeUtils port.
5 years ago
Graham
e05653cdcc
Rename util to common
5 years ago
Graham
3e0e7824e0
Convert InsnListUtils to Kotlin
5 years ago
Graham
8020ac98ab
Convert InsnNodeUtils to Kotlin
5 years ago