2 ms·
> There's nothing new here compared to ... whatever other VM bytecode formats have been dreamed up Well, there is: it was designed to be easy for already matur
by Joker_vD 3y ago
> There's nothing new here compared to ... whatever other VM bytecode formats have been dreamed up
Well, there is: it was designed to be easy for already mature V8's codebase to adopt as a low-level IR, with minimal changes (e.g. V8 keeps the JS AST more or less intact during the codegen, it doesn't lower it into 3-address code or anything like that, so WASM too has structured loops and blocks but no general "goto"). Other VMs, I believe, were developed after the bytecode design for them was done.
- pjmlp 3y agoKind of ironic given PNaCL was equally designed for V8.
- titzer 3y agoI worked a lot with the PNaCL team and they never told us that. Unless you have a reference I am aware of in a design doc. PNaCL was LLVM bitcode.
- pjmlp 3y agoUsed by V8 execution pipeline on Chrome. It isn't as if it was given other execution runtime, so it certainly wasn't designed for Firefox, IE, Safari, Opera,...
- titzer 3y agoNo, PNaCl used LLVM initially and was working on a faster compiler internally (SubZero) before we refocused efforts on Wasm. You might be referring to the effort to port V8's compiler(s) to emit sandboxed code, but that was never merged into mainstream V8.
- sesm 3y agoOk, so WASM was designed to be a more low-level interface to V8. This makes sense from a technical PoV and from promotion-driven culture at Google. But it doesn’t originate from any real-world problem, just a hammer looking for a nail.