mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02: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:
committed by
Alexander Kalenik
parent
6bd2cf3195
commit
4a5863bcdb
Notes:
github-actions[bot]
2025-04-10 02:01:55 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/4a5863bcdbc Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4305
@@ -127,7 +127,7 @@ public:
|
||||
Statement const& ecmascript_code() const { return *shared_data().m_ecmascript_code; }
|
||||
[[nodiscard]] virtual FunctionParameters const& formal_parameters() const override { return *shared_data().m_formal_parameters; }
|
||||
|
||||
virtual FlyString const& name() const override { return shared_data().m_name; }
|
||||
FlyString const& name() const { return shared_data().m_name; }
|
||||
void set_name(FlyString const& name);
|
||||
|
||||
void set_is_class_constructor() { const_cast<SharedFunctionInstanceData&>(shared_data()).m_is_class_constructor = true; }
|
||||
|
||||
Reference in New Issue
Block a user