mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
LibJS: Let invokers (callers) of [[Call]] allocate ExecutionContext
Instead of letting every [[Call]] implementation allocate an ExecutionContext, we now make that a responsibility of the caller. The main point of this exercise is to allow the Call instruction to write function arguments directly into the callee ExecutionContext instead of copying them later. This makes function calls significantly faster: - 10-20% faster on micro-benchmarks (depending on argument count) - 4% speedup on Kraken - 2% speedup on Octane - 5% speedup on JetStream
This commit is contained in:
committed by
Andreas Kling
parent
93788f8057
commit
a05be67e4a
Notes:
github-actions[bot]
2025-04-27 23:24:56 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/a05be67e4ae Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4497 Reviewed-by: https://github.com/Hendiadyoin1
@@ -116,7 +116,8 @@ public:
|
||||
virtual void initialize(Realm&) override;
|
||||
virtual ~ECMAScriptFunctionObject() override = default;
|
||||
|
||||
virtual ThrowCompletionOr<Value> internal_call(Value this_argument, ReadonlySpan<Value> arguments_list) override;
|
||||
virtual ThrowCompletionOr<void> get_stack_frame_size(size_t& registers_and_constants_and_locals_slots, size_t& argument_count) override;
|
||||
virtual ThrowCompletionOr<Value> internal_call(ExecutionContext&, Value this_argument) override;
|
||||
virtual ThrowCompletionOr<GC::Ref<Object>> internal_construct(ReadonlySpan<Value> arguments_list, FunctionObject& new_target) override;
|
||||
|
||||
void make_method(Object& home_object);
|
||||
|
||||
Reference in New Issue
Block a user