1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-29 03:42:07 +00:00

LibJS: Always keep the global object in bytecode VM register $1

This commit is contained in:
Andreas Kling 2021-06-10 01:07:53 +02:00
parent b3e6a6c1cd
commit 22c803d8e5
3 changed files with 9 additions and 1 deletions

View file

@ -59,6 +59,7 @@ Value Interpreter::run(Executable const& executable)
auto block = &executable.basic_blocks.first();
m_register_windows.append(make<RegisterWindow>());
registers().resize(executable.number_of_registers);
registers()[Register::global_object_index] = Value(&global_object());
for (;;) {
Bytecode::InstructionStreamIterator pc(block->instruction_stream());