35cd93a37a
Phase 33-2: JoinInst::Select implementation + minimal If JoinIR lowering
...
Implementation:
- Add JoinInst::Select variant to JoinIR schema
- Implement Select execution in JoinIR Runner (Bool/Int cond support)
- Add Select handling in JoinIR→MIR Bridge (4-block structure)
- Create test cases (joinir_if_select_simple/local.hako)
- Add dev toggle NYASH_JOINIR_IF_SELECT=1
- Create lowering infrastructure (if_select.rs, stub for Phase 33-3)
Tests:
- 3/3 unit tests pass (test_select_true/false/int_cond)
- Integration tests pass (RC: 0)
- A/B execution verified (existing if_phi vs JoinIR Select)
Files changed:
- New: apps/tests/joinir_if_select_{simple,local}.hako
- New: src/mir/join_ir/lowering/if_select.rs
- Modified: src/mir/join_ir/{mod,json,runner,vm_bridge}.rs
- Modified: src/config/env.rs (joinir_if_select_enabled)
- Modified: docs/reference/environment-variables.md
Phase 33-3 ready: MIR pattern recognition + auto-lowering pending
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-27 02:58:38 +09:00
eddc4e6035
docs(joinir): L-2.2 Step-4 - Update JoinIR VM bridge documentation
...
Phase 32 README:
- Expand VM Bridge table with "JoinIR 利用範囲" column
- Add L-2.2 progress summary table (Step-1~5 status)
- Add developer notes for Stage-B JoinIR observation
environment-variables.md:
- Add detailed descriptions for NYASH_JOINIR_* variables
- Clarify scope and limitations (Stage-B = lowering only)
- Add Stage-B JoinIR observation example
CURRENT_TASK:
- Update L-2.2 status to Step-1~4 complete
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-26 11:55:04 +09:00
51ff558904
feat(phase32): L-2.1 Stage-1 UsingResolver JoinIR integration + cleanup
...
Phase 32 L-2.1 complete implementation:
1. Stage-1 UsingResolver main line JoinIR connection
- CFG-based LoopForm construction for resolve_for_source/5
- LoopToJoinLowerer integration with handwritten fallback
- JSON snapshot tests 6/6 PASS
2. JoinIR/VM Bridge improvements
- Simplified join_ir_vm_bridge.rs dispatch logic
- Enhanced json.rs serialization
- PHI core boxes cleanup (local_scope_inspector, loop_exit_liveness, loop_var_classifier)
3. Stage-1 CLI enhancements
- Extended args.rs, groups.rs, mod.rs for new options
- Improved stage1_bridge module (args, env, mod)
- Updated stage1_cli.hako
4. MIR builder cleanup
- Simplified if_form.rs control flow
- Removed dead code from loop_builder.rs
- Enhanced phi_merge.rs
5. Runner module updates
- json_v0_bridge/lowering.rs improvements
- dispatch.rs, selfhost.rs, modes/vm.rs cleanup
6. Documentation updates
- CURRENT_TASK.md, AGENTS.md
- Various docs/ updates
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-26 10:17:37 +09:00
03efa13e76
docs(phase-29): JoinIR/Stage-1 環境変数棚卸し完了
...
Step 1: ENV_INVENTORY.md 作成 (docs/private submodule)
Step 2: 実装統一確認 - 既にhelper経由で統一済み
Step 3: environment-variables.md に JoinIRセクション追加
Step 4: スモークテスト pass
Step 5: CURRENT_TASK.md に完了記録
発見事項:
- JoinIR: env_flag_is_1() ヘルパー経由で統一済み
- Stage-1: src/config/env/stage1.rs SSOT モジュール経由で統一済み
- NYASH_RUN_JOINIR_MINIMAL は既に削除済み
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-25 09:03:28 +09:00
94b2bd2799
feat(selfhost): add observation logs for Ny compiler path diagnosis
...
Add NYASH_CLI_VERBOSE>=2 observation logs to trace the Ny compiler
child process path (NYASH_USE_NY_COMPILER=1):
- Log when spawning child process
- Log when receiving Program(JSON v0)
- Log before/after maybe_dump_mir with dump path info
- Report whether MIR dump file was created
Key finding: apps/selfhost/compiler/compiler.hako doesn't exist,
so the preferred child process route never fires. This explains
why RUST_MIR_DUMP_PATH doesn't create files in Ny compiler path.
Also update environment-variables.md with:
- NYASH_CLI_VERBOSE=2 level documentation
- Ny compiler observation template for Phase 29
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-25 07:08:32 +09:00
0852a397d9
Add experimental JoinIR runner and tests
2025-11-23 08:38:15 +09:00
8750186e55
chore: Phase 26-H セッション完了 - 全ドキュメント更新
...
Phase 26-H 完了内容:
✅ JoinIR 型定義実装(src/mir/join_ir.rs)
✅ MIR → JoinIR 自動変換実装(lower_min_loop_to_joinir)
✅ 自動変換テスト実装(mir_joinir_min_auto_lowering)
✅ PHI/Loop箱 → JoinIR 移行対応表追加(loopform_ssot.md)
ドキュメント更新:
- Phase 27 JoinIR タスク計画追加
- Phase 26-H タスク完了記録
- 各種 README 更新(進捗反映)
- CURRENT_TASK.md 更新
コミット統計: $(git status --short | wc -l) files changed
次のステップ: Phase 27 一般化 MIR → JoinIR 変換
2025-11-23 05:53:27 +09:00
c344451087
fix(mir-builder): static method arity mismatch根治 - Phase 25.x
...
**問題**:
- ParserStmtBox.parse_using/4 に5引数が渡される
- me.method呼び出しで instance/static 判別なし
- static method に誤って receiver 追加
**修正**:
- MeCallPolicyBox: params[0]の型で instance/static 判別
- Instance method: receiver 追加
- Static method: receiver なし
- Arity検証(NYASH_ME_CALL_ARITY_STRICT=1)
**ドキュメント**:
- docs/reference/environment-variables.md 新規作成
- docs/development/architecture/mir-logs-observability.md 更新
**テスト**:
- src/tests/mir_stage1_cli_emit_program_min.rs 追加
- 既存 stage1 テスト全てパス
Phase: 25.x
2025-11-21 11:16:38 +09:00
525e59bc8d
feat(loop-phi): Add body-local variable PHI generation for Rust AST loops
...
Phase 25.1c/k: Fix ValueId undefined errors in loops with body-local variables
**Problem:**
- FuncScannerBox.scan_all_boxes/1 and BreakFinderBox._find_loops/2 had ValueId
undefined errors for variables declared inside loop bodies
- LoopFormBuilder only generated PHIs for preheader variables, missing body-locals
- Example: `local ch = s.substring(i, i+1)` inside loop → undefined on next iteration
**Solution:**
1. **Rust AST path** (src/mir/loop_builder.rs):
- Detect body-local variables by comparing body_end_vars vs current_vars
- Generate empty PHI nodes at loop header for body-local variables
- Seal PHIs with latch + continue snapshot inputs after seal_phis()
- Added HAKO_LOOP_PHI_TRACE=1 logging for debugging
2. **JSON v0 path** (already fixed in previous session):
- src/runner/json_v0_bridge/lowering/loop_.rs handles body-locals
- Uses same strategy but for JSON v0 bridge lowering
**Results:**
- ✅ FuncScannerBox.scan_all_boxes: 41 body-local PHIs generated
- ✅ Main.main (demo harness): 23 body-local PHIs generated
- ⚠️ Still some ValueId undefined errors remaining (exit PHI issue)
**Files changed:**
- src/mir/loop_builder.rs: body-local PHI generation logic
- lang/src/compiler/entry/func_scanner.hako: debug logging
- /tmp/stageb_funcscan_demo.hako: test harness
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-19 23:12:01 +09:00
8b44c5009f
fix(mir): fix else block scope bug - PHI materialization order
...
Root Cause:
- Else blocks were not propagating variable assignments to outer scope
- Bug 1 (if_form.rs): PHI materialization happened before variable_map reset,
causing PHI nodes to be lost
- Bug 2 (phi.rs): Variable merge didn't check if else branch modified variables
Changes:
- src/mir/builder/if_form.rs:93-127
- Reordered: reset variable_map BEFORE materializing PHI nodes
- Now matches then-branch pattern (reset → materialize → execute)
- Applied to both "else" and "no else" branches for consistency
- src/mir/builder/phi.rs:137-154
- Added else_modified_var check to detect variable modifications
- Use modified value from else_var_map_end_opt when available
- Fall back to pre-if value only when truly not modified
Test Results:
✅ Simple block: { x=42 } → 42
✅ If block: if 1 { x=42 } → 42
✅ Else block: if 0 { x=99 } else { x=42 } → 42 (FIXED!)
✅ Stage-B body extraction: "return 42" correctly extracted (was null)
Impact:
- Else block variable assignments now work correctly
- Stage-B compiler body extraction restored
- Selfhost builder path can now function
- Foundation for Phase 21.x progress
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-13 20:16:20 +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
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
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
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
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
fd56b8049a
mir: implement proper short-circuit lowering (&&/||) via branch+phi; vm: add NYASH_VM_TRACE exec/phi logs and reg_load diagnostics; vm-fallback: minimal Void guards (push/get_position/line/column), MapBox.birth no-op; smokes: filter builtin Array/Map plugin notices; docs: CURRENT_TASK updated
2025-09-26 03:30:59 +09:00
041cef875a
json-native: token positions (line/column); escape utils BMP coverage + surrogate guard; add smokes for string escapes, nested, and error cases (AST/VM)
2025-09-26 00:42:55 +09:00
b3a96faccb
smokes: add JSON nested/invalid cases; force VM backend; temp nyash.toml with json_native package for resolution
2025-09-26 00:38:14 +09:00
6ce06501e1
json-native: enable float roundtrip in parser (NUMBER => float by '.'/exp); expand roundtrip smoke with more numeric cases
2025-09-26 00:32:20 +09:00
85084664c2
docs+runner+parser: SSOT+AST using finalized (legacy text inlining removed); provider verify reads nyash.toml; preflight warn hook; method-body guard removed; CURRENT_TASK updated for next JSON work
2025-09-26 00:27:02 +09:00
d9f26d4549
feat: nyash.toml SSOT + using AST統合完了(12時間の戦い)
...
- nyash.tomlを唯一の真実(SSOT)として依存管理確立
- dev/ci/prodプロファイルによる段階的厳格化実装
- AST結合で宣言/式の曖昧性を根本解決
- Fail-Fast原則をCLAUDE.md/AGENTS.mdに明文化
- VM fallbackでもASTベース using有効化(NYASH_USING_AST=1)
- 静的メソッドの is_static=true 修正で解決安定化
- STATICブレークハック既定OFF化で堅牢性向上
🎉 usingシステム完全体への道筋確立!JSONライブラリ・Nyash VM開発が可能に
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-25 16:03:29 +09:00
d052f9dc97
feat: using構文完全実装&json_native大幅進化
...
## 🎉 using構文の完全実装(ChatGPT作業)
- ✅ **include → using移行完了**: 全ファイルでusing構文に統一
- `local X = include` → `using "path" as X`
- 約70ファイルを一括変換
- ✅ **AST/パーサー/MIR完全対応**: using専用処理実装
- ASTNode::Using追加
- MIRビルダーでの解決処理
- include互換性も維持
## 🚀 json_native実装進化(ChatGPT追加実装)
- ✅ **浮動小数点対応追加**: is_float/parse_float実装
- ✅ **配列/オブジェクトパーサー実装**: parse_array/parse_object完成
- ✅ **エスケープ処理強化**: Unicode対応、全制御文字サポート
- ✅ **StringUtils大幅拡張**: 文字列操作メソッド多数追加
- contains, index_of_string, split, join等
- 大文字小文字変換(全アルファベット対応)
## 💡 MIR SIMD & ハイブリッド戦略考察
- **MIR15 SIMD命令案**: SimdLoad/SimdScan等の新命令セット
- **C ABIハイブリッド**: ホットパスのみC委託で10倍速化可能
- **並行処理でyyjson超え**: 100KB以上で2-10倍速の可能性
- **3層アーキテクチャ**: Nyash層/MIR層/C ABI層の美しい分離
## 📊 技術的成果
- using構文により名前空間管理が明確化
- json_nativeが実用レベルに接近(完成度25%→40%)
- 将来的にyyjsonの70%速度達成可能と判明
ChatGPT爆速実装×Claude深い考察の完璧な協働!
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-25 00:41:56 +09:00
9b9a91c859
feat: GC機能復活&VM整理&json_native調査完了
...
## 🎉 ChatGPT×Claude協働成果
- ✅ **GC機能復活**: vm-legacy削除で失われたGC機能を新実装で復活
- GCメトリクス追跡システム実装(alloc/collect/pause計測)
- 3種類のGCモード対応(counting/mark_sweep/generational)
- host_handles.rsでハンドル管理復活
- ✅ **VM整理とエイリアス追加**: 混乱していた名前を整理
- MirInterpreter = NyashVm = VM のエイリアス統一
- vm-legacyとインタープリターの違いを明確化
- 壊れていたvm.rsの互換性修復
- ✅ **スモークテスト整理**: v2構造でプラグイン/コア分離
- plugins/ディレクトリにプラグインテスト移動
- gc_metrics.sh, gc_mode_off.sh, async_await.sh追加
- _ensure_fixture.shでプラグイン事前ビルド確認
## 📊 json_native調査結果
- **現状**: 25%完成(配列/オブジェクトパース未実装)
- **将来性**: 並行処理でyyjson超えの可能性大
- 100KB以上のJSONで2-10倍速の可能性
- Nyash ABI実装後はゼロコピー最適化
- **判断**: 現時点では置換不可、将来の大きな足場
## 🔍 技術的発見
- vm-legacy = 完全なVM実装(GC付き)だった
- MirInterpreter = 現在のRust VM(712行、Arc使用)
- 200行簡易JSONは既に削除済み(存在しない)
ChatGPT爆速修復×Claude詳細調査の完璧な協働!
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 23:27:59 +09:00
c0978634d9
feat: using system完全実装+旧スモークテストアーカイブ完了
...
✅ using nyashstd完全動作(ChatGPT実装)
- builtin:nyashstd自動解決
- 環境変数不要でデフォルト有効
- console.log等の基本機能完備
✅ Fixture plugin追加(テスト用最小構成)
✅ v2スモークテスト構造への移行
✅ 旧tools/test/smoke/削除(100+ファイル)
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 21:45:27 +09:00
f0608e9bb1
feat: Phase 2.4 レガシーアーカイブ整理完了(151MB削減)
...
## 🎉 完了項目
- ✅ plugin_box_legacy.rs削除(7.7KB、参照ゼロ確認済み)
- ✅ REMOVEDコメント整理(encode.rs簡潔化)
- ✅ venv削除(143MB節約、.gitignoreは既存)
- ✅ llvm_legacyスタブ化(8KB、compile_error!による安全化)
## 🏆 成果
- **リポジトリサイズ改善**: 151MB削減
- **コード整理**: レガシーコード安全にアーカイブ
- **プラグインファースト**: StrictPluginFirst継続動作
## ✅ 検証完了
- cargo build --release --features llvm (警告のみ、エラーなし)
- LLVMハーネス実行: print出力正常
- プラグイン動作: StringBox等正常動作
codex先生の戦略に従った安全な段階的削除を実行
Co-Authored-By: codex <noreply@anthropic.com >
2025-09-24 14:13:15 +09:00
95382bcaab
feat: Phase 2.2 LLVM静的プラグイン検証完了!nyrt設計真実解明
...
✅ **Phase 2.2達成項目**:
- LLVMスモークテスト完全成功(1648バイト生成)
- プラグイン統合動作確認(StringBox/IntegerBox@LLVM)
- 静的コンパイル核心技術実証(MIR→LLVM→オブジェクト)
- Everything is Plugin革命のLLVM対応確認
🔍 **Task先生nyrt調査成果**:
- nyrt正体解明:AOT/LLVMランタイム必須インフラ
- 機能分類:58%必須(ハンドル・GC・エントリー)42%代替可能
- 設計一貫性:75%達成(Box操作完全プラグイン化)
- 削減戦略:Phase A実装で26個関数→プラグイン統合(42%削減)
🎯 **Everything is Plugin完全実現への道筋**:
- 現状:プラグインファクトリー(StrictPluginFirst)完全動作
- 課題:nyrt中央集権 vs プラグイン哲学の矛盾
- 解決:Hybrid Plugin Architecture推進
- 目標:String/Box API→プラグイン統合で設計一貫性完成
📊 **技術的成果**:
- LLVM static plugin integration: ✅ 完全動作
- Plugin priority system: ✅ 完全動作
- Object code generation: ✅ 実証済み
- nyrt architectural analysis: ✅ 完全解明
🚀 **Phase 15.5革命基盤確立**: プラグイン優先アーキテクチャ実用化完了
次段階Phase 2.3でビルトインBox段階削除+nyrt Plugin統合推進へ
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 12:22:08 +09:00
73b90a7c28
feat: スモークテストv2実装&Phase 15.5後のプラグイン対応
...
Phase 15.5 Core Box削除後の新テストシステム構築:
## 実装内容
- スモークテストv2システム完全実装(3段階プロファイル)
- 共通ライブラリ(test_runner/plugin_manager/result_checker/preflight)
- インタープリター層完全削除(約350行)
- PyVM重要インフラ特化保持戦略(JSON v0ブリッジ専用)
- nyash.tomlパス修正(13箇所、プラグイン正常ロード確認)
## 動作確認済み
- 基本算術演算(+, -, *, /)
- 制御構文(if, loop, break, continue)
- 変数代入とスコープ
- プラグインロード(20個の.soファイル)
## 既知の問題
- StringBox/IntegerBoxメソッドが動作しない
- オブジェクト生成は成功するがメソッド呼び出しでエラー
- Phase 15.5影響でプラグイン実装が不完全な可能性
## ドキュメント
- docs/development/testing/smoke-tests-v2.md 作成
- docs/reference/pyvm-usage-guidelines.md 作成
- CODEX_QUESTION.md(Codex相談用)作成
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 09:30:42 +09:00
81211c22ad
feat: MIR Call命令統一Phase 3.1-3.2完了!統一Call実装進行中
...
✨ Phase 3.1-3.2実装完了
- build_indirect_call_expressionでCallTarget::Value使用
- print関数をcall_global print()として統一
- build_function_callでemit_unified_call使用
- ExternCall(env.console.log)→Callee::Global(print)完全移行
🏗️ MIR統一基盤構築
- src/mir/definitions/call_unified.rs: 統一定義(297行)
- emit_unified_call()と便利メソッド3種実装
- NYASH_MIR_UNIFIED_CALL=1で段階移行制御
- VM実行器でCallee対応実装済み
📊 進捗状況(26%削減見込み)
- Phase 1-2: ✅ 基盤構築完了
- Phase 3.1-3.2: ✅ 基本関数統一完了
- Phase 3.3: 🔄 BoxCall統一中
- Phase 4: 📅 Python LLVM(最優先・63%削減)
- Phase 5: 📅 PyVM/VM統一
📚 ドキュメント更新
- CLAUDE.md: テストスクリプト参考集追加
- CURRENT_TASK.md: Phase 3進捗更新
- python-llvm-priority-rationale.md: 優先順位戦略文書化
- mir-call-unification-master-plan.md: スケジュール最新化
🎯 6種類→1種類: Call/BoxCall/PluginInvoke/ExternCall/NewBox/NewClosure → MirCall統一へ
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 01:05:44 +09:00
0d443dd6fa
docs: Fix peek/match documentation inconsistencies
...
- Update CLAUDE.md: peek式 → match式, peek構文 → match構文
- Update LANGUAGE_REFERENCE_2025.md: Peek式 → Match式
- Fix default pattern: else → _ (underscore)
- Resolve confusion causing JSON development Claude to use incorrect syntax
This fixes the root cause where new AI developers were referencing outdated
'peek' syntax examples and getting parse errors, forcing them to rewrite
with 'if' statements instead of using the correct 'match' syntax.
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 02:15:54 +09:00
8e4cadd349
selfhost(pyvm): MiniVmPrints – prefer JSON route early-return (ok==1) to avoid fallback loops; keep default behavior unchanged elsewhere
2025-09-22 07:54:25 +09:00
c8063c9e41
pyvm: split op handlers into ops_core/ops_box/ops_ctrl; add ops_flow + intrinsic; delegate vm.py without behavior change
...
net-plugin: modularize constants (consts.rs) and sockets (sockets.rs); remove legacy commented socket code; fix unused imports
mir: move instruction unit tests to tests/mir_instruction_unit.rs (file lean-up); no semantic changes
runner/pyvm: ensure using pre-strip; misc docs updates
Build: cargo build ok; legacy cfg warnings remain as before
2025-09-21 08:53:00 +09:00
daa5309ea9
docs: fix macro sandbox policy and lock minimal Box API (Console/String/Array/Map); clarify plugin-off applies to macro child only
2025-09-20 09:05:20 +09:00
9b9080d0a3
macro/pattern: add type_is basic golden (MethodCall .is → MIR TypeOp mapping); docs: AST JSON v0 note for is/as mapping
2025-09-20 01:51:55 +09:00
9999c7c456
llvm: add LoopForm PHI hygiene smoke (no empty PHI); docs: MIR hints (zero-cost); macros: scaffold If/Match normalize (identity)
2025-09-20 01:06:54 +09:00
c4dda4ce01
macro(loopform): add LoopNormalize behavior routing (identity for MVP); AST JSON Local support
2025-09-19 22:52:22 +09:00
9d40e9137a
macro(ast-json): add Loop/Break/Continue to AST JSON v0; add loop_normalize_macro (MVP identity) and loopform smoke; docs update
2025-09-19 22:47:12 +09:00
da32455afc
freeze: macro platform complete; default ON with profiles; env consolidation; docs + smokes\n\n- Profiles: --profile {lite|dev|ci|strict} (dev-like default for macros)\n- Macro paths: prefer NYASH_MACRO_PATHS (legacy envs deprecated with warnings)\n- Selfhost pre-expand: auto mode, PyVM-only, add smokes (array/map)\n- Docs: user-macros updated; new macro-profiles guide; AGENTS freeze note; CURRENT_TASK freeze\n- Compat: non-breaking; legacy envs print deprecation notices\n
2025-09-19 22:27:59 +09:00
9142476484
parser(match): add MVP type patterns (IntegerBox(x)/StringBox(s)) via AST If-chain; keep literal-only path using PeekExpr; add smoke app (apps/tests/match_type_pattern_basic.nyash); build + stage-2 smokes green
2025-09-19 08:34:29 +09:00
45e1d57536
docs(lang): adopt match as unified pattern matching; remove peek from docs; update EBNF and guides
...
- Decision recorded in CURRENT_TASK: replace with (no compat alias)
- EBNF: add match_expr/pattern/guard; note legacy peek removal
- Guides/Reference: update examples and wording (null-coalesce/safe-access sugar via match)
2025-09-19 07:42:38 +09:00
5e818eeb7e
stage3: unify to cleanup; MIR return-defer; docs+smokes updated; LLVM(harness): finalize_phis ownership, ret.py simplified, uses-predeclare; cleanup return override green; method-postfix cleanup return WIP (PHI head)
2025-09-19 02:07:38 +09:00
3fe908eb0d
docs/runtime: externcall + println normalization; NyRT silent result flag; PyVM console warn/error/trace routing\nselfhost(M2): add MirEmitterBox (Return(Int)->const+ret) and --emit-mir switch; initial selfhost smoke\nrunner: child args/env hardening for selfhost (NYASH_NY_COMPILER_CHILD_ARGS under --; NYASH_JSON_ONLY=1, NYASH_VM_USE_PY=1, NYASH_DISABLE_PLUGINS=1); VM path strips using lines when NYASH_ENABLE_USING=1\nmeta: clarify PyVM/llvmlite as primary (vm/interpreter legacy OFF) in CURRENT_TASK.md; README links to externcall docs
2025-09-18 06:35:49 +09:00
d93595ab83
docs(plugins): update headers to TypeBox v2; expand v2 doc with Regex/Net method tables; remove BID mentions where v2 exists
2025-09-17 22:30:19 +09:00
fcf8042622
docs(abi): align v2 with Phase‑12 blueprint; add roadmap/forward‑compat notes and Phase‑15 status pointer
2025-09-17 21:58:47 +09:00
4ea3ca2685
docs/ci: selfhost bootstrap/exe-first workflows; add ny-llvmc scaffolding + JSON v0 schema validation; plan: unify to Nyash ABI v2 (no backwards compat)
2025-09-17 20:33:19 +09:00
d99b941218
docs: add MIR13 mode doc and set PHI-off as default; bridge lowering split (if/loop/try); llvmlite resolver stabilization; curated runner default PHI-off; refresh CURRENT_TASK.md
2025-09-17 10:58:12 +09:00
5c9213cd03
smokes: add curated LLVM runner; archive legacy smokes; PHI-off unified across Bridge/Builder; LLVM resolver tracing; minimal Throw lowering; config env getters; dev profile and root cleaner; docs updated; CI workflow runs curated LLVM (PHI-on/off)
2025-09-16 23:49:36 +09:00
97a76c0571
selfhost: stub stage3 parser nodes under gate
2025-09-16 18:36:54 +09:00