refactor: Gemini/ChatGPT collaborative refactoring + build fixes

Major changes:
- Split runner module: 1358→580 lines (via Gemini)
- Create new modules: dispatch.rs, selfhost.rs, pipeline.rs, pipe_io.rs
- Fix build errors from incomplete method migrations
- Add warning to CLAUDE.md about JIT/Cranelift not working
- Create interpreter.rs mode module
- Refactor loop builder into separate module

Build status:
-  Executable builds successfully
-  Basic execution works (tested with print)
- ⚠️ 106 warnings remain (to be cleaned up next)
- ⚠️ execute_mir_mode still in mod.rs (needs further migration)

Note: ChatGPT correctly fixed runner.execute_mir_mode() calls
that I incorrectly changed to super::modes::mir::

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Selfhosting Dev
2025-09-16 03:54:44 +09:00
parent f9bd13f4e4
commit 40db299bab
22 changed files with 425 additions and 613 deletions

View File

@ -1,6 +1,6 @@
// Expression lowering split from builder.rs to keep files lean
use super::{MirInstruction, ConstValue, BasicBlockId, ValueId};
use crate::ast::{ASTNode, LiteralValue};
use super::{MirInstruction, ConstValue, ValueId};
use crate::ast::ASTNode;
impl super::MirBuilder {
// Main expression dispatcher