refactor: Split codegen.rs (6,953 lines, 102 functions) into focused modules #206
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
rust
technical-debt
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/patch-seq#206
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
crates/compiler/src/codegen.rsis a 6,953-line monolith containing 102 functions. This makes the code difficult to navigate, test, and maintain.Current State
The file mixes multiple concerns:
Proposed Solution
Split into focused modules under
crates/compiler/src/codegen/:Specific Functions to Move
To
ssa.rs:fresh_temp()fresh_label()To
inline.rs:codegen_inline_binary_op(lines 4079-4190)codegen_inline_unary_opcodegen_inline_*functionsTo
statements.rs:codegen_match_statement(lines 5269-5386)codegen_if_statementcodegen_while_statementTo
ir.rs:emit_runtime_declarations(lines 1298-1543)writeln!generation logicAcceptance Criteria
Labels
refactor, technical-debt, high-priority
https://github.com/navicore/patch-seq/pull/226