Comment

Comment by klodolph

If you were designing a bytecode as a compilation target, you would provide an easy correspondence in the bytecode to basic blocks.

See: https://en.wikipedia.org/wiki/Basic_block

WASM instead provides traditional control structures. So the compiler either has to preserve control structures through to the IR, or has to work backwards from basic blocks to control structures. Both options are undesirable, from the perspective of compiler writers, and would be unnecessary if the VM were a greenfield project.

parent klodolph 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton