mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibJS: Remove unnecessary FunctionObject::name() virtual
This allows us to remove the BoundFunction::m_name field, which we were initializing with a formatted FlyString on every function binding, despite never using it for anything.
This commit is contained in:
parent
6bd2cf3195
commit
4a5863bcdb
Notes:
github-actions[bot]
2025-04-10 02:01:55 +00:00
Author: https://github.com/awesomekling
Commit: 4a5863bcdb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4305
11 changed files with 5 additions and 26 deletions
|
@ -23,7 +23,6 @@ public:
|
|||
virtual ThrowCompletionOr<Value> internal_call(Value this_argument, ReadonlySpan<Value> arguments_list) override;
|
||||
virtual ThrowCompletionOr<GC::Ref<Object>> internal_construct(ReadonlySpan<Value> arguments_list, FunctionObject& new_target) override;
|
||||
|
||||
virtual FlyString const& name() const override { return m_name; }
|
||||
virtual bool is_strict_mode() const override { return m_bound_target_function->is_strict_mode(); }
|
||||
virtual bool has_constructor() const override { return m_bound_target_function->has_constructor(); }
|
||||
|
||||
|
@ -39,8 +38,6 @@ private:
|
|||
GC::Ptr<FunctionObject> m_bound_target_function; // [[BoundTargetFunction]]
|
||||
Value m_bound_this; // [[BoundThis]]
|
||||
Vector<Value> m_bound_arguments; // [[BoundArguments]]
|
||||
|
||||
FlyString m_name;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue