> No, we have a traditional AST interpreter that is being replaced by a bytecode VM. You can track the LibJS test262 score for both backends here. I’m not convinced that the complexity and security burdens of a JavaScript JIT are reasonable, and given recent developments like Microsoft Edge’s Super Duper Secure Mode, I’m interested in pushing for best-effort JIT-less performance while keeping the codebase simple.
Always excited to see new JS engines. I'd be curious to see where LibJS's performance / code simplicity / memory balance tends towards over time.
I wonder if a new implementation of JavaScript was needed. My first hunch would have been to try Fabrice Bellard's QuickJS:
https://bellard.org/quickjs/
Everything is from scratch on SerenityOS. Ladybird takes as much of that as it can but the is not afraid to use existing tech for the bits of Serenity that cannot currently be used on Linux ( the GUi framework and networking ).
I think they'll replace Qt with their own GUI lib eventually - and they're already building their own language to replace C++ (for their uses I mean)...
for their operating system (serenityOS) they're not using any dependencies, they have their own windowing framework. for the cross platform version of the browser, they use Qt instead. but on serenity itself the browser does not use it.
It's worth noting, as I'm sure you already noticed, that they are supporting WASM in addition to JS. So maybe the right answer for "your simple, secure bytecode JS interpreter is too slow" really is "Just precompile that slow part to WASM".
> No, we have a traditional AST interpreter that is being replaced by a bytecode VM. You can track the LibJS test262 score for both backends here. I’m not convinced that the complexity and security burdens of a JavaScript JIT are reasonable, and given recent developments like Microsoft Edge’s Super Duper Secure Mode, I’m interested in pushing for best-effort JIT-less performance while keeping the codebase simple.
Always excited to see new JS engines. I'd be curious to see where LibJS's performance / code simplicity / memory balance tends towards over time.