mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:08:11 +00:00
LibJS: Rearrange ASTNode members so there's a padding hole at the end
ASTNode inherits from RefCounted, which has a single 32-bit member. This means that there's a 32-bit padding hole after RefCounted, where we are free to put something (or it will go to waste!) This patch moves ASTNode::m_start_offset into that padding hole, and we now have a 32-bit padding hole at the end of ASTNode instead. This will allow ASTNode subclasses to put things in the ASTNode hole by moving them to the head of the member list.
This commit is contained in:
parent
e647ad2ce3
commit
e70f944e11
2 changed files with 5 additions and 3 deletions
|
@ -62,8 +62,8 @@ private:
|
|||
};
|
||||
|
||||
ASTNode::ASTNode(SourceRange source_range)
|
||||
: m_source_code(source_range.code)
|
||||
, m_start_offset(source_range.start.offset)
|
||||
: m_start_offset(source_range.start.offset)
|
||||
, m_source_code(source_range.code)
|
||||
, m_end_offset(source_range.end.offset)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue