1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 03:58:12 +00:00

LibJS: Remove Bytecode::Register::global_object()

This is unused.
This commit is contained in:
Linus Groh 2022-08-22 19:38:55 +01:00
parent 275dea9d98
commit 987927a596
2 changed files with 0 additions and 8 deletions

View file

@ -68,7 +68,6 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable const& e
m_register_windows.append(make<RegisterWindow>(MarkedVector<Value>(vm().heap()), MarkedVector<Environment*>(vm().heap()), MarkedVector<Environment*>(vm().heap()))); m_register_windows.append(make<RegisterWindow>(MarkedVector<Value>(vm().heap()), MarkedVector<Environment*>(vm().heap()), MarkedVector<Environment*>(vm().heap())));
registers().resize(executable.number_of_registers); registers().resize(executable.number_of_registers);
registers()[Register::global_object_index] = Value(&m_realm.global_object());
for (;;) { for (;;) {
Bytecode::InstructionStreamIterator pc(block->instruction_stream()); Bytecode::InstructionStreamIterator pc(block->instruction_stream());

View file

@ -13,7 +13,6 @@ namespace JS::Bytecode {
class Register { class Register {
public: public:
constexpr static u32 accumulator_index = 0; constexpr static u32 accumulator_index = 0;
constexpr static u32 global_object_index = 1;
static Register accumulator() static Register accumulator()
{ {
@ -21,12 +20,6 @@ public:
return accumulator; return accumulator;
} }
static Register global_object()
{
static Register global_object(global_object_index);
return global_object;
}
explicit Register(u32 index) explicit Register(u32 index)
: m_index(index) : m_index(index)
{ {