mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:57:47 +00:00
LibJS: Shrink ObjectProperty AST nodes by rearranging members
By putting smaller members in the padding hole after the ASTNode base class, we shrink ObjectProperty by 8 bytes.
This commit is contained in:
parent
b894acd6b2
commit
dd1720f2cb
1 changed files with 5 additions and 5 deletions
|
@ -1713,7 +1713,7 @@ private:
|
||||||
|
|
||||||
class ObjectProperty final : public ASTNode {
|
class ObjectProperty final : public ASTNode {
|
||||||
public:
|
public:
|
||||||
enum class Type {
|
enum class Type : u8 {
|
||||||
KeyValue,
|
KeyValue,
|
||||||
Getter,
|
Getter,
|
||||||
Setter,
|
Setter,
|
||||||
|
@ -1723,10 +1723,10 @@ public:
|
||||||
|
|
||||||
ObjectProperty(SourceRange source_range, NonnullRefPtr<Expression> key, RefPtr<Expression> value, Type property_type, bool is_method)
|
ObjectProperty(SourceRange source_range, NonnullRefPtr<Expression> key, RefPtr<Expression> value, Type property_type, bool is_method)
|
||||||
: ASTNode(source_range)
|
: ASTNode(source_range)
|
||||||
, m_key(move(key))
|
|
||||||
, m_value(move(value))
|
|
||||||
, m_property_type(property_type)
|
, m_property_type(property_type)
|
||||||
, m_is_method(is_method)
|
, m_is_method(is_method)
|
||||||
|
, m_key(move(key))
|
||||||
|
, m_value(move(value))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1744,10 +1744,10 @@ public:
|
||||||
virtual Completion execute(Interpreter&) const override;
|
virtual Completion execute(Interpreter&) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NonnullRefPtr<Expression> m_key;
|
|
||||||
RefPtr<Expression> m_value;
|
|
||||||
Type m_property_type;
|
Type m_property_type;
|
||||||
bool m_is_method { false };
|
bool m_is_method { false };
|
||||||
|
NonnullRefPtr<Expression> m_key;
|
||||||
|
RefPtr<Expression> m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ObjectExpression final : public Expression {
|
class ObjectExpression final : public Expression {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue