Skip to content

refactor: group compiler data model members by responsibility - #212

Merged
cruskell merged 1 commit into
mainfrom
codex/group-data-model-members
Oct 18, 2026
Merged

cruskell merged 1 commit into
mainfrom
codex/group-data-model-members

Conversation

@cruskell

Copy link
Copy Markdown
Owner

Compiler data declarations mixed newer features into unrelated field/variant groups. Organize 21 enum/struct declarations by responsibility: AST values/operators/control flow/builtins; scalar/derived/wrapper types; parser/preprocessor state; function/object metadata; backend state and driver options. Group instruction mnemonics by operation and registers by register family and subregisters.

Preserve every member name, type, visibility and default attribute. Constructor expressions, match arms, ABI register arrays and all code outside the declarations are unchanged. Rust's implicit enum discriminants and derived Debug field ordering follow the new declaration order; these types have no repr/serialization/numeric-tag use in the repository. C source record layouts and enum values are still computed by the unchanged parser/type operations.

Validation on Linux x86_64 with Rust 1.86: make lint and cargo test --all-features passed (51 unit, 2,101 integration and one doc test; two optional LLVM backend tests ignored locally). Compared all declaration member/type/attribute sets and checked all code outside them is unchanged. Size/alignment measurements match for Node, NodeType, Type, StructDefinition, StructMember, Token, Func, GlobalVariable and AstBuilderImpl. git diff --check passed. macOS/AArch64 execution was not run locally.

@cruskell
cruskell merged commit 051ea2b into main Oct 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant