docs(llvm/vm): 静的Box(self)規約を明文化 + Bridgeトグル追記; Gate‑C/Core 現状反映; CURRENT_TASK 更新。\n\n- 新規: docs/development/architecture/llvm/static_box_singleton.md\n- 追記: lang/src/vm/README.md に self 先頭規約/互換トグルを明記\n- 追記: CURRENT_TASK に本更新を記録\n- phase-20.33/CHECKLIST にドキュメント完了チェックを追加\n- bak フォルダはリポジトリ直下に存在せず(削除対象なし)\n\n併せて未コミット差分をスナップショット(Rust 層の前作業含む)

This commit is contained in:
nyash-codex
2025-11-01 16:31:48 +09:00
parent b9340a1b19
commit 01b4417c5d
7 changed files with 156 additions and 9 deletions

View File

@ -18,6 +18,14 @@ Policy
- Core provides engineagnostic execution primitives and should not import
enginespecific modules. During migration, temporary adapters may exist.
Static Box MethodsSingleton / self
- 規約: 静的Boxのメソッドは「selfSingletonを先頭引数」に持つ。
- 例: `LLVMPhiInstructionBox.lower_phi(self, dst, incoming_list)`
- 互換: `HAKO_BRIDGE_INJECT_SINGLETON=1`alias: `NYASH_BRIDGE_INJECT_SINGLETON`)で旧スタイル
`PhiInst.lower_phi(dst, incoming)` に Singleton を注入して実行。
- FailFast: 期待 arity と不一致は静かなフォールバックをせず、安定メッセージで失敗する。
詳細: `docs/development/architecture/llvm/static_box_singleton.md`
BridgeB (Ny/Core 直行)
- Wrapper 経路では `include "lang/src/vm/core/dispatcher.hako"` で Core Dispatcher を取り込み、
`NyVmDispatcher.run(json)` を直接呼び出す。`using` は名前解決のみで実体は登録されないため、