3 ms·
There is, for example https://bellard.org/quickjs/ https://bellard.org/quickjs/
by maattdd 5y ago
There is, for example https://bellard.org/quickjs/ https://bellard.org/quickjs/
- eatonphil 5y agoThat's an interpreter written in C and without a JIT. Not the same as an AOT compiler. https://github.com/bellard/quickjs/blob/master/quickjs-opcode.h https://github.com/bellard/quickjs/blob/master/quickjs-opcod... The point isn't just not having a JIT. You can run v8 without a JIT. The point is good performance without a JIT.
- BiteCode_dev 5y ago"Can compile Javascript sources to executables with no external dependency"
- eatonphil 5y ago> @item -c > Only output bytecode in a C file. The default is to output an executable file. > @item -e > Output @code{main()} and bytecode in a C file. The default is to output an executable file. https://github.com/bellard/quickjs/blob/master/doc/quickjs.texi#L159 https://github.com/bellard/quickjs/blob/master/doc/quickjs.t...
- formerly_proven 5y agoWhich probably works by stapling bytecode to a precompiled interpreter. A tried and true strategy, but not necessarily what people want when asking for AOT compilation.
- mappu 5y agoIt's only a few steps away from what Graal/Truffle do: unroll the interpreter loop over the bytecode, then keep re-running dead code elimination and inlining passes - you end up with something very close to optimized native output.
- pjmlp 5y agoSpecially since Graal/Truffle do include a JIT, which even has better optimization heuristics than Hotspot.
- deleted 5y ago[deleted]