981ddd890c
Phase 22.1 WIP: SSOT resolver + TLV infrastructure + Hako MIR builder setup
...
Setup infrastructure for Phase 22.1 (TLV C shim & Resolver SSOT):
Core changes:
- Add nyash_tlv, nyash_c_core, nyash_kernel_min_c crates (opt-in)
- Implement SSOT resolver bridge (src/using/ssot_bridge.rs)
- Add HAKO_USING_SSOT=1 / HAKO_USING_SSOT_HAKO=1 env support
- Add HAKO_TLV_SHIM=1 infrastructure (requires --features tlv-shim)
MIR builder improvements:
- Fix using/alias consistency in Hako MIR builder
- Add hako.mir.builder.internal.{prog_scan,pattern_util} to nyash.toml
- Normalize LLVM extern calls: nyash.console.* → nyash_console_*
Smoke tests:
- Add phase2211 tests (using_ssot_hako_parity_canary_vm.sh)
- Add phase2220, phase2230, phase2231 test structure
- Add phase2100 S3 backend selector tests
- Improve test_runner.sh with quiet/timeout controls
Documentation:
- Add docs/ENV_VARS.md (Phase 22.1 env vars reference)
- Add docs/development/runtime/C_CORE_ABI.md
- Update de-rust-roadmap.md with Phase 22.x details
Tools:
- Add tools/hakorune_emit_mir.sh (Hako-first MIR emission wrapper)
- Add tools/tlv_roundtrip_smoke.sh placeholder
- Improve ny_mir_builder.sh with better backend selection
Known issues (to be fixed):
- Parser infinite loop in static method parameter parsing
- Stage-B output contamination with "RC: 0" (needs NYASH_JSON_ONLY=1)
- phase2211/using_ssot_hako_parity_canary_vm.sh fork bomb (needs recursion guard)
Next steps: Fix parser infinite loop + Stage-B quiet mode for green tests
2025-11-09 15:11:18 +09:00
5d2cd5bad0
de-rust phase-0: archive Rust LLVM backend to archive/rust-llvm-backend (RESTORE documented); defaults unaffected
2025-11-09 01:00:43 +09:00
024a4fecb7
phase-21.9: add De‑Rust roadmap + phase plan; stage archive script for Rust LLVM backend (no move yet)
2025-11-09 00:57:10 +09:00
fa3091061d
trace: add execution route visibility + debug passthrough; phase2170 canaries; docs
...
- Add HAKO_TRACE_EXECUTION to trace executor route
- Rust hv1_inline: stderr [trace] executor: hv1_inline (rust)
- Hakovm dispatcher: stdout [trace] executor: hakovm (hako)
- test_runner: trace lines for hv1_inline/core/hakovm routes
- Add HAKO_VERIFY_SHOW_LOGS and HAKO_DEBUG=1 (enables both)
- verify_v1_inline_file() log passthrough with numeric rc extraction
- test_runner exports via HAKO_DEBUG
- Canary expansion under phase2170 (state spec)
- Array: push×5/10 → size, len/length alias, per‑recv/global, flow across blocks
- Map: set dup-key non-increment, value_state get/has
- run_all.sh: unify, remove SKIPs; all PASS
- Docs
- ENV_VARS.md: add Debug/Tracing toggles and examples
- PLAN.md/CURRENT_TASK.md: mark 21.7 green, add Quickstart lines
All changes gated by env vars; default behavior unchanged.
2025-11-08 23:45:29 +09:00
bf185ec2b2
Update docs/private submodule: Phase 21.5 plan
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-08 17:05:57 +09:00
50ac8af2b8
Phase 21.4 Complete: FileBox SSOT + Analyzer Stabilization (7 Tasks)
...
✅ Task 1: Fallback Guarantee (create_box failure → ring1/core-ro auto fallback)
- Three-tier fallback system: plugin → builtin → core-ro
- Mode control: auto/plugin-only/core-ro
- New: src/box_factory/builtin_impls/file_box.rs
- New: tools/test_filebox_fallback_smoke.sh
✅ Task 2: Provider Registration SSOT (static/dynamic/core-ro unified)
- ProviderFactory trait with priority-based selection
- Global registry PROVIDER_FACTORIES implementation
- Priority: dynamic(100) > builtin(10) > core-ro(0)
- New: src/boxes/file/builtin_factory.rs
- New: tools/smoke_provider_modes.sh
✅ Task 3: FileBox Publication Unification
- Verified: basic/file_box.rs already minimized (11 lines)
- Perfect re-export pattern maintained
✅ Task 4: ENV Unification (FILEBOX_MODE/DISABLE_PLUGINS priority)
- Removed auto-setting of NYASH_USE_PLUGIN_BUILTINS
- Removed auto-setting of NYASH_PLUGIN_OVERRIDE_TYPES
- Added deprecation warnings with migration guide
- ENV hierarchy: DISABLE_PLUGINS > BOX_FACTORY_POLICY > FILEBOX_MODE
✅ Task 5: Error Log Visibility (Analyzer rule execution errors to stderr)
- Added [rule/exec] logging before IR-based rule execution
- Format: [rule/exec] HC012 (dead_static_box) <filepath>
- VM errors now traceable via stderr output
✅ Task 6: Unnecessary Using Removal (14 rules Str alias cleanup)
- Removed unused `using ... as Str` from 14 rule files
- All rules use local _itoa() helper instead
- 14 lines of dead code eliminated
✅ Task 7: HC017 Skip & TODO Documentation (UTF-8 support required)
- Enhanced run_tests.sh with clear skip message
- Added "Known Limitations" section to README.md
- Technical requirements documented (3 implementation options)
- Re-enable timeline: Phase 22 (Unicode Support Phase)
📊 Test Results:
- Analyzer: 10 tests PASS, 1 skipped (HC017)
- FileBox fallback: All 3 modes PASS
- Provider modes: All 4 modes PASS
- Build: Success (0 errors, 0 warnings)
🎯 Key Achievements:
- 28 files modified/created
- Three-Tier Fallback System (stability)
- SSOT Provider Registry (extensibility)
- ENV unification (operational clarity)
- Error visibility (debugging efficiency)
- Code cleanup (maintainability)
- Comprehensive documentation (Phase 22 ready)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-08 17:04:21 +09:00
772149c86d
Analyzer安定化完了: NYASH_DISABLE_PLUGINS=1復元 + plugin無効化根治
...
## 修正内容
1. **hako_check.sh/run_tests.sh**: NYASH_DISABLE_PLUGINS=1 + NYASH_BOX_FACTORY_POLICY=builtin_first追加
2. **src/box_factory/plugin.rs**: NYASH_DISABLE_PLUGINS=1チェック追加
3. **src/box_factory/mod.rs**: plugin shortcut pathでNYASH_DISABLE_PLUGINS尊重
4. **tools/hako_check/render/graphviz.hako**: smart quotes修正(parse error解消)
## 根本原因
- NYASH_USE_PLUGIN_BUILTINS=1が自動設定され、ArrayBox/MapBoxがplugin経由で生成を試行
- bid/registry.rsで"Plugin loading temporarily disabled"の状態でも試行されエラー
- mod.rs:272のshortcut pathがNYASH_DISABLE_PLUGINSを無視していた
## テスト結果
- 10/11 PASS(HC011,13-18,21-22,31)
- HC012: 既存issue(JSON安定化未完)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-08 15:49:25 +09:00
cef820596f
FileBox SSOT設計移行完了: Provider Pattern実装
...
## 🎯 目的
FileBoxをSSOT(Single Source of Truth)設計に移行し、
static/dynamic/builtin providerを統一的に扱える基盤を構築。
## ✅ 実装完了(7タスク)
### 1. Provider Lock Global
**File**: `src/runtime/provider_lock.rs`
- `FILEBOX_PROVIDER: OnceLock<Arc<dyn FileIo>>` 追加
- `set_filebox_provider()` / `get_filebox_provider()` 実装
### 2. VM初期化時のProvider選択
**File**: `src/runner/modes/vm.rs`
- `execute_vm_mode()` 冒頭でprovider選択・登録
- ENV(`NYASH_FILEBOX_MODE`, `NYASH_DISABLE_PLUGINS`)対応
### 3. CoreRoFileIo完全実装
**File**: `src/boxes/file/core_ro.rs` (NEW)
- Read-onlyファイルI/O実装
- Thread-safe: `RwLock<Option<File>>`
- Newline正規化(CRLF→LF)
### 4. FileBox委譲化
**File**: `src/boxes/file/mod.rs`
- 直接`std::fs::File`使用 → `Arc<dyn FileIo>` provider委譲
- 全メソッドをprovider経由に変更
- Fail-Fast: write/delete等の非対応操作は明確エラー
### 5. basic/file_box.rs Deprecate
**File**: `src/boxes/file/basic/file_box.rs`
- 120行 → 12行に削減
- `#[deprecated]` マーク + 再エクスポート
- 後方互換性維持
### 6. Feature Flag追加
**File**: `Cargo.toml`
- `builtin-filebox = []` feature追加
### 7. Provider抽象・選択ロジック
**Files**:
- `src/boxes/file/provider.rs` (NEW) - FileIo trait定義
- `src/boxes/file/box_shim.rs` (NEW) - 薄いラッパー
- `src/runner/modes/common_util/provider_registry.rs` (NEW) - 選択ロジック
## 📊 アーキテクチャ進化
**Before**:
```
FileBox (mod.rs) ──直接使用──> std::fs::File
FileBox (basic/) ──直接使用──> std::fs
```
**After**:
```
FileBox ──委譲──> Arc<dyn FileIo> ──実装──> CoreRoFileIo
├──> PluginFileIo (future)
└──> BuiltinFileIo (future)
```
## 🔧 技術的成果
1. **Thread Safety**: `RwLock<Option<File>>` で並行アクセス安全
2. **Fail-Fast**: 非対応操作は明確エラー(silent failure無し)
3. **後方互換性**: deprecated re-exportで既存コード維持
4. **環境制御**: `NYASH_FILEBOX_MODE` でランタイム切替
## 📝 環境変数
- `NYASH_FILEBOX_MODE=auto|core-ro|plugin-only`
- `auto`: プラグインあれば使用、なければCoreRoにフォールバック
- `core-ro`: 強制的にCoreRo(read-only)
- `plugin-only`: プラグイン必須(なければFail-Fast)
- `NYASH_DISABLE_PLUGINS=1`: 強制的にcore-roモード
## 🎯 次のステップ(Future)
- [ ] Dynamic統合(plugin_loaderとの連携)
- [ ] BuiltinFileIo実装(feature builtin-filebox)
- [ ] Write/Delete等の操作対応(provider拡張)
## 📚 ドキュメント
- 詳細仕様: `docs/development/runtime/FILEBOX_PROVIDER.md`
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-08 15:13:22 +09:00
647e15d12e
Update docs/private submodule: Phase 21.4 plan
...
Phase 21.4詳細実装計画追加
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-07 21:04:22 +09:00
b8fbbafc0c
Update docs/private submodule: Phase 21.2-21.5 planning
...
Phase 21.2-21.5計画ドキュメント追加
- Phase 21.2: VM Adapter正規実装(完了)
- Phase 21.3-21.5: Checker/Parser/Integration計画
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-07 19:33:35 +09:00
0455307418
refactor(phase-a): remove Cranelift/JIT backend legacy code (~373 lines)
...
Phase A cleanup - Safe deletions with zero risk:
## Deleted Files (6 files, 373 lines total)
1. Cranelift/JIT Backend (321 lines):
- src/runner/modes/cranelift.rs (45 lines)
- src/runner/modes/aot.rs (55 lines)
- src/runner/jit_direct.rs (152 lines)
- src/tests/core13_smoke_jit.rs (42 lines)
- src/tests/core13_smoke_jit_map.rs (27 lines)
2. Legacy MIR Builder (52 lines):
- src/mir/builder/exprs_legacy.rs
- Functionality inlined into exprs.rs (control flow constructs)
## Module Reference Cleanup
- src/backend/mod.rs: Removed cranelift feature gate exports
- src/runner/mod.rs: Removed jit_direct module reference
- src/runner/modes/mod.rs: Removed aot module reference
- src/mir/builder.rs: Removed exprs_legacy module
## Impact Analysis
- Build: Success (cargo build --release)
- Tests: All passing
- Risk Level: None (feature already archived, code unused)
- Related: Phase 15 JIT archival (archive/jit-cranelift/)
## BID Copilot Status
- Already removed in previous cleanup
- Not part of this commit
Total Reduction: 373 lines (~0.4% of codebase)
Next: Phase B - Dead code investigation
Related: #phase-21.0-cleanup
Part of: Legacy Code Cleanup Initiative
2025-11-06 22:34:18 +09:00
8b6cbd8f70
chore: update docs/private submodule to latest
2025-11-06 17:36:22 +09:00
e326e787a4
release: v21.0.0 – Full Self‑Hosting (S1/S2/S3 complete)
...
- DoD met: S1/S2 determinism (const/compare/threeblock-collect), PRIMARY hv1 inline no-fallback, S3 (llvmlite+kernel) reps green
- Harness: v1→llvmlite direct, EXE links to libnyash_kernel.a
- Python LLVM builder fixes: cmp normalization, ret PHI synthesis, mir_call flat shape
- Using/alias polish (prod): modules-first; missing aliases added; duplicate using cleaned
- Docs: phase-21.0 COMPLETE; CurrentTask closed; release notes added
2025-11-06 16:59:34 +09:00
77d4fd72b3
phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0
2025-11-06 15:41:52 +09:00
44a5158a14
hv1: early-exit at main (no plugin init); tokenizer: Stage-3 single-quote + full escapes (\/ \b \f \' \r fix); builder: route BinOp via SSOT emit_binop_to_dst; hv1 verify canary route (builder→Core); docs: phase-20.39 updates
2025-11-04 20:46:43 +09:00
ab81564174
phase-20.39 step1: introduce typed IR shadow in hv1 dispatcher; step2: remove hv1 include fallback from verify (direct route only); add IR types module export; docs+current_task updated
2025-11-04 16:45:01 +09:00
30aa39f50b
hv1 verify: add direct route (env JSON) and clean inline path; fix v1 phi incoming order; make test_runner use hv1 direct; add phase2037 phi canaries; load modules.workspace exports for alias; update docs (phase-20.38, source extensions) and CURRENT_TASK
2025-11-04 16:33:04 +09:00
a4f30ae827
Phase 20.34: expand MirBuilder internal library with comprehensive lowering boxes; add pattern registry and program scanning infrastructure; implement internal lowerers for if/loop/return patterns; add dev tools and comprehensive canary tests; update VM boxes and host providers for internal delegation; wire phase2034 test suite with 30+ canary scripts covering internal lowering scenarios
...
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-11-03 16:09:19 +09:00
ff62eb0d97
refactor(lang): comprehensive boxification and deduplication
...
Phase 1-4 Complete:
- Remove legacy archive folder (4 files, ~200 lines eliminated)
- Unify Handler pattern via CoreHandlerBaseBox (5 handlers simplified)
- Create InstFieldExtractorBox for common JSON field extraction
- Reorganize tests into unit/integration/regression categories
Impact:
- Code reduction: 400-600 lines (15-20%)
- Improved maintainability through unified design patterns
- Better test organization and structure
- Enhanced consistency following box-first principles
2025-11-02 12:30:30 +09:00
756af0da6c
Phase 20.33: migrate docs to lang compiler entry; add Bridge canonicalize canary skeletons (opt-in); dep_tree.sh fail-fast legacy path; Gate-C OOB strict already present
2025-11-01 19:01:55 +09:00
c331296552
P0/P1/P2: quick緑化と境界/検証強化\n\n- P0: json_lint_vm を quick で opt-in 化(既定は SKIP)し、builder デバッグノイズは filter_noise で抑制\n- P1: ArrayBox に OOB Strict タグを導入(HAKO_OOB_STRICT/NYASH_OOB_STRICT)+ Stage‑B OOB 観測カナリア整備\n- P2: Bridge/LLVM self まわりの検証を opt-in スモークで拡充(self_param_*)。ドキュメント/PLAN/CHECKLIST/SSOT を更新
2025-11-01 17:39:36 +09:00
eef6fca8cd
docs(loops): LoopForm SSOT設計ノートを追加し、Bridge側ループ降下にPHI到達検証を導入(debug時)。\n\n- 新規: docs/development/architecture/loops/loopform_ssot.md\n- 修正: src/runner/json_v0_bridge/lowering/loop_.rs に debug_verify_phi_inputs 呼び出しを追加\n- 方針: Direct MIR は既に phi_core を使用。Bridge は段階的に LoopPhiOps アダプタでSSOTに寄せる
2025-11-01 16:37:16 +09:00
01b4417c5d
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 層の前作業含む)
2025-11-01 16:31:48 +09:00
6a452b2dca
fix(mir): PHI検証panic修正 - update_cfg()を検証前に呼び出し
...
A案実装: debug_verify_phi_inputs呼び出し前にCFG predecessorを更新
修正箇所(7箇所):
- src/mir/builder/phi.rs:50, 73, 132, 143
- src/mir/builder/ops.rs:273, 328, 351
根本原因:
- Branch/Jump命令でsuccessorは即座に更新
- predecessorはupdate_cfg()で遅延再構築
- PHI検証が先に実行されてpredecessor未更新でpanic
解決策:
- 各debug_verify_phi_inputs呼び出し前に
if let Some(func) = self.current_function.as_mut() {
func.update_cfg();
}
を挿入してCFGを同期
影響: if/else文、論理演算子(&&/||)のPHI生成が正常動作
2025-11-01 13:28:56 +09:00
a38aa7b417
feat(phase33): mir_call.hako Stages 2-4 complete - 全段階実装完了 🎉
...
Stage 2: CallEmitBox拡張 (+12 lines)
- make_mir_call_closure(params, captures, me_capture, dst)
- make_mir_call_value(func_vid, arg_ids, dst)
Stage 3: mir_call.hako簡略化 (208→164 lines, -21.2%)
- CallEmitBox完全活用により手動JSON生成を削除
- 74.4%削減達成 (Python 641→Hakorune 164 lines)
Stage 4: Smoke Tests追加 (+102 lines)
- closure_simple.hako: Closure callee typeテスト
- value_simple.hako: Value callee typeテスト
Phase 33 Final Achievement:
✅ 10/10 instructions 完全実装 (100%)
- Phase v0: const, binop, compare, ret (4/4)
- Phase v1: branch, jump, copy (3/3)
- Phase v2-A: phi (1/1)
- Phase v2-B: loopform (1/1)
- Phase v2-C: mir_call (1/1) ← NEW!
Test Coverage:
- Unit tests: 288 lines (6 tests, all callee types)
- Smoke tests: 147 lines (3 tests)
- Total: 435 lines test coverage
🚀 Python → Hakorune Script 移行 100% 完了!
2025-11-01 09:05:02 +09:00
e5331c87b0
docs(phase33): update submodule - Stage 1 completion report added
2025-11-01 08:56:08 +09:00
ac797553cf
docs(phase33): Update submodule with Phase v2-B loopform documentation
...
Submodule commit d8785d4:
- PHASE_V2_LOOPFORM_PLAN.md (519 lines)
- PHASE_V2_LOOPFORM_STAGE1_COMPLETE.md (365 lines)
- PHASE_V2_LOOPFORM_STAGE2_COMPLETE.md (421 lines)
- PHASE_V2_LOOPFORM_COMPLETE.md (396 lines)
Total: 1,701 lines of comprehensive Phase 33 documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-01 08:41:15 +09:00
967cf9019c
submodule: restore docs/private as proper submodule; drop stray gitlinks (nekocode-rust, nyash-lang-papers) from index
2025-11-01 07:38:40 +09:00
a87ea2636c
docs: clarify static box method arity (implicit self) and plan fix in Phase 20.33; expand Bridge singleton injection spec; update checklist
2025-11-01 07:07:29 +09:00
eabeb69d77
docs(phase-20.33): update Gate-C(Core) status (v1→MIR interpreter), mark parity smokes done; clean up wording\nchore: remove unused bak/ (external backup kept)\nsmokes: add Gate-C v1 file/pipe opt-in canaries; env toggles documented\nrunner: include json_v1_bridge + bridge toggles (singleton/phi) wiring
2025-11-01 07:02:04 +09:00
cac22c1a87
Runner: canonicalize json-file input via core_bridge when HAKO_NYVM_CORE=1
2025-11-01 05:19:10 +09:00
4f4ee948e0
Stage-B: add --v1-compat opt-in path and smoke
2025-11-01 03:56:25 +09:00
1f415e733c
Stage-B: route FlowEntry context (using/extern) and default Stage-B entry
2025-11-01 03:03:51 +09:00
978bb4a5c6
runner: add NyVM wrapper core_bridge (canonicalize/dump) + opt-in wrapper canary; export module in common_util
2025-11-01 02:51:49 +09:00
5597b78f0d
docs(phase-20.33): Stage‑B Hakorune compiler plan (scope/milestones/criteria)
2025-11-01 01:49:42 +09:00
8b71f25dd4
Stage-A selfhost emitter fixes and LLVM opt toggle
2025-10-31 23:16:27 +09:00
5e3d9e7ae4
restore(lang/compiler): bring back lang/src/compiler from e917d400; add Hako index canaries and docs; implement Rust-side index operator (Array/Map get/set) with Fail‑Fast diagnostics
...
- restore: lang/src/compiler/** (parser/emit/builder/pipeline_v2) from e917d400
- docs: docs/development/selfhosting/index-operator-hako.md
- smokes(hako): tools/smokes/v2/profiles/quick/core/index_operator_hako.sh (opt-in)
- smokes(vm): adjust index_operator_vm.sh for semicolon gate + stable error text
- rust/parser: allow IndexExpr and assignment LHS=Index; postfix parse LBRACK chain
- rust/builder: lower arr/map index to BoxCall get/set; annotate array/map literals; Fail‑Fast for unsupported types
- CURRENT_TASK: mark Rust side done; add Hako tasks checklist
Note: files disappeared likely due to branch FF to a lineage without lang/src/compiler; no explicit delete commit found. Added anchor checks and suggested CI guard in follow-up.
2025-10-31 20:18:39 +09:00
86fd03afe8
docs(specs): add Index Operator design; CURRENT_TASK: plan for Phase‑20.31 small-scope bring‑up
2025-10-31 19:35:47 +09:00
712b370013
aot(core): EXE path green (return 7); migrate NyRT jit handles → runtime::host_handles; fix mir_call.py indent; workspace excludes for missing plugins; docs(phase-33) status update
2025-10-31 18:30:50 +09:00
c11803797a
docs(phase-33): status update — AOT EXE 'return 7' blockers and next steps; keep main clean, continue on phase33 branch
2025-10-31 18:05:39 +09:00
8fd3a2b509
docs: restore docs/private/roadmap from 7b4908f9 (Phase 20.31)
2025-10-31 18:00:10 +09:00
59eb39e8a0
docs: mark WASM/browser as paused/unmaintained; update README (en/ja), wasm guides banner; archive note in projects/nyash-wasm README
2025-09-28 20:47:45 +09:00
dd65cf7e4c
builder+vm: unify method calls via emit_unified_call; add RouterPolicy trace; finalize LocalSSA/BlockSchedule guards; docs + selfhost quickstart
...
- Unify standard method calls to emit_unified_call; route via RouterPolicy and apply rewrite::{special,known} at a single entry.\n- Stabilize emit-time invariants: LocalSSA finalize + BlockSchedule PHI→Copy→Call ordering; metadata propagation on copies.\n- Known rewrite default ON (userbox only, strict guards) with opt-out flag NYASH_REWRITE_KNOWN_DEFAULT=0.\n- Expand TypeAnnotation whitelist (is_digit_char/is_hex_digit_char/is_alpha_char/Map.has).\n- Docs: unified-method-resolution design note; Quick Reference normalization note; selfhosting/quickstart.\n- Tools: add tools/selfhost_smoke.sh (dev-only).\n- Keep behavior unchanged for Unknown/core/user-instance via BoxCall fallback; all tests green (quick/integration).
2025-09-28 20:38:09 +09:00
510f4cf523
builder/vm: stabilize json_lint_vm under unified calls
...
- Fix condition_fn resolution: Value call path + dev safety + stub injection
- VM bridge: handle Method::birth via BoxCall; ArrayBox push/get/length/set direct bridge
- Receiver safety: pin receiver in method_call_handlers to avoid undefined use across blocks
- Local vars: materialize on declaration (use init ValueId; void for uninit)
- Prefer legacy BoxCall for Array/Map/String/user boxes in emit_box_or_plugin_call (stability-first)
- Test runner: update LLVM hint to llvmlite harness (remove LLVM_SYS_180_PREFIX guidance)
- Docs/roadmap: update CURRENT_TASK with unified default-ON + guards
Note: NYASH_DEV_BIRTH_INJECT_BUILTINS=1 can re-enable builtin birth() injection during migration.
2025-09-28 12:19:49 +09:00
41a46b433d
smokes: add LLVM build hint on skip; README: how to run AST/LLVM tests in quick by enabling LLVM first
2025-09-28 02:13:53 +09:00
c409aa6ad1
runner: promote @local expansion to first-class (default ON) across vm & selfhost; docs updated to reflect standard sugar
2025-09-28 02:05:41 +09:00
1994990f47
docs: confirm Option A (no var/let; explicit local). Add notes to cheatsheet, language reference, tutorials. CURRENT_TASK updated with decision and next small items.
2025-09-28 02:00:53 +09:00
34be7d2d79
vm/router: minimal special-method extension (equals/1); toString mapping kept
...
mir: add TypeCertainty to Callee::Method (diagnostic only); plumb through builder/JSON/printer; backends ignore behaviorally
using: confirm unified prelude resolver entry for all runner modes
docs: update Callee architecture with certainty; update call-instructions; CURRENT_TASK note
tests: quick 40/40 PASS; integration (LLVM) 17/17 PASS
2025-09-28 01:33:58 +09:00
8ea95c9d76
docs: add instance-dispatch & birth invariants; smokes probe policy; archive CURRENT_TASK and replace with concise plan; impl VM stringify(Void) safety; tighten heavy probes; enable rewrite default ON
2025-09-27 08:56:43 +09:00
cb236b7f5a
json(vm): fix birth dispatch; unify constructor naming (Box.birth/N); JsonNode factories return JsonNodeInstance; quick: enable heavy JSON with probe; builder: NYASH_BUILDER_DEBUG_LIMIT guard; json_query_min(core) harness; docs/tasks updated
2025-09-27 08:45:25 +09:00