Skip to content

Standardize float and double constants further#136

Merged
zml2008 merged 4 commits into
MinecraftForge:masterfrom
SizableShrimp:float-double-fixes-rebased
Mar 4, 2023
Merged

Standardize float and double constants further#136
zml2008 merged 4 commits into
MinecraftForge:masterfrom
SizableShrimp:float-double-fixes-rebased

Conversation

@SizableShrimp
Copy link
Copy Markdown
Member

  • Added new command-line property, -sfn=1 by default. This properties let you disable the behavior that calculates standardized versions of floating-point numbers to make the decompiled constants consistent across JVMs (although why would you ever want to disable this?)
  • Added constants for casting Integer/Long MAX/MIN_VALUE to floats/doubles to detect them and decompile the casted variant
  • The difference in representation from J17 vs J19 has been resolved by becoming more in line with J19; the smallest possible float/double is now calculated including rounding and truncating and is independent of JVM

1.19.3 diff - there are no differences between 1.19.3 decompiled on J17 and J19 using this PR; so the diff was omitted

Fixes #130

The smallest possible float/double is now calculated including rounding and truncating
This resolves decompiling differences by running with J17 vs J19 by becoming more in line with J19
Fixes MinecraftForge#130
@zml2008 zml2008 self-assigned this Mar 4, 2023
@zml2008 zml2008 merged commit 6618818 into MinecraftForge:master Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decompile output is inconsistent between Java 17 and 19

2 participants