mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +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
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…
Add table
Add a link
Reference in a new issue