refactor: split optimizer/verifier/parser modules (mainline); add runner trace/directives; add LLVM terminator/select scaffolds; extract AST Span; update CURRENT_TASK with remaining plan

This commit is contained in:
Selfhosting Dev
2025-09-17 05:56:33 +09:00
parent 154778fc57
commit 9dc5c9afb9
39 changed files with 1327 additions and 739 deletions

View File

@ -16,6 +16,8 @@ mod newbox;
mod resolver;
pub mod string_ops;
mod strings;
mod terminators; // scaffolding: re-exports flow terminators
mod select; // scaffolding: prepare for cond/short-circuit helpers
pub(super) use arith::lower_compare;
pub(super) use arith_ops::{lower_binop, lower_unary};
@ -25,6 +27,9 @@ pub(super) use call::lower_call;
pub(super) use consts::lower_const;
pub(super) use externcall::lower_externcall;
pub(super) use flow::{emit_branch, emit_jump, emit_return};
// Future: swap callers to use `terminators::*` instead of `flow::*` directly
pub(super) use terminators::{emit_branch as term_emit_branch, emit_jump as term_emit_jump, emit_return as term_emit_return};
pub(super) use select::normalize_branch_condition;
pub(super) use loopform::dev_check_dispatch_only_phi;
pub(super) use loopform::normalize_header_phis_for_latch;
pub(super) use loopform::{lower_while_loopform, LoopFormContext};