mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-06 17:11:51 +00:00
LibJS: Pass VM& to ECMAScriptFunctionObject [[Call]] helpers
This avoids fetching the VM from the Cell::private_data() repeatedly.
This commit is contained in:
parent
8a3c66d8a6
commit
403ae86fd9
Notes:
github-actions[bot]
2025-04-28 10:46:17 +00:00
Author: https://github.com/awesomekling
Commit: 403ae86fd9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4499
2 changed files with 15 additions and 21 deletions
|
@ -181,11 +181,6 @@ public:
|
|||
|
||||
friend class Bytecode::Generator;
|
||||
|
||||
protected:
|
||||
virtual bool is_strict_mode() const override { return shared_data().m_strict; }
|
||||
|
||||
virtual Completion ordinary_call_evaluate_body();
|
||||
|
||||
private:
|
||||
ECMAScriptFunctionObject(
|
||||
NonnullRefPtr<SharedFunctionInstanceData>,
|
||||
|
@ -193,14 +188,18 @@ private:
|
|||
PrivateEnvironment* private_environment,
|
||||
Object& prototype);
|
||||
|
||||
virtual bool is_strict_mode() const override { return shared_data().m_strict; }
|
||||
|
||||
Completion ordinary_call_evaluate_body(VM&);
|
||||
|
||||
[[nodiscard]] bool function_environment_needed() const { return shared_data().m_function_environment_needed; }
|
||||
SharedFunctionInstanceData const& shared_data() const { return m_shared_data; }
|
||||
|
||||
virtual bool is_ecmascript_function_object() const override { return true; }
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
ThrowCompletionOr<void> prepare_for_ordinary_call(ExecutionContext& callee_context, Object* new_target);
|
||||
void ordinary_call_bind_this(ExecutionContext&, Value this_argument);
|
||||
ThrowCompletionOr<void> prepare_for_ordinary_call(VM&, ExecutionContext& callee_context, Object* new_target);
|
||||
void ordinary_call_bind_this(VM&, ExecutionContext&, Value this_argument);
|
||||
|
||||
NonnullRefPtr<SharedFunctionInstanceData> m_shared_data;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue