mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
LibJS: Shrink MemberExpression by rearranging members slightly
By putting m_computed in the padding hole after our base class, we shrink MemberExpression by 8 bytes. :^)
This commit is contained in:
parent
e70f944e11
commit
1f909d24b6
Notes:
sideshowbarker
2024-07-17 03:37:02 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1f909d24b6 Pull-request: https://github.com/SerenityOS/serenity/pull/16215 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/trflynn89
1 changed files with 2 additions and 2 deletions
|
@ -1782,9 +1782,9 @@ class MemberExpression final : public Expression {
|
|||
public:
|
||||
MemberExpression(SourceRange source_range, NonnullRefPtr<Expression> object, NonnullRefPtr<Expression> property, bool computed = false)
|
||||
: Expression(source_range)
|
||||
, m_computed(computed)
|
||||
, m_object(move(object))
|
||||
, m_property(move(property))
|
||||
, m_computed(computed)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1804,9 +1804,9 @@ public:
|
|||
private:
|
||||
virtual bool is_member_expression() const override { return true; }
|
||||
|
||||
bool m_computed { false };
|
||||
NonnullRefPtr<Expression> m_object;
|
||||
NonnullRefPtr<Expression> m_property;
|
||||
bool m_computed { false };
|
||||
};
|
||||
|
||||
class OptionalChain final : public Expression {
|
||||
|
|
Loading…
Reference in a new issue