1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:57:44 +00:00
serenity/Userland
Andreas Kling 69dddd4ef5 LibJS: Start fleshing out a bytecode for the JavaScript engine :^)
This patch begins the work of implementing JavaScript execution in a
bytecode VM instead of an AST tree-walk interpreter.

It's probably quite naive, but we have to start somewhere.

The basic idea is that you call Bytecode::Generator::generate() on an
AST node and it hands you back a Bytecode::Block filled with
instructions that can then be interpreted by a Bytecode::Interpreter.

This first version only implements two instructions: Load and Add. :^)

Each bytecode block has infinity registers, and the interpreter resizes
its register file to fit the block being executed.

Two new `js` options are added in this patch as well:

`-d` will dump the generated bytecode
`-b` will execute the generated bytecode

Note that unless `-d` and/or `-b` are specified, none of the bytecode
related stuff in LibJS runs at all. This is implemented in parallel
with the existing AST interpreter. :^)
2021-06-07 18:11:59 +02:00
..
Applets Applets/Network: Replace fprintf(stderr) with dbgln() 2021-05-31 17:44:01 +01:00
Applications LibWeb+LibSyntax: Implement nested syntax highlighters 2021-06-07 14:45:49 +04:30
Demos AK+Everywhere: Disallow constructing Functions from incompatible types 2021-06-06 00:27:30 +04:30
DevTools AK+Everywhere: Disallow constructing Functions from incompatible types 2021-06-06 00:27:30 +04:30
DynamicLoader Userland: Port UBSAN implementation to userspace 2021-05-27 15:18:03 +02:00
Games AK+Everywhere: Disallow constructing Functions from incompatible types 2021-06-06 00:27:30 +04:30
Libraries LibJS: Start fleshing out a bytecode for the JavaScript engine :^) 2021-06-07 18:11:59 +02:00
Services WindowServer+Magnifier: Make Magnifier buttery smooth :^) 2021-06-07 10:22:25 +02:00
Shell LibWeb+LibSyntax: Implement nested syntax highlighters 2021-06-07 14:45:49 +04:30
Utilities LibJS: Start fleshing out a bytecode for the JavaScript engine :^) 2021-06-07 18:11:59 +02:00
CMakeLists.txt Tests: Establish root Tests directory, move Userland/Tests there 2021-05-06 17:54:28 +02:00