Hacker News new | ask | show | jobs
by amelius 3035 days ago
Strange that wasm doesn't support go-to instructions. Didn't they see the need for it coming? Most compiler backends need it, I suppose.
3 comments

I'm assuming it's because they wanted existing js/asm.js JITs to easily accept wasm, and those only see structured control flow.
> Didn't they see the need for it coming?

Wasm exists because it's small and incremental; there's lots of stuff that's needed, but not in the initial spec. As long as it can be added in the future, that's what matters.

It's easier to add instructions than to remove our restrict them. Hardware or software exploits to break out of the sandbox are huge concerns. I'm all for introducing new features slowly.