LibJS: Replace arguments Span with argument_count in ExecutionContext

The arguments Span (pointer + size = 16 bytes) was always derivable
from the tail array layout: data = values + (total_count - arg_count).

Replace it with a u32 argument_count and derive the span on demand
via arguments_span() / arguments_data() accessors.

Shrinks ExecutionContext from 136 to 120 bytes.
This commit is contained in:
Andreas Kling
2026-03-08 12:30:23 +01:00
committed by Andreas Kling
parent 75e7bc1e2a
commit 5f463ed989
Notes: github-actions[bot] 2026-03-11 12:35:15 +00:00
15 changed files with 63 additions and 44 deletions

View File

@@ -42,7 +42,7 @@ ThrowCompletionOr<GC::Ref<Object>> AsyncGeneratorFunctionConstructor::construct(
{
auto& vm = this->vm();
ReadonlySpan<Value> arguments = vm.running_execution_context().arguments;
ReadonlySpan<Value> arguments = vm.running_execution_context().arguments_span();
ReadonlySpan<Value> parameter_args = arguments;
if (!parameter_args.is_empty())