📚 Phase 15計画を詳細化・更新: Python/llvmlite正式採用とプラグイン全方向ビルド戦略

 主な更新内容:
- Python/llvmlite実装の正式採用を明記(開発速度10倍、~2400行)
- プラグイン全方向ビルド戦略(.so/.o/.a同時生成)で単一EXE生成可能に
- 各実装の予想コード量を具体化(パーサー800行、MIR Builder 2500行、VM 5000行)
- 循環依存問題の解決を明記(nyrtがC ABI経由で提供)
- 現実的なスケジュール調整(2025年9月~2026年3月)

🎉 最新進捗:
- dep_tree_min_string.nyashオブジェクト生成成功(10.4KB)
- LLVM verifier green - dominance違反解決
- Resolver patternでSSA安全性確保

🚀 次のマイルストーン:
- Python/llvmliteでEXE生成パイプライン完成
- nyash-llvm-compiler分離設計
- NyashパーサーMVP実装開始

Everything is Boxの究極形が、ついに実現へ!

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Selfhosting Dev
2025-09-13 15:37:58 +09:00
parent 8e4f6d774d
commit 1d6fab4eda
44 changed files with 1653 additions and 598 deletions

View File

@ -91,7 +91,20 @@ pub(in super::super) fn lower_boxcall<'ctx, 'b>(
}
// getField/setField
if fields::try_handle_field_method(codegen, cursor, cur_bid, vmap, dst, method, args, recv_h, resolver, bb_map, preds, block_end_values)? {
if fields::try_handle_field_method(
codegen,
cursor,
cur_bid,
vmap,
dst,
method,
args,
recv_h,
resolver,
bb_map,
preds,
block_end_values,
)? {
return Ok(());
}
@ -294,6 +307,50 @@ pub(in super::super) fn lower_boxcall_boxed<'ctx, 'b>(
)
}
// Convenience wrapper: construct LowerFnCtx/BlockCtx inside to keep caller borrow scopes short.
pub(in super::super) fn lower_boxcall_via_ctx<'ctx, 'b>(
codegen: &'ctx CodegenContext<'ctx>,
cursor: &'b mut BuilderCursor<'ctx, 'b>,
resolver: &'b mut super::Resolver<'ctx>,
cur_bid: BasicBlockId,
func: &'b MirFunction,
vmap: &'b mut HashMap<ValueId, inkwell::values::BasicValueEnum<'ctx>>,
dst: &Option<ValueId>,
box_val: &ValueId,
method: &str,
method_id: &Option<u16>,
args: &[ValueId],
box_type_ids: &'b HashMap<String, i64>,
entry_builder: &inkwell::builder::Builder<'ctx>,
bb_map: &'b std::collections::HashMap<crate::mir::BasicBlockId, inkwell::basic_block::BasicBlock<'ctx>>,
preds: &'b std::collections::HashMap<crate::mir::BasicBlockId, Vec<crate::mir::BasicBlockId>>,
block_end_values: &'b std::collections::HashMap<crate::mir::BasicBlockId, std::collections::HashMap<ValueId, inkwell::values::BasicValueEnum<'ctx>>>,
) -> Result<(), String> {
let llbb = *bb_map.get(&cur_bid).ok_or("missing cur bb")?;
let blkctx = BlockCtx::new(cur_bid, llbb);
let mut fnctx = LowerFnCtx::new(
codegen,
func,
cursor,
resolver,
vmap,
bb_map,
preds,
block_end_values,
)
.with_box_type_ids(box_type_ids);
lower_boxcall_boxed(
&mut fnctx,
&blkctx,
dst,
box_val,
method,
method_id,
args,
entry_builder,
)
}
fn coerce_to_type<'ctx>(
codegen: &CodegenContext<'ctx>,
val: inkwell::values::BasicValueEnum<'ctx>,