1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 15:57:34 +00:00
serenity/Userland
Matthew Olsson 9bed2e4f4a LibJS: Introduce an accumulator register to Bytecode::Interpreter
This commit introduces the concept of an accumulator register to
LibJS's bytecode interpreter. The accumulator register is always
register 0, and most simple instructions use it for reading and
writing.

Not only does this slim down the AST, but it also simplifies a lot of
the code. For example, the generate_bytecode methods no longer need
to return an Optional<Register>, as any opcode which has a "return"
value will always put it into the accumulator.

This also renames the old Op::Load to Op::LoadImmediate, and uses
Op::Load to load from a register into the accumulator. There is
also an Op::Store to put the value in the accumulator into another
register.
2021-06-08 21:00:12 +02:00
..
Applets Applets/Network: Replace fprintf(stderr) with dbgln() 2021-05-31 17:44:01 +01:00
Applications Everywhere: Replace Vector<T*> with nonnull entries with Vector<T&> 2021-06-08 19:14:24 +02:00
Demos CatDog: Enhance the speech bubble artificial intelligence 2021-06-07 21:52:16 +02:00
DevTools Everywhere: Replace Vector<T*> with nonnull entries with Vector<T&> 2021-06-08 19:14:24 +02:00
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: Introduce an accumulator register to Bytecode::Interpreter 2021-06-08 21:00:12 +02:00
Services Everywhere: Replace Vector<T*> with nonnull entries with Vector<T&> 2021-06-08 19:14:24 +02:00
Shell Shell: Make time stop parsing options on first non-option 2021-06-08 11:30:58 +02:00
Utilities gron: Handle invalid input gracefully 2021-06-08 19:15:12 +02:00
CMakeLists.txt Tests: Establish root Tests directory, move Userland/Tests there 2021-05-06 17:54:28 +02:00