Commit 82a75c7
refactor(lowering): split rust_lower/lowerer.rs impl clusters into sibling files
Pure code-movement (no logic/behavior changes; generated-Rust bytes unchanged).
lowerer.rs 6,240 -> 3,412. Moved whole methods (emit order preserved) of
impl RustLowerer into sibling impl blocks:
- lower_decls.rs (609): protocol/capability/type/fn/const declaration lowering.
- lower_async.rs (937): task-group/select/async-chain/await/loop-boundary lowering.
- lower_match.rs (578): pattern + JSON/map/list-literal lowering.
- lower_types.rs (481): type-ref lowering + expr/arg type inference.
- lower_managed.rs (353): managed-handle/effect/ownership/weak-field lowering.
Kept in the spine: struct def, block/stmt + expression core, the call cluster,
and the source-map emission cluster (highest-risk, later phase). Sibling files
are children of rust_lower (not lowerer), so cross-module access required
widening RustLowerer fields + the relocated/cross-called methods to pub(super)
(visibility-only). Verified: combined content multiset equals the original
modulo import redistribution; lower_expr (spine) and lower_function (moved)
byte-identical.
Verified: cargo test -p rsscript --no-run (default + native-jit) clean; clippy
-p rsscript --tests -D warnings clean; static checker_lowering 229/0.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent f2b0f05 commit 82a75c7
7 files changed
Lines changed: 5270 additions & 5135 deletions
File tree
- crates/rsscript/src/rust_lower
Large diffs are not rendered by default.
0 commit comments