master Changelog 2.0.605 ======= - 2.0.605.1 Fix try with resources being created when it shouldn't be (#128) - 2.0.605.0 build: Bump to a minimum requirement of Java 17 (#113) * build: Bump to a minimum requirement of Java 17 * Perform a patch tidy-up and basic warning pass This removes unused imports, resolves patch ordering issues, and deals with easily resolvable IDE warnings -- reducing noise during further development. We also ensure that patches are a linear progression that compiles at each commit. 1.5.605 ======= - 1.5.605.21 Fix eliminated loops removing successor (#101) * Fix eliminated loops removing successor Also removes the temporary fix, as the problem is fixed at its root instead - 1.5.605.20 build: log built version info - 1.5.605.19 rebuild patches - 1.5.605.18 Add J11+ try with resources processing (#106) - 1.5.605.17 Fix loop generation causing improper loop promotion (#125) Fixes https://github.com/MinecraftForge/ForgeFlower/issues/70 - 1.5.605.16 Replace SformsFastMap shallow copy with deep copy (#126) - 1.5.605.15 Fix loops inside of try-catch decompiling improperly (#124) Fixes https://github.com/MinecraftForge/ForgeFlower/issues/73 - 1.5.605.14 Fix calls to method handle not casting the return value when needed (#127) - 1.5.605.13 Fix exception when class that lambda references is not on classpath (#123) fixes https://github.com/MinecraftForge/ForgeFlower/issues/122 - 1.5.605.12 Fix method generics that are used only in lambda parameters (#121) - 1.5.605.11 Fix checking staticness of inner classes (#120) - 1.5.605.10 build: switch back to gitpatcher version range this gives us the logic to auto-set patch author, plus future changes - 1.5.605.9 TeamCity change in 'MinecraftForge / ForgeFlower' project: build features of 'Pull Requests' build configuration were updated - 1.5.605.8 TeamCity change in 'MinecraftForge / ForgeFlower' project: build features of 'Pull Requests' build configuration were updated - 1.5.605.7 fix up bad merge in last commit - 1.5.605.6 Respect DUMP_CODE_LINES option (#117) Previously code lines would be dumped regardless of the option Also make it default true in case someone relied on this behavior - 1.5.605.5 Cache file data to reduce lock contention (#116) Zip file instances lock on all reads, so we should try to load everything we need into memory all at once, rather than reading multiple times - 1.5.605.4 Simplify threaded output handling/stabilize output (#115) * Simplify threaded output handling This removes a variety of executor rebuilding, and the queueing logic in ThreadSafeResultSaver, in favor of queueing output with the existing class context list. This has the benefit of simplifying any IResultSaver implementation, and allows preserving archive order when generating output. The Fernflower constructor has been modified to ensure all Fernflower instances follow similar argument parsing logic, rather than just ConsoleDecompiler instances. * Ensure output timestamps are stable This was the last thing preventing FF from having bit-for-bit identical output between runs. - 1.5.605.3 build: bump gitpatcher - 1.5.605.2 bump gitpatcher, up the logging - 1.5.605.1 build: Try to fix TC build - set gitpatcher to add git safedirs - make sure tag offset versioning happens based on the root project - 1.5.605.0 Rebase onto latest commit for FernFlower (#114) These changes add support for TYPE_USE annotations, instanceof patterns, and upstream support for switch-on-enum. - Introduce a -qin option to reduce the source diff in this rebase by qualifying inner class names always Co-authored-by: zml 1.5.498 ======= - 1.5.498.29 Make record canonical constructors that can be compact compact (#111) * Move throw clause builder into if statement so that the hasDescriptor variable can be moved back to where it was and compact constructor's can't use the throws clause anyway - 1.5.498.28 TeamCity change in 'MinecraftForge / ForgeFlower' project: VCS roots of 'Build' build configuration were updated - 1.5.498.27 Improve static field initializer extraction (#109) * Move field assignment to static {} when the assignment takes place after unextractable code * Extracts lambdas from static {} that reference fields defined later by making those references use qualified names - 1.5.498.26 Add email to TeamCity so the git commands work. - 1.5.498.25 Kill the submodule's build.gradle forever. TeamCity runs a 'configureTeamCity' task on all projects before we can apply our patches. So this needs to be set so that their old build script doesn't do anything. - 1.5.498.24 Add TC Support. (#110) - 1.5.498.23 Reduce variable allocations in getAllExprents to save GC/Mememory (#107) - 1.5.498.22 Fix variables in finally blocks not getting renamed (#105) - 1.5.498.21 Search generics when finding where to inject local classes - 1.5.498.20 Filter out default conical record constructors. - 1.5.498.19 Change where we inject parent names for enclosed classes. Fixes naming conflict in one case. - 1.5.498.18 Remove the default keyword from private interface methods (#104) - 1.5.498.17 Filter out generated getters for Records. - 1.5.498.16 Bump Gradle to 7.3 (#103) - 1.5.498.15 Add more protection to reading generic signatures. - 1.5.498.14 Add -dcl {dump code lines} to dump this line data to a file in the output archive. - 1.5.498.13 Fix compound assignments not being generated (#102) - 1.5.498.12 Process J9+ string concat earlier - 1.5.498.11 Temporary fix to handle loop that won't inline its condition. Fixes #89 (#100) - 1.5.498.10 Fix J9 string concat again - 1.5.498.9 Fixup J9 string concat - 1.5.498.8 Fix issue with synthetic arguments in method invocations. - 1.5.498.7 Handle J9+ using Objects.rNN rather than .getClass for null checks (#97) - 1.5.498.6 Expose line-mapping for decompiled jars (#95) This fixes a case where the tracer wasn't incremented, which caused misaligned linemaps - 1.5.498.5 Avoid NPE in primitive (un)boxing when libraries are not found on the classpath (#94) Fixes #93 - 1.5.498.4 We use a customo archiveBaseName instead of the standard project name. This fixes the promote arguments, however the page is not generated due to PageGen not liking some of our version names. Will fix later. - 1.5.498.3 Update JenkinsFile/Build to new maven/jenkins. - 1.5.498.2 Fix jgit branch calculation (#92) - 1.5.498.1 Move to JGit instead of jcenter/grgit. As jcenter is shutting down. - 1.5.498.0 Rebase onto latest upstream, Fixes package-info/module-info decompile. (#90) 1.5.478 ======= - 1.5.478.19 Move to Gradle 6.8.1 and use java toolchains (#87) - 1.5.478.18 Fix resources being declared in the wrong order - 1.5.478.17 Simplify switch on enum during method processing - 1.5.478.16 Add switch on string support - 1.5.478.15 Fix a few cases where effectively final var definitions where not kept (#82) - 1.5.478.14 Fix some cases where an enhanced for loop failed to generate and re-enable do-while loops (#38) - 1.5.478.13 Make decomp threaded (#63) `-thr ` anything < 1 is treaded as single threaded. `-thr AUTO` to auto select, (default) - 1.5.478.12 Update patches for new GItPatcher (#81) Significantly cleans up redundant and continually changing data inside the patches. Also fixes a few cases where commits had really long names. - 1.5.478.11 Fix some issues with primitive unboxing. Closes #69 Closes #74 - 1.5.478.10 Remove var name refresh call. Fixes #88 Add toString to MethodDescriptor - 1.5.478.9 Fix variable LVTs not propagating properly after LVs are merged. Closes #79 - 1.5.478.8 Fix static field initializers not inlining properly, and not qualifying when they should. Closes #77 - 1.5.478.7 Fix improper local variable merging. Closes #75 - 1.5.478.6 Proper wrapping for a casted method reference instance (#71) - 1.5.478.5 Properly detect short names shadowed in inner classes (#68) Also, add wrapping for a casted method reference instance - 1.5.478.4 Fix return inlining. (#66) - 1.5.478.3 Fix incorrect local variable merging, fixes compile error in AreaEffectCloudEntity. Update gradle wrapper in our initial setup commit. Add new -only command line argument to filter the list of classes to be decompiled. - 1.5.478.2 Various generic fixes (#61) - 1.5.478.1 Fix some catch blocks not getting JAD names. (#64) - 1.5.478.0 Rebase on top of upstream FernFlower Empty blocks no longer have semicolons, Minor import fixes, Dropped 3 commits as the changes exist upstream now. 1.5.380 ======= - 1.5.380.47 Verify the contents of lambdas used in static initializers (#57) - 1.5.380.46 Fix another overflow in isMappingInBounds (#58) - 1.5.380.45 Fix some decompile exceptions for 1.16-pre1. - 1.5.380.44 Added config option to disable inlining of simple lambdas --isl=0 - 1.5.380.43 Add explicit cast to invocations of java/nio/Buffer functions. 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. - 1.5.380.42 Update gradle wrapper to 6.3 - 1.5.380.41 Simple lambda syntax support (#55) - 1.5.380.40 Fix finally processor instruction comparison (#54) - 1.5.380.39 Fix outputting of empty constructors that change access levels. Closes #53 - 1.5.380.38 Improve stack vars processor output (#51) * fix method reference instance object not collapsing * keep effectively final var definitions for anon classes * rerun stack var processor during statement processing - 1.5.380.37 Update Jenkinsfile to notify discord. - 1.5.380.36 Fix array index issue in ambiguous method detection for methods with synthetically added parameters. This just fixes the crash, but doesn't address it correctly, we need to know which method parameters are synthetic. - 1.5.380.35 Fix NPE in StructClass.getMethodRecursive when parent classes are not found. - 1.5.380.34 Check method access when looking for ambiguous method calls (#49) * Log info about the running JVM for debugging * Check method access when looking for ambiguous method calls Fixes a discrepancy with Eclipse OpenJ9 JVM - 1.5.380.33 Fix a discrepancy when using J9+ (#47) An error in the mapping of generic types cause the mapping to differ between J8 and J9+. - 1.5.380.32 Update hideEmptySuper to better handle synthetic parameters (#45) - 1.5.380.31 Propagate exceptions all the way out to cause error code when using console compiler. - 1.5.380.30 Fix NPE in enhanced for loop detection. - 1.5.380.29 Remove synthetic getClass calls (#44) - 1.5.380.28 Fix some static initializers not being inlined (#43) - 1.5.380.27 Fix issues with try-with-resource generation and add test cases (#42) - Fixes a case where twr would fail to generate - Fixes local var renames not being applied to resource statements - Fixes a case where a catch block could be merged onto the wrong try block - 1.5.380.26 Fix some field initializers not being extracted or incorrectly extracted (#39) - 1.5.380.25 Improve inferred generic types (#36) - 1.5.380.24 Publish sources jar (#40) - 1.5.380.23 Convert references to -Double.MAX_VALUE and similar (#37) * Fix both Fix-ambiguous-lambdas and Fix-super-qualifier-for-default-interfaces having the same number * Convert references to -Double.MAX_VALUE and similar - 1.5.380.22 Fix ambiguous lambdas (#35) - 1.5.380.21 Fix super qualifier for default interfaces (#34) - 1.5.380.20 Prioritize self and enclosing class when encountering inconsistent InnerClass attributes. The compiler encodes all REFERENCED inner classes into the class. The first found used to win, but now ThisClass > EnclosingClass > Others AccessTransformers only edit the targeted class as it can't find all references, so Fixes AccessTransformers. - 1.5.380.19 Fix lambdas adding imports. Closes #26 - 1.5.380.18 Inverted floating point comparisons - 1.5.380.17 Add try with resource support (#21) - 1.5.380.16 Fix enhanced for loops with break after and bad infinite loops (#25) - 1.5.380.15 Give nicer output for float and double literals (#24) - 1.5.380.14 Throw an exception instead of using System.exit (#22) - 1.5.380.13 Fix LVTs in lambdas / anon classes not propagating from outer lambda. Closes #7 (#19) - 1.5.380.12 Fix shortname imports that are shadowed by super class inner classes. Closes #10 (#18) - 1.5.380.11 Fix the rest of the cases where getClass removal does not work (#15) - 1.5.380.10 Merge remote-tracking branch 'upstream/master' into invertedFloat - 1.5.380.9 Fix getClass removal not working for some lambdas (#13) - 1.5.380.8 Merge pull request #12 from thiakil/interface-inlining fix interface inlining for non independents - 1.5.380.7 squash - 1.5.380.6 fix interface inlining for non independents - 1.5.380.5 Simplify negation on int comparisons - 1.5.380.4 Fix incorrect decompilation of inverted floating point comparisons with NaN - 1.5.380.3 Add a metadata file named 'fernflower_abstract_parameter_names.txt' to rename abstract parameters. Format: ClassName MethodName Descriptor Param1[ Param2...] - 1.5.380.2 Add support for output being a file if input is also a single file. And fix version in changelog. - 1.5.380.1 Add -cfg argument to specify a text file with additional command line arguments. - 1.5.380.0 Refactor to tag based version, and Jenkinsfile. 1.5.380-pre =========== - 1.5.380-pre-44 Merge pull request #4 from kashike/feature/ui-merge Auto-detect iterators by searching the hierarchy - 1.5.380-pre-43 Auto-detect iterators by searching the hierarchy - 1.5.380-pre-42 Fix NPE when decompiling a class without the full class hierarchy in the data pool. - 1.5.380-pre-41 Fix some issues related to invoking generic methods. Introduces a couple more but less then it fixes. Will need to re-work this more later but working on a snapshot update. - 1.5.380-pre-40 Fix invalid 'this' argument being added when calling super constructors of abstract inner classes. - 1.5.380-pre-39 Fix issue in determining field type when it is generic from a superclass. - 1.5.380-pre-38 Rework Minecraft test to pull libs from json. - 1.5.380-pre-37 Add detection of enhanced for loops that use unboxing. - 1.5.380-pre-36 Fix more improper unboxing by adding needed casts when unboxing generic arguments. - 1.5.380-pre-35 Fix LVTs not passing down to lambdas. - 1.5.380-pre-34 Fix local variable names leaking out of lambdas where they shouldn't. - 1.5.380-pre-33 Add new command line option to skip non-class files in output jar. - 1.5.380-pre-32 Fix return casting to incorrect values in some lambda cases. - 1.5.380-pre-31 Upstream uptake, only 'major' benefit is slightly better unboxing. - 1.5.380-pre-30 Remove hackery for old JDK, Jenkins has Orical J9.0.1 installed now. - 1.5.380-pre-29 Hack around the fact that our jenkins is running a shitty old non-release JDK by reflectively calling a method that isn't in that build of the JDK. - 1.5.380-pre-28 Fix NPE caused by odd compiler branching. And fixed Java9 decompile differences by scanning the module path for context. - 1.5.380-pre-27 Implement Multi-Release Jar support PR #3 - 1.5.380-pre-26 Implement MRJAR support - 1.5.380-pre-25 Forgot a break. Whoops. - 1.5.380-pre-24 Add support for J9's Module and Package const pool entries. Class version/access flag validity is not checked. Just added support for reading them. - 1.5.380-pre-23 Attempt better detection of ambiguous arguments in method invocation. Was previously adding casts where unneeded: add((String)"Some string", (Object)Long.valueOf(0)) When overloaded methods had ANY different arguments. Does not detect last parameter vs varargs correctly, so still adds extra casts: add(String, Object) add(String, Object...) - 1.5.380-pre-22 Add minecraft deps to test libraries, to try and get Minecraft bulk test working. - 1.5.380-pre-21 Fix primitive unboxing when the argument is ambiguous, causing potential issues. Still need to increase generic output to better determine when unboxing is allowed. - 1.5.380-pre-20 Fix issue where method references would cause variable names to be improperly propogated to outside methods. - 1.5.380-pre-19 Expanded Minecraft test to include classpath, and attempt to include libraries. The test errors in exception graphics.. need to look more into it. - 1.5.380-pre-18 Fix primitives unboxing when calling generic functions for Byte/Short not properly being cast. - 1.5.380-pre-17 Fix primitive unboxing causing invocations of wrong overloaded methods. - 1.5.380-pre-16 Push version back because there is a major issue we need to fix, and I don't feel like making a full branch just yet. - 1.5.380-pre-15 Bump version for further development, 1.0 is stuck so we don't break FG. - 1.5.380-pre-14 Bump version to reflect rebased upstream Need test to verify that when pushing? - 1.5.380-pre-13 Some small generics changes, and rebased everything to current upstream master. - 1.5.380-pre-12 Add Minecraft bulk framework {hardcoded path you'll have to change} And do some work on generics. Good enough for now. - 1.5.380-pre-11 Make JAD renamers leave parameter names alone. Cleans up MC codebase. TODO: Make this a config option. - 1.5.380-pre-10 Fix accesser replacements in ForEach loops. - 1.5.380-pre-9 Fix LVTs for parameters not being propagated inside the function - 1.5.380-pre-8 Revert small generic change that did more harm then good. - 1.5.380-pre-7 More work on generics, Cleanup a lot of extra casting and added generic types to 'new' calls. - 1.5.380-pre-6 Remove super calls to synthetic supers {and fix calls to missing supers} Add NPE protection to astore opcode... TODO: Figure out why it's needed Prevented stream iterators from being turned into enhanced for loops. {They walk like Iterables, they talk like Iterables, but they arnt Iterables.. wtf Java?} Expanded constant casting fixes to function calls Down to 114 errors, mostly generic casting issues. - 1.5.380-pre-5 Fix generic arguments to functions not grabbing correctly. And fix issue where constants would not be cast down to shorts/bytes - 1.5.380-pre-4 Backlog of commit applied, Some tests still fail. Real cleanup now begins. - 1.5.380-pre-3 Officially half way through apply our old patches to the current codebase. LVTs are still bad, and tests sill fail. But quite a bit better the normal FernFlower. Reference commit index https://github.com/MinecraftForge/FernFlowerLegacy/commit/950b975082f6252b0b3aedf6674f6af9b2951c33 - 1.5.380-pre-2 Initial Commit - 1.5.380-pre-1 Initial commit