Re:Experimental support for WebAssembly in V8
by twistedpair on Tuesday March 15, 2016 @04:13PM
(#11292614)
I can only imagine the possible security exploits available by passing AST binaries directly to the browser, rather than letting the JS lexer/tokenizer and compiler enforce language rules from the source.
Re:Experimental support for WebAssembly in V8
by robbrown451 on Tuesday March 15, 2016 @04:46PM
(#11292846)
Luckily, the designers of WebAssembly imagined those things before you.
Compiling JavaScript text source code into a binary representation of its AST will save time and space downloading, and time starting up.
You won't need another JIT compiler, the web browser usually already has one. WebAssembly is bytecode and JIT agnostic. Compiling text JavaScript into a binary WebAssembly representation of the parse tree is different than compiling the parse tree to bytecode, or JITting the parse tree or bytecode to machine code. They are complementary layers, and both synergistically useful together.
[1] http://bytecrafter.blogspot.nl/2015/06/a-quick-overview-of-w...