ladybird/Userland/Libraries/LibJS/Bytecode
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
..
ASTCodegen.cpp LibJS: Introduce an accumulator register to Bytecode::Interpreter 2021-06-08 21:00:12 +02:00
Block.cpp LibJS: Seal Bytecode Blocks and munmap them (#7919) 2021-06-08 17:21:48 +02:00
Block.h LibJS: Seal Bytecode Blocks and munmap them (#7919) 2021-06-08 17:21:48 +02:00
Generator.cpp LibJS: Introduce an accumulator register to Bytecode::Interpreter 2021-06-08 21:00:12 +02:00
Generator.h LibJS: Devirtualize and pack the bytecode stream :^) 2021-06-07 18:11:59 +02:00
Instruction.cpp LibJS: Devirtualize and pack the bytecode stream :^) 2021-06-07 18:11:59 +02:00
Instruction.h LibJS: Introduce an accumulator register to Bytecode::Interpreter 2021-06-08 21:00:12 +02:00
Interpreter.cpp LibJS: Move bytecode debug spam behind JS_BYTECODE_DEBUG :^) 2021-06-07 18:11:59 +02:00
Interpreter.h LibJS: Introduce an accumulator register to Bytecode::Interpreter 2021-06-08 21:00:12 +02:00
Label.h LibJS: Devirtualize and pack the bytecode stream :^) 2021-06-07 18:11:59 +02:00
Op.cpp LibJS: Introduce an accumulator register to Bytecode::Interpreter 2021-06-08 21:00:12 +02:00
Op.h LibJS: Introduce an accumulator register to Bytecode::Interpreter 2021-06-08 21:00:12 +02:00
Register.h LibJS: Introduce an accumulator register to Bytecode::Interpreter 2021-06-08 21:00:12 +02:00