All browsers (and Node) seem to implement the same size limit for functions (somewhere around the 7MB mark).
How about a pass for wasm-opt that breaks long functions up into smaller pieces? AFAICT, this should be doable by partitioning the big function and potentially passing the state of locals from one function to the next.
WDYT?