Expand description
Rewrites the syntax tree toward lowering.
resolve_settings folds if branches, demacroify expands macros,
resolve_offsets substitutes offsets, and fold folds constants.
validate checks earlier stages left nothing behind. resolve runs
the demacroify, offset, and fold stages in order.
Functionsยง
- demacroify
- Expands every macro invocation in
node. - demacroify_
recording - Expands macros like
demacroify, also returning label renames. - fold
- Folds constant sub-expressions in
nodewith wrapping arithmetic. - offset_
keys - Collects the offset, size, and const keys
nodereferences. - resolve
- Runs
demacroify, thenresolve_offsets, then constant-folds the result. - resolve_
offsets - Substitutes each offset node in
nodewith the integermapholds. - resolve_
settings - Substitutes each
Node::Settinginnodepersettings. - validate
- Checks that expansion and offset stages already ran over
node.