4 ms·
Is it possible to pregenerate that bytecode? For example for hybrid desktop/mobile apps.
by pier25 7y ago
Is it possible to pregenerate that bytecode?
For example for hybrid desktop/mobile apps.
- eridius 7y agoIf you're going to precompile your JS, why would you want to emit this bytecode instead of just going to WASM?
- pier25 7y agoBecause wasm still doesn't support many features that JS does. For example accessing the DOM.
- firethief 7y agoBytecode is a broad category. The design of a bytecode suitable for interpreting JS has little in common with a bytecode for AOT compilation of static languages without tracing GC, other than that they're both made of bytes.
- olliej 7y agoNo, because that would require exposing implementation details. e.g. the first API version of the bytecode would be the fixed API, and any future changes would require a translation layer for converting from one version of the bytecode to the other. The bytecode is also an internal format so is consider trusted - once you expose it you have to worry about invalid bytecode.