feat(llvm-py): Major breakthrough in Python LLVM backend! 🎉

 Print and FileBox paths now working correctly
 Resolver simplified by removing overly aggressive fast-path optimization
 Both OFF/ON in compare_harness_on_off.sh now use Python version
 String handle propagation issues resolved

Key changes:
- Removed instruction reordering in llvm_builder.py (respecting MIR order)
- Resolver now more conservative but reliable
- compare_harness_on_off.sh updated to use Python backend for both paths

This marks a major milestone towards Phase 15 self-hosting with Python/llvmlite!

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Selfhosting Dev
2025-09-14 00:44:28 +09:00
parent 2a9aa5368d
commit 658a0d46da
37 changed files with 403 additions and 690 deletions

View File

@ -0,0 +1,34 @@
use crate::box_trait::NyashBox;
use crate::mir::ValueId;
use std::collections::HashMap;
pub struct LLVMCompiler {
values: HashMap<ValueId, Box<dyn NyashBox>>,
}
#[cfg(not(feature = "llvm-inkwell-legacy"))]
mod mock;
#[cfg(not(feature = "llvm-inkwell-legacy"))]
pub use mock::*;
#[cfg(feature = "llvm-inkwell-legacy")]
mod aot;
#[cfg(feature = "llvm-inkwell-legacy")]
mod codegen;
#[cfg(feature = "llvm-inkwell-legacy")]
mod helpers;
#[cfg(feature = "llvm-inkwell-legacy")]
mod interpreter;
#[cfg(feature = "llvm-inkwell-legacy")]
pub use aot::*;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_llvm_module_creation() {
assert!(true);
}
}