Option to "Disable code optimization"
Option to "Disable code optimization"
Maybe something like Config -> Assembler => Disable code optimization
The main idea is to have an option to "disable" code optimization when modifying a class.
Please refer to the following images for a better explanation.
Original code with the instruction IFNONNULL J replaced with GOTO T

Resulting method after the optimization

Recaf-2.4.1
That can't be turned off. ASM replaces dead code with nops plus athrow in order to generate valid stack map.
Thanks for the info.
Yeah, it would be nice, but this is an ASM feature: MethodWriter.java
Like most things in ASM, its code inside a private method and is tightly coupled with other private logic, so it can't be easily removed by extension (This is a common head-ache when attempting to mess with adding behavior to ASM). Great library, but the developers don't intend on making large portions of their code extensible.
I'd be happy to accept a PR if somebody finds a magical (and clean) way to resolve this. I would prefer to not ship our own fork of ASM.