🎉 Phase 11.8/12.7: MIR Core-13 完全実装 + 糖衣構文ドキュメント更新
主要な変更:
- MIR Core-13命令セット確定(Load/Store削除の革命的設計)
- Const, BinOp, Compare(値・計算)
- Jump, Branch, Return, Phi(制御)
- Call, BoxCall, ExternCall(呼び出し)
- TypeOp, Safepoint, Barrier(メタ)
- Phase 12.7糖衣構文ドキュメント整理(超圧縮重視、可逆変換保証)
- MIRビルダーのモジュール分割完了
- vtableテストスイート拡充
- AI協調開発ツール追加(並列リファクタリング支援)
詳細:
- src/mir/instruction_introspection.rs: core13_instruction_names()追加
- MIRビルダー分割: decls.rs, exprs_*.rs, fields.rs
- plugin_loader_v2: errors.rs, host_bridge.rs分離
- 論文用データ: mir13-final.md作成
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 11:34:15 +09:00
|
|
|
// Host bridge helpers for TypeBox invoke (minimal, v2)
|
|
|
|
|
|
2025-09-17 07:43:07 +09:00
|
|
|
pub type InvokeFn =
|
|
|
|
|
unsafe extern "C" fn(u32, u32, u32, *const u8, usize, *mut u8, *mut usize) -> i32;
|
🎉 Phase 11.8/12.7: MIR Core-13 完全実装 + 糖衣構文ドキュメント更新
主要な変更:
- MIR Core-13命令セット確定(Load/Store削除の革命的設計)
- Const, BinOp, Compare(値・計算)
- Jump, Branch, Return, Phi(制御)
- Call, BoxCall, ExternCall(呼び出し)
- TypeOp, Safepoint, Barrier(メタ)
- Phase 12.7糖衣構文ドキュメント整理(超圧縮重視、可逆変換保証)
- MIRビルダーのモジュール分割完了
- vtableテストスイート拡充
- AI協調開発ツール追加(並列リファクタリング支援)
詳細:
- src/mir/instruction_introspection.rs: core13_instruction_names()追加
- MIRビルダー分割: decls.rs, exprs_*.rs, fields.rs
- plugin_loader_v2: errors.rs, host_bridge.rs分離
- 論文用データ: mir13-final.md作成
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 11:34:15 +09:00
|
|
|
|
|
|
|
|
// Call invoke_id with a temporary output buffer; returns (code, bytes_written, buffer)
|
|
|
|
|
pub fn invoke_alloc(
|
|
|
|
|
invoke: InvokeFn,
|
|
|
|
|
type_id: u32,
|
|
|
|
|
method_id: u32,
|
|
|
|
|
instance_id: u32,
|
|
|
|
|
tlv_args: &[u8],
|
|
|
|
|
) -> (i32, usize, Vec<u8>) {
|
|
|
|
|
let mut out = vec![0u8; 1024];
|
|
|
|
|
let mut out_len: usize = out.len();
|
|
|
|
|
let code = unsafe {
|
|
|
|
|
invoke(
|
|
|
|
|
type_id,
|
|
|
|
|
method_id,
|
|
|
|
|
instance_id,
|
|
|
|
|
tlv_args.as_ptr(),
|
|
|
|
|
tlv_args.len(),
|
|
|
|
|
out.as_mut_ptr(),
|
|
|
|
|
&mut out_len,
|
|
|
|
|
)
|
|
|
|
|
};
|
|
|
|
|
(code, out_len, out)
|
|
|
|
|
}
|