You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: fill ExpressionNode padding with _childIdx/_extraIdx explicit short fields
Replaces the 4-byte alignment padding between NextIdx and _data with two
explicit short fields (_childIdx and _extraIdx). Pack=1 is not viable here
because the CLR requires managed reference fields at pointer-aligned addresses
in arrays. Instead the padding is repurposed as dedicated child/extra index
fields:
Before: Type(8)+Obj(8)+_typeFlags(2)+NextIdx(2)+[4-byte pad]+_data(8) = 32 bytes
After: Type(8)+Obj(8)+_typeFlags(2)+NextIdx(2)+_childIdx(2)+_extraIdx(2)+_data(8) = 32 bytes
Benefits:
- Zero wasted bytes — same 32-byte size but all bytes are meaningful
- _data is now exclusively for inline 8-byte constant storage (cleaner semantics)
- ChildIdx/ExtraIdx properties read directly from short fields — no bit shifts
- StructurallyEqual updated to compare _childIdx and _extraIdx individually
Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/ec99b322-eedc-4427-8bc8-fd68e2c14865
Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
0 commit comments