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:
23
src/backend/llvm_legacy/compiler/mock.rs
Normal file
23
src/backend/llvm_legacy/compiler/mock.rs
Normal file
@ -0,0 +1,23 @@
|
||||
use crate::mir::function::MirModule;
|
||||
use crate::box_trait::{NyashBox, IntegerBox};
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub struct LLVMCompiler {
|
||||
values: HashMap<crate::mir::ValueId, Box<dyn NyashBox>>,
|
||||
}
|
||||
|
||||
impl LLVMCompiler {
|
||||
pub fn new() -> Result<Self, String> {
|
||||
Ok(Self { values: HashMap::new() })
|
||||
}
|
||||
|
||||
pub fn compile_module(&self, _mir: &MirModule, _out: &str) -> Result<(), String> {
|
||||
// Mock: pretend emitted
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn compile_and_execute(&mut self, _mir: &MirModule, _out: &str) -> Result<Box<dyn NyashBox>, String> {
|
||||
Ok(Box::new(IntegerBox::new(0)))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user