Closed Janmm14 closed 8 years ago
Krakatau already does the bool?:1:0 thing. Unfortunately, it is not possible to fix every case.
Also, it's not clear to me what the problem is in the second example you listed. What do you want it to do instead?
@Storyyeller It just looks wrong to have a !=
there for the code as System.currentTimeMillis()
is very likely to differ from the value of the map, but it could differ in both directions which one normally doesn't want to check. Also I'm not that familiar with bytecode to check it out myself.
As far as I can tell from the bytecode, != is correct here. Blame the people who wrote the code.
Okay, thanks for the clarification. For the first issue it stays that I have to manually convert ints and booleans :/
If they aren't converted automatically for whatever reason, then yes.
As booleans are basically ints in the stack, there are some issues noticed by me where krakatau puts out code like
if (bool >= 0)
. A possible solution would be to add an inline if:if ((bool?:1:0) >= 0)
(if that decompiled code above is even correct at all) I additionally noticed this:Which looks to be wrong (also as other decompilers show a subtraction).
Here is the bytecode where I found these two issues (sorry, anonymized)