mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibJS: Make ExecutionContext::identifier_table a raw pointer
We were already skipping the bounds checks on this thing anyway, so might as well shrink ExecutionContext by 8 bytes by doing this.
This commit is contained in:
parent
5b9469786e
commit
8a02acbab6
|
|
@ -702,7 +702,7 @@ FLATTEN_ON_CLANG void Interpreter::run_bytecode(size_t entry_point)
|
|||
|
||||
Utf16FlyString const& Interpreter::get_identifier(IdentifierTableIndex index) const
|
||||
{
|
||||
return m_running_execution_context->identifier_table.data()[index.value];
|
||||
return m_running_execution_context->identifier_table[index.value];
|
||||
}
|
||||
|
||||
ThrowCompletionOr<Value> Interpreter::run_executable(ExecutionContext& context, Executable& executable, Optional<size_t> entry_point)
|
||||
|
|
@ -715,7 +715,7 @@ ThrowCompletionOr<Value> Interpreter::run_executable(ExecutionContext& context,
|
|||
context.executable = executable;
|
||||
context.global_object = realm().global_object();
|
||||
context.global_declarative_environment = realm().global_environment().declarative_record();
|
||||
context.identifier_table = executable.identifier_table->identifiers();
|
||||
context.identifier_table = executable.identifier_table->identifiers().data();
|
||||
|
||||
ASSERT(executable.registers_and_constants_and_locals_count <= context.registers_and_constants_and_locals_and_arguments_span().size());
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public:
|
|||
Optional<size_t> scheduled_jump;
|
||||
GC::Ptr<Object> global_object;
|
||||
GC::Ptr<DeclarativeEnvironment> global_declarative_environment;
|
||||
ReadonlySpan<Utf16FlyString> identifier_table;
|
||||
Utf16FlyString const* identifier_table { nullptr };
|
||||
|
||||
u32 program_counter { 0 };
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user