From 22c803d8e50616170e336a5902cf3d8aeaf2a115 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 10 Jun 2021 01:07:53 +0200 Subject: [PATCH] LibJS: Always keep the global object in bytecode VM register $1 --- Userland/Libraries/LibJS/Bytecode/Generator.h | 2 +- Userland/Libraries/LibJS/Bytecode/Interpreter.cpp | 1 + Userland/Libraries/LibJS/Bytecode/Register.h | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Bytecode/Generator.h b/Userland/Libraries/LibJS/Bytecode/Generator.h index f3d8fabf6e..7410ff1918 100644 --- a/Userland/Libraries/LibJS/Bytecode/Generator.h +++ b/Userland/Libraries/LibJS/Bytecode/Generator.h @@ -99,7 +99,7 @@ private: NonnullOwnPtrVector m_root_basic_blocks; NonnullOwnPtr m_string_table; - u32 m_next_register { 1 }; + u32 m_next_register { 2 }; u32 m_next_block { 1 }; Vector