New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply ForgeFlower's patches #8
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ic System.arraycopy() GitOrigin-RevId: 16b9869eae4200f4ff24c4535d7f33d8e6847b4c
GitOrigin-RevId: 6ed9b1ee1df87618c9b8c534e328ea89ead9fdc3
…n range PR #1026 GitOrigin-RevId: 18492644f44796505f5a4be9471344c1ce1d0f3a
… time (IDEA-259329) GitOrigin-RevId: b2f2c85514d360e8d716e6f136f7c11760086f0e
GitOrigin-RevId: ce15f37f8882fb7915cf5c8b62e3cc4601a5cc76
…ing Gradle version GitOrigin-RevId: 068aadf4b64097c66de34ff19134f57083d2ac66
PR #1406 GitOrigin-RevId: 501d3b66e790316f8ab52606ea4cba41665213c0
…es; test data layout; typos; formatting) GitOrigin-RevId: 3589e4d8f2dfa8a5096fcf49070bc65ba6734482
GitOrigin-RevId: 63c315cd01502cbdd76a1ef2c86b3634ce6250fd
GitOrigin-RevId: f6f84befdd81adfe54616cad5e1b69514e0335dc
GitOrigin-RevId: e20e9b802600dec52700065a7a29799c73c1dc49
GitOrigin-RevId: c2f9cfd88f57e7d59cca54ec090f67f29377ff23
GitOrigin-RevId: 9a18d056d33847d77a8ca2177567a6c5d5ec9d8b
GitOrigin-RevId: bac64af4495e36b044873f6a97625342af907bec
GitOrigin-RevId: 6eb52135a5bfdf772bb10d3120648500a95325a4
It gives better speed and functionality. Added method to gather bytecode markers for every expression. Allows us to get the bytecode offsets for an entire block of code. Also more aggressively capture bytecode ranges to better understand how much of the code we are processing/outputting
This is used in several later commits.
Java 9+ added overrides to these functions to return the specific subclass, however, when there is a compiler "bug" that when targeting release * or below, it will still reference these new methods, causing exceptions at runtime on Java 8.
Revert part of a change introduced upstream. MinecraftForge/FernFlower@81faff6#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'.
…e target jar. Uses a prefix system, so -only=net/minecraft/block/ will decompile all classes in the block package and subpackages. Useful for debugging to limit scope/runtime.
Breaks outer this references. Code existed before my time, no idea what it's intention is.
It's staggering how many exceptions there were, but in the end my application that I used to test this against was decompiled without any significant errors (there's still the issue of <unknown> being used in enchanted for-loops) and correct logic (compared to the output of Krakatau). Of course I'd now need to figure out how to decompile enums. Co-Authored-By: Geolykt <admin@geolykt.de>
kashike
previously requested changes
Apr 21, 2021
src/org/jetbrains/java/decompiler/modules/decompiler/exps/ConstExprent.java
Outdated
Show resolved
Hide resolved
Most of the glaring issues have been fixed, and while there are certainly areas for improvement what we have now should be ready to go and can be fixed up in the future, as they do not directly affect the decompilation of the Minecraft codebase. Due to the large scope of this PR I'm not expecting anyone to actually review it, but any and all comments are appreciated. |
This potentially fixes a rare, possibly threading related NPE
Upstream pull: MinecraftForge/ForgeFlower#95 Co-Authored-By: zml <629092+zml2008@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR applies ForgeFlower's patches to our current working tree, to reduce the amount of work needed on our part. Many of their patches have been tried and tested in creating good results for decompiled code, which provides a strong base to work off of. Much more testing and cleanup work needs to be done before it can be merged so the PR is in a draft state at the moment.