Conversation
Notices
-
Embed this notice
i wonder if wasm recompilers have code to try to spot relooper/stackifier nonsense and try to compile it back to the switch/gotos it was supposed to be :drgn_sad:
-
Embed this notice
@vr-t8x15 i suspect the sane thing to do is simply not optimize at all. just do some very basic switch in a while loop (the thing they are trying to get out of doing) but have the client look at this obvious pattern and write what should have been there the whole time.
idk i'm not a compiler blob i'm trying to get one parser done and then hoping to never again
-
Embed this notice
@icedquinn yeah, compiled wasm can get many, many, many branches deep. idk what kind of heuristic you'd use to detect when unrelooping is necessary but it definitely would improve the readability of decompiled wasm regardless of it's an accurate reproduction of the original source code