1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

LibJS: Put FLATTEN on ECMAScriptFunctionObject.[[Call]]

This makes function calls ~5% faster in micro-benchmarks on my MBP.
Basically free money on the table. Let's take it!
This commit is contained in:
Andreas Kling 2025-04-28 01:54:11 +02:00 committed by Andreas Kling
parent d0d87d3aed
commit 670e439e1e
Notes: github-actions[bot] 2025-04-28 10:45:57 +00:00

View file

@ -499,7 +499,7 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::get_stack_frame_size(size_t& r
}
// 10.2.1 [[Call]] ( thisArgument, argumentsList ), https://tc39.es/ecma262/#sec-ecmascript-function-objects-call-thisargument-argumentslist
ThrowCompletionOr<Value> ECMAScriptFunctionObject::internal_call(ExecutionContext& callee_context, Value this_argument)
FLATTEN ThrowCompletionOr<Value> ECMAScriptFunctionObject::internal_call(ExecutionContext& callee_context, Value this_argument)
{
auto& vm = this->vm();