refactor(plan): Phase 286C-4 Step 1 - plan_helpers module
Create helper functions to support plan_rewrites() extraction: - build_local_block_map(): Build block ID mapping for a function - sync_spans(): Synchronize instruction spans after rewriting These pure functions will be used by both the current monolithic merge_and_rewrite() and the new plan_rewrites() function. Progress: Step 1/4 (helpers) complete 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -304,7 +304,7 @@ This section documents current backend reality so we can detect drift as bugs.
|
||||
|
||||
| Feature | VM | LLVM | WASM |
|
||||
|---------|-----|------|------|
|
||||
| WeakRef (`weak <expr>`, `weak_to_strong()`) | ✅ | ❌ unsupported (285LLVM-1) | ❌ unsupported |
|
||||
| WeakRef (`weak <expr>`, `weak_to_strong()`) | ✅ | ✅ LLVM harness (Phase 285LLVM-1.4) | ❌ unsupported |
|
||||
| Leak Report (`NYASH_LEAK_LOG`) | ✅ | ⚠️ Parent process roots only (285LLVM-0) | ❌ |
|
||||
|
||||
**LLVM Leak Report の制限** (Phase 285LLVM-0):
|
||||
@ -316,7 +316,7 @@ This section documents current backend reality so we can detect drift as bugs.
|
||||
### Notes
|
||||
|
||||
- **Block-scoped locals** are the language model (`local` drops at `}`), but the *observable* effects depend on where the last strong reference is held.
|
||||
- **WeakRef** (Phase 285A0): VM backend fully supports `weak <expr>` and `weak_to_strong()`. LLVM harness support is planned for Phase 285LLVM-1.
|
||||
- **WeakRef** (Phase 285A0+): VM backend fully supports `weak <expr>` and `weak_to_strong()`. LLVM harness also supports this surface as of Phase 285LLVM-1.4.
|
||||
- **WASM backend** currently treats MIR `WeakNew/WeakLoad` as plain copies (weak behaves like strong). This does not satisfy the SSOT weak semantics yet (see also: `docs/guides/wasm-guide/planning/unsupported_features.md`).
|
||||
- **Leak Report** (Phase 285): `NYASH_LEAK_LOG={1|2}` prints exit-time diagnostics showing global roots still held (modules, host_handles, plugin_boxes). See `docs/reference/environment-variables.md`.
|
||||
- Conformance gaps (any backend differences from this document) must be treated as bugs and tracked explicitly; do not "paper over" differences by changing this SSOT without a decision.
|
||||
|
||||
Reference in New Issue
Block a user