diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index 8999675e8c..d5934759d9 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -68,7 +68,6 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable const& e m_register_windows.append(make(MarkedVector(vm().heap()), MarkedVector(vm().heap()), MarkedVector(vm().heap()))); registers().resize(executable.number_of_registers); - registers()[Register::global_object_index] = Value(&m_realm.global_object()); for (;;) { Bytecode::InstructionStreamIterator pc(block->instruction_stream()); diff --git a/Userland/Libraries/LibJS/Bytecode/Register.h b/Userland/Libraries/LibJS/Bytecode/Register.h index 1bdab0eeb7..43bc29c26b 100644 --- a/Userland/Libraries/LibJS/Bytecode/Register.h +++ b/Userland/Libraries/LibJS/Bytecode/Register.h @@ -13,7 +13,6 @@ namespace JS::Bytecode { class Register { public: constexpr static u32 accumulator_index = 0; - constexpr static u32 global_object_index = 1; static Register accumulator() { @@ -21,12 +20,6 @@ public: return accumulator; } - static Register global_object() - { - static Register global_object(global_object_index); - return global_object; - } - explicit Register(u32 index) : m_index(index) {