Phase 12: 統一TypeBox ABI実装開始 - ChatGPT5による極小コアABI基盤構築

- TypeBox ABI雛形: メソッドスロット管理システム追加
- Type Registry: Array/Map/StringBoxの基本メソッド定義
- Host API: C ABI逆呼び出しシステム実装
- Phase 12ドキュメント整理: 設計文書統合・アーカイブ化
- MIR Builder: クリーンアップと分離実装完了

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm
2025-09-03 05:04:56 +09:00
parent e2e25f6615
commit 53d88157aa
84 changed files with 4739 additions and 2750 deletions

View File

@ -90,7 +90,7 @@ pub(super) fn execute_instruction(vm: &mut VM, instruction: &MirInstruction, deb
// Barriers
MirInstruction::BarrierRead { .. } => {
if std::env::var("NYASH_GC_TRACE").ok().as_deref() == Some("1") {
if crate::config::env::gc_trace() {
let (func, bb, pc) = vm.gc_site_info();
eprintln!("[GC] barrier: Read @{} bb={} pc={}", func, bb, pc);
}
@ -98,7 +98,7 @@ pub(super) fn execute_instruction(vm: &mut VM, instruction: &MirInstruction, deb
Ok(ControlFlow::Continue)
}
MirInstruction::BarrierWrite { .. } => {
if std::env::var("NYASH_GC_TRACE").ok().as_deref() == Some("1") {
if crate::config::env::gc_trace() {
let (func, bb, pc) = vm.gc_site_info();
eprintln!("[GC] barrier: Write @{} bb={} pc={}", func, bb, pc);
}
@ -107,7 +107,7 @@ pub(super) fn execute_instruction(vm: &mut VM, instruction: &MirInstruction, deb
}
MirInstruction::Barrier { op, .. } => {
let k = match op { crate::mir::BarrierOp::Read => crate::runtime::gc::BarrierKind::Read, crate::mir::BarrierOp::Write => crate::runtime::gc::BarrierKind::Write };
if std::env::var("NYASH_GC_TRACE").ok().as_deref() == Some("1") {
if crate::config::env::gc_trace() {
let (func, bb, pc) = vm.gc_site_info();
eprintln!("[GC] barrier: {:?} @{} bb={} pc={}", k, func, bb, pc);
}
@ -147,7 +147,7 @@ pub(super) fn execute_instruction(vm: &mut VM, instruction: &MirInstruction, deb
MirInstruction::Debug { .. } => Ok(ControlFlow::Continue),
MirInstruction::Nop => Ok(ControlFlow::Continue),
MirInstruction::Safepoint => {
if std::env::var("NYASH_GC_TRACE").ok().as_deref() == Some("1") {
if crate::config::env::gc_trace() {
let (func, bb, pc) = vm.gc_site_info();
eprintln!("[GC] safepoint @{} bb={} pc={}", func, bb, pc);
}