feat(phase-9.78): Improve MIR generation for built-in Box types and enhance LLVM mock
- Fix MIR builder to handle built-in Box types (IntegerBox, StringBox, etc.) specially - Generate MIR with actual constant values instead of ref_new instructions - Enhance LLVM mock compiler with MIR interpreter foundation - Add value storage HashMap for future MIR instruction interpretation This enables proper MIR generation where 'new IntegerBox(42)' becomes '%0 = const 42' instead of '%0 = ref_new "IntegerBox"'. This is essential for future LLVM code generation. Example MIR improvement: Before: %1 = const "IntegerBox" %0 = ref_new %1 After: %0 = const 42 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -16,7 +16,7 @@ pub fn compile_and_execute(
|
||||
mir_module: &MirModule,
|
||||
output_path: &str,
|
||||
) -> Result<Box<dyn NyashBox>, String> {
|
||||
let compiler = compiler::LLVMCompiler::new()?;
|
||||
let mut compiler = compiler::LLVMCompiler::new()?;
|
||||
compiler.compile_and_execute(mir_module, output_path)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user