Roman Shevchenko
03a6b01b83
[java decompiler] getting rid of deprecated API usage
...
GitOrigin-RevId: 4b575f5001e391224bd77fc71483ac0ab0c42787
3 years ago
Maxim Degtyarev
31cff62c94
Fix for IDEABKL-8006 IDE hangs when decompiling class which
...
is its own superclass
GitOrigin-RevId: 1fe14694ce69b135f2e3fe4cde84ce3d42997228
4 years ago
Tagir Valeev
e16fb8ef1d
Avoid assignment used as condition
...
GitOrigin-RevId: 6eb52135a5bfdf772bb10d3120648500a95325a4
4 years ago
Vladimir Krivosheev
ede143d4bd
use jdk9+ Map.entry API instead of AbstractMap.SimpleImmutableEntry
...
GitOrigin-RevId: bac64af4495e36b044873f6a97625342af907bec
4 years ago
Tagir Valeev
56d2f5f887
Unused assignments removed, misc other fixes
...
GitOrigin-RevId: 9a18d056d33847d77a8ca2177567a6c5d5ec9d8b
4 years ago
Roman Shevchenko
9cd86f9640
[java decompiler] skipping generated `module-info` statements
...
GitOrigin-RevId: c2f9cfd88f57e7d59cca54ec090f67f29377ff23
4 years ago
Roman Shevchenko
e130aa6896
[java decompiler] supporting `package-info`
...
GitOrigin-RevId: e20e9b802600dec52700065a7a29799c73c1dc49
4 years ago
Roman Shevchenko
37bb6cf4d8
[java decompiler] separating `module-info` sections
...
GitOrigin-RevId: 63c315cd01502cbdd76a1ef2c86b3634ce6250fd
4 years ago
Roman Shevchenko
f40b96ebcf
[java decompiler] minor refactoring + cleanup (duplicates; dependencies; test data layout; typos; formatting)
...
GitOrigin-RevId: 3589e4d8f2dfa8a5096fcf49070bc65ba6734482
4 years ago
leonardosnt
f259b38c72
IDEA-245329: Handle CONSTANT_Module and CONSTANT_Package
...
PR #1406
GitOrigin-RevId: 501d3b66e790316f8ab52606ea4cba41665213c0
4 years ago
Anna Kozlova
e708ad6393
java 11 migration: explicit -> diamond for anonymous classes
...
GitOrigin-RevId: ce15f37f8882fb7915cf5c8b62e3cc4601a5cc76
4 years ago
Nikolay Chashnikov
e19aab61ce
[java] API cleanup: remove unused API which was deprecated for a long time (IDEA-259329)
...
GitOrigin-RevId: b2f2c85514d360e8d716e6f136f7c11760086f0e
4 years ago
Maxim Degtyarev
dbf407a655
Fix NPE inside `ExceptionRangeCFG::toString()` for `finally` exception range
...
PR #1026
GitOrigin-RevId: 18492644f44796505f5a4be9471344c1ce1d0f3a
4 years ago
Tagir Valeev
143e2396ae
Avoid set.removeAll(list)
...
GitOrigin-RevId: 6ed9b1ee1df87618c9b8c534e328ea89ead9fdc3
4 years ago
Alexey Kudravtsev
7f65f48b3f
use more high-level methods to copy arrays instead of low-level cryptic System.arraycopy()
...
GitOrigin-RevId: 16b9869eae4200f4ff24c4535d7f33d8e6847b4c
4 years ago
Vladimir Krivosheev
50691f39fb
cleanup (final)
...
GitOrigin-RevId: 69b73056f0c524ad7b6e7c5c2b3a4b58f64feed9
4 years ago
Graham
f11ed78169
Replace openrs2.dev with openrs2.org
4 years ago
Graham
d12a2dab06
Split custom merge logic into a separate shouldMerge function
4 years ago
covers1624
9e525f7aeb
Revert change to FieldExprent#getExprentUse
...
Revert part of a change introduced upstream. 81faff674c (diff-e057d0d70e5b15f5e12ec86ac46c85eeR57)
This upstream change causes local variables to not be inlined in many cases, and makes decomp very messy for the reason of 'thread safety'.
4 years ago
Graham
1f2ee3c81f
Inline assignments made before a return
...
Extracted from https://github.com/MinecraftForge/ForgeFlower/blob/master/FernFlower-Patches/0030-Improve-stack-var-processor-output.patch
4 years ago
Graham
74c7174bbf
Re-enable simpleMerge with additional scoping restrictions
...
I've changed it to only merge variables within the same basic block,
which improves the output significantly.
4 years ago
LexManos
fda8f42dd0
Fix local variables incorrectly merging.
4 years ago
Tagir Valeev
f61e659e58
[java-stubs] Hide synthetic equals/hashCode/toString in records (stubs+decompiler)
...
Makes IDEA-247576 obsolete
Review ID: IJ-CR-2597
GitOrigin-RevId: 4dbb09153b683f2c191d8ba89a3c4ad8c3da038d
4 years ago
Tagir Valeev
1651445c90
[java-decompiler] IDEA-246839 Support java records in decompiler
...
Also: support preview levels in ClsFileImpl
Also fixes: IDEA-247551 Exception on first opening of record .class file
GitOrigin-RevId: 4362d669d1c16b8230d6d8ab803465b6a7476803
4 years ago
Graham
0c1291b8ff
Implement common superclass/interface algorithm in getCommonSupertype
...
The previous implementation simply returned java/lang/Object when given
two object types, which resulted in local object variables assigned in
more than one place being given a type of java/lang/Object. The
variables often had ugly casts wherever they were used.
The new implementation is from ASM's ClassWriter.
4 years ago
Tagir Valeev
0749965bc9
[java-decompiler] initConstant: fix getField/putField handling
...
GitOrigin-RevId: b741b6e3faf5d800ca2b607439b6a459bcb2bf6a
4 years ago
simon816
44ae885a96
Ignore library classes when saving decompilation result
...
PR #750
GitOrigin-RevId: 9751ed38b212a13022b0df9143dfa73c74a01929
4 years ago
malte0811
ab4a7ddd16
Fix incorrect decompilation of inverted floating point comparisons with NaN (IDEA-196302)
...
PR #845
GitOrigin-RevId: 611f4af224e68ff8167f2b62f8366a022adb2054
4 years ago
Graham
34110df5f4
Improve heuristic for converting while loops to for loops
...
We now only convert while loops to for loops if the same variable is
used in the initialisation statement, condition and increment statement.
4 years ago
Graham
49c640733c
Remove issingle condition in matchFor
...
It produces rather ugly output where a while loop is more appropriate.
4 years ago
Graham
4d46ef6312
Use more deterministic local variable names
...
This commit bases local variable names on the original instruction
index, which produces much more consistent results than the variable
slot/version.
4 years ago
Graham
964f7292a8
Defer refreshVarNames until debug names have been assigned
...
This ensures none of the names collide with a field.
4 years ago
Graham
17c4438d37
Fix renaming variable declarations without assignments
4 years ago
Graham
7a34b8e85a
Add variable declaration support to iterateExprents
4 years ago
Graham
9addbd6349
Use names from OriginalPcTable earlier during the decompilation process
4 years ago
Graham
eaa8533e74
Use names from MethodParameters earlier during the decompilation process
...
This fixes compatibility with anonymous inner classes.
4 years ago
Graham
2bf9bb4e9b
Use mapped local variable names from the OriginalPcTable
4 years ago
Graham
b7ff940440
Fix references to parameters renamed with the MethodParameters table
4 years ago
Vladimir Krivosheev
1d63f7d447
cleanup (final)
...
GitOrigin-RevId: 93607e195763f2acf29ee0d7a280d7e07e8d2f14
4 years ago
Anna Kozlova
5f94a0d0d5
apply remove redundant cast
...
GitOrigin-RevId: 2bcbd253668f66ca2740074953cb661ebb6f3513
4 years ago
Graham
b3a455fb1a
Relax isExprentIndependent
...
I think the EXPRENT_FIELD condition exists in case the field's
initializer depends on a prior field in the same class.
We already handle this case in the deobfuscator, which ensures fields
appear in exactly the order in which they are first written to in the
<init> and <clinit> methods. (This isn't perfect, as we ignore the
problem of multiple <init> methods writing fields in different orders to
each other, but it seems good enough for the client.)
4 years ago
Tagir Valeev
1685759f61
Use Math.min/max
...
GitOrigin-RevId: 4fafd6b7ef8fd2e8ac99b6e0c8af2d092ded2526
4 years ago
Tagir Valeev
8382c008b2
Fixed unnecessarily escaped character
...
GitOrigin-RevId: 9532833be54e94cfe74dee90f4ca815790d7f5be
4 years ago
Tagir Valeev
488da329f4
Fix warnings (redundant boolean operation and others)
...
GitOrigin-RevId: 115ba7dfd69a2b37963430aac7e979271c0331db
5 years ago
Graham
1526cea2a5
Annotate variables in catch statements with @Pc
5 years ago
Graham
d2718bd7b0
Improve code for setting the bytecodeOffset in VarDefinitionHelper
5 years ago
Graham
eb536c94d7
Add bytecodeOffset to stack variables where it is unique
5 years ago
Graham
35228e6d63
Populate bytecodeOffset of definitions created in VarDefinitionHelper
5 years ago
Graham
b4c1bab1b6
Add separate bytecodeOffset variable to VarExprent
...
I think it's best not to conflate this with visibleOffset, as
visibleOffset is not always set to bytecode_offset and it is also used
for other things (e.g. looking up debug variable names).
5 years ago
Justin
0d2a413b2a
Fix finally processor instruction comparison
5 years ago