-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Why not ship bytecode instead?
On the Web, no vendor would agree to ship bytecode.
- Engines don’t want to be tied to a bytecode version.
- It’s harder to verify bytecode, as bytecode is more expressive than syntax.
- It runs the risk of bifurcating the language, as bytecode may be more expressive than structured JavaScript source.
- Designing a new bytecode is an even more ambitious undertaking.
This is very misleading. A binary AST, especially if you represent nodes in reverse Polish form with the operator at the end, can very much be interpreted as stack machine bytecode. To draw a comparison, WebAssembly's bytecode was designed from the start to be a context-sensitive AST encoding, and even after the change to a stack machine, it still continues to this day to be almost entirely representable as an AST. And if you allow any number of non-value-returning nodes to exist both at the beginning of any block and after any value-returning node, it could be read in full as if it contained an AST.
Metadata
Metadata
Assignees
Labels
No labels