News for hackers. Stuff that matters.
Re:A New Bytecode Format for JavaScriptCore by pier25 on Friday June 21, 2019 @03:08PM (#20245448)
Is it possible to pregenerate that bytecode?

For example for hybrid desktop/mobile apps.

Re:A New Bytecode Format for JavaScriptCore by olliej on Friday June 21, 2019 @04:11PM (#20245916)
No, 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.

Re:A New Bytecode Format for JavaScriptCore by pier25 on Friday June 21, 2019 @04:43PM (#20246173)
And what about caching the bytecode so that it only happens once?
Re:A New Bytecode Format for JavaScriptCore by olliej on Friday June 21, 2019 @04:48PM (#20246203)
JSC already does that internally.
Re:A New Bytecode Format for JavaScriptCore by pier25 on Friday June 21, 2019 @07:39PM (#20247124)
For webviews too?
Re:A New Bytecode Format for JavaScriptCore by olliej on Friday June 21, 2019 @08:07PM (#20247228)
Yes.
Re:A New Bytecode Format for JavaScriptCore by eridius on Friday June 21, 2019 @04:29PM (#20246057)
If you're going to precompile your JS, why would you want to emit this bytecode instead of just going to WASM?
Re:A New Bytecode Format for JavaScriptCore by pier25 on Friday June 21, 2019 @04:42PM (#20246167)
Because wasm still doesn't support many features that JS does. For example accessing the DOM.
Re:A New Bytecode Format for JavaScriptCore by firethief on Friday June 21, 2019 @06:58PM (#20246944)
Bytecode 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.