mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 16:28:48 +00:00
LibJS: Cache arguments span in ExecutionContext
Allows us to avoid doing math in ExecutionContext::argument()
This commit is contained in:
parent
ff751173ac
commit
e48645c83f
Notes:
github-actions[bot]
2025-04-24 08:31:57 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: e48645c83f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4434
Reviewed-by: https://github.com/alimpfard
13 changed files with 24 additions and 31 deletions
|
@ -506,7 +506,7 @@ ThrowCompletionOr<Value> ECMAScriptFunctionObject::internal_call(Value this_argu
|
|||
ALLOCATE_EXECUTION_CONTEXT_ON_NATIVE_STACK(callee_context, registers_and_constants_and_locals_count, arguments_count);
|
||||
|
||||
// Non-standard
|
||||
auto arguments = callee_context->arguments();
|
||||
auto arguments = callee_context->arguments;
|
||||
if (!arguments_list.is_empty())
|
||||
arguments.overwrite(0, arguments_list.data(), arguments_list.size() * sizeof(Value));
|
||||
callee_context->passed_argument_count = arguments_list.size();
|
||||
|
@ -578,7 +578,7 @@ ThrowCompletionOr<GC::Ref<Object>> ECMAScriptFunctionObject::internal_construct(
|
|||
ALLOCATE_EXECUTION_CONTEXT_ON_NATIVE_STACK(callee_context, registers_and_constants_and_locals_count, arguments_count);
|
||||
|
||||
// Non-standard
|
||||
auto arguments = callee_context->arguments();
|
||||
auto arguments = callee_context->arguments;
|
||||
if (!arguments_list.is_empty())
|
||||
arguments.overwrite(0, arguments_list.data(), arguments_list.size() * sizeof(Value));
|
||||
callee_context->passed_argument_count = arguments_list.size();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue