ladybird/Userland/Libraries/LibJS/Bytecode
Andreas Kling 6ae9346cd3 LibJS: Add basic support for while loops in the bytecode engine
This introduces two new instructions: Jump and JumpIfFalse.
Jumps are made to a Bytecode::Label, which is a simple object that
represents a location in the bytecode stream.

Note that you may not always know the target of a jump when adding the
jump instruction itself, but we can just update the instruction later
on during codegen once we know where the jump target is.

The Bytecode::Interpreter now implements jumping via a jump slot that
gets checked after each instruction to see if a jump is pending.
If not, we just increment the PC as usual.
2021-06-07 18:11:59 +02:00
..
ASTCodegen.cpp LibJS: Add basic support for while loops in the bytecode engine 2021-06-07 18:11:59 +02:00
Block.cpp LibJS: Start fleshing out a bytecode for the JavaScript engine :^) 2021-06-07 18:11:59 +02:00
Block.h LibJS: Start fleshing out a bytecode for the JavaScript engine :^) 2021-06-07 18:11:59 +02:00
Generator.cpp LibJS: Add basic support for while loops in the bytecode engine 2021-06-07 18:11:59 +02:00
Generator.h LibJS: Add basic support for while loops in the bytecode engine 2021-06-07 18:11:59 +02:00
Instruction.cpp LibJS: Start fleshing out a bytecode for the JavaScript engine :^) 2021-06-07 18:11:59 +02:00
Instruction.h LibJS: Start fleshing out a bytecode for the JavaScript engine :^) 2021-06-07 18:11:59 +02:00
Interpreter.cpp LibJS: Add basic support for while loops in the bytecode engine 2021-06-07 18:11:59 +02:00
Interpreter.h LibJS: Add basic support for while loops in the bytecode engine 2021-06-07 18:11:59 +02:00
Label.h LibJS: Add basic support for while loops in the bytecode engine 2021-06-07 18:11:59 +02:00
Op.cpp LibJS: Add basic support for while loops in the bytecode engine 2021-06-07 18:11:59 +02:00
Op.h LibJS: Add basic support for while loops in the bytecode engine 2021-06-07 18:11:59 +02:00
Register.h LibJS: Print bytecode registers with format "$num" instead of "rnum" 2021-06-07 18:11:59 +02:00