feat: Phase 2.4 レガシーアーカイブ整理完了(151MB削減)
## 🎉 完了項目 - ✅ plugin_box_legacy.rs削除(7.7KB、参照ゼロ確認済み) - ✅ REMOVEDコメント整理(encode.rs簡潔化) - ✅ venv削除(143MB節約、.gitignoreは既存) - ✅ llvm_legacyスタブ化(8KB、compile_error!による安全化) ## 🏆 成果 - **リポジトリサイズ改善**: 151MB削減 - **コード整理**: レガシーコード安全にアーカイブ - **プラグインファースト**: StrictPluginFirst継続動作 ## ✅ 検証完了 - cargo build --release --features llvm (警告のみ、エラーなし) - LLVMハーネス実行: print出力正常 - プラグイン動作: StringBox等正常動作 codex先生の戦略に従った安全な段階的削除を実行 Co-Authored-By: codex <noreply@anthropic.com>
This commit is contained in:
36
docs/archive/backends/llvm-inkwell-legacy/mod.rs
Normal file
36
docs/archive/backends/llvm-inkwell-legacy/mod.rs
Normal file
@ -0,0 +1,36 @@
|
||||
/*!
|
||||
* LLVM Backend Module (legacy, inkwell) - Compile MIR to LLVM IR for AOT execution
|
||||
*
|
||||
* This module provides LLVM-based compilation of Nyash MIR to native code.
|
||||
* Phase 9.78 PoC implementation focused on minimal support.
|
||||
*/
|
||||
|
||||
pub mod box_types;
|
||||
pub mod compiler;
|
||||
pub mod context;
|
||||
|
||||
use crate::box_trait::NyashBox;
|
||||
use crate::mir::function::MirModule;
|
||||
|
||||
/// Compile MIR module to object file and execute
|
||||
pub fn compile_and_execute(
|
||||
mir_module: &MirModule,
|
||||
output_path: &str,
|
||||
) -> Result<Box<dyn NyashBox>, String> {
|
||||
let mut compiler = compiler::LLVMCompiler::new()?;
|
||||
compiler.compile_and_execute(mir_module, output_path)
|
||||
}
|
||||
|
||||
/// Compile MIR module to object file only
|
||||
pub fn compile_to_object(mir_module: &MirModule, output_path: &str) -> Result<(), String> {
|
||||
let compiler = compiler::LLVMCompiler::new()?;
|
||||
compiler.compile_module(mir_module, output_path)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn test_llvm_module_creation() {
|
||||
assert!(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user