You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.
When compiled, bar is known to be constant, as it is a constant value in a final local. The compiler will then inline it, and the decompiled code would look roughly like this:
The compile does not strip the local, so theoretically unpick could support it. In the context of Minecraft code, it can be seen that the tool ProGuard also does not strip these locals (likely as at the time of stripping they are not seen as unused, or simply because ProGuard does not wish to modify the LVT for such a small optimization).
Unfortunately, there are cases where unpicking is not possible (to my knowledge), wherein the compiler can inline math operations of known constants, as shown in the example below:
In most cases, operations involving inlined locals load other locals or fields that cannot be inlined, however, so the case of this inlining scenario is rare, and still justifies support for unpicking of locals, IMO.
The text was updated successfully, but these errors were encountered:
When a local is known to be constant, the compiler will inline it.
Take, for example, this code:
When compiled,
bar
is known to be constant, as it is a constant value in afinal
local. The compiler will then inline it, and the decompiled code would look roughly like this:The compile does not strip the local, so theoretically unpick could support it. In the context of Minecraft code, it can be seen that the tool ProGuard also does not strip these locals (likely as at the time of stripping they are not seen as unused, or simply because ProGuard does not wish to modify the LVT for such a small optimization).
Unfortunately, there are cases where unpicking is not possible (to my knowledge), wherein the compiler can inline math operations of known constants, as shown in the example below:
In most cases, operations involving inlined locals load other locals or fields that cannot be inlined, however, so the case of this inlining scenario is rare, and still justifies support for unpicking of locals, IMO.
The text was updated successfully, but these errors were encountered: