mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibJS: Precompute the number of regs/constants/locals in Executable
Instead of doing it again on every call. Minor bump in call performance.
This commit is contained in:
committed by
Andreas Kling
parent
cdcbbcf48b
commit
6671cbef41
Notes:
github-actions[bot]
2025-10-30 07:56:02 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/6671cbef41d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6638
@@ -507,7 +507,7 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::get_stack_frame_size(size_t& r
|
||||
executable = TRY(Bytecode::compile(vm(), *this));
|
||||
}
|
||||
}
|
||||
registers_and_constants_and_locals_count = executable->number_of_registers + executable->constants.size() + executable->local_variable_names.size();
|
||||
registers_and_constants_and_locals_count = executable->registers_and_constants_and_locals_count;
|
||||
argument_count = max(argument_count, formal_parameters().size());
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user