dc278d1a84
docs: Phase A完成&LLVM_SYS_180_PREFIX削除ドキュメント更新
...
📝 重要ドキュメント更新内容:
✅ CURRENT_TASK.md:
- Phase A真の完成達成を完全反映
- calleeフィールド設定修正、JSON v1統一Call生成完了記録
- FileBoxプラグイン&Core Box統一Call動作確認完了
- LLVM_SYS_180_PREFIX不要性証明を追加
✅ CLAUDE.md:
- LLVM_SYS_180_PREFIX環境変数削除(Rust LLVMバインディング非使用)
- llvmliteハーネス独立性を明記
- ビルドコマンド簡略化(env LLVM_SYS_180_PREFIX不要)
- 統一Callテストコマンド更新
✅ Phase 15.5 implementation-status.md:
- Phase A進捗を80%→100%完了に更新
- 総合進捗30%→40%に更新
- Week 2進行中→Phase A完全達成に変更
- llvmliteハーネス成功実績を追加
🎯 技術的成果記録:
- MIR Call命令統一革命第1段階100%達成
- Python独立プロセス安定動作確認
- LLVM環境変数依存完全除去
- FileBox/StringBox/ArrayBox統一Call成功
🚀 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 03:09:47 +09:00
2258046723
feat: Phase A真の完成!MIR Call命令統一100%達成
...
🎉 Phase 15.5 Week 1完全達成 - MIR Call命令統一革命完了
✅ 主要実装成果:
- MIR Builder: emit_unified_call()でCallee型完全設定
- JSON出力: v1統一Call形式(mir_call)完璧生成
- llvmlite: 統一Call処理完全実装
✅ 動作確認済みCallee型:
- Global: print関数等のグローバル関数呼び出し
- Method: Core Box(StringBox/ArrayBox)メソッド呼び出し
- Constructor: newbox→birth統一変換
- Plugin: FileBox等プラグインBox完全対応
✅ JSON v1スキーマ完全対応:
- capabilities: ["unified_call", "phi", "effects", "callee_typing"]
- schema_version: "1.0"
- metadata: phase/features完全記録
🔧 技術的革新:
- 6種Call命令→1種mir_call統一開始
- JSON v0→v1シームレス移行実現
- Everything is Box哲学完全体現
📊 Phase 15貢献: 80k→20k行革命へ重要な柱完成
🚀 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 02:44:04 +09:00
07f96ab4fb
feat: Phase 15.5 Week 1完了!llvmlite革命&環境変数完全整理
...
✅ llvmlite統一Call基盤革命達成
- mir_call.py: delegate→真の統一実装(6種Callee完全対応)
- Global/Method/Constructor/Closure/Value/Extern統一処理
- 実際のLLVMハーネス動作確認(モックルート完全回避)
✅ 環境変数体系完全整理
- CLAUDE.md: モックルート回避設定完全文書化
- 複雑な環境変数組み合わせの成功パターン確立
✅ Phase 15.5ドキュメント体系確立
- 実装状況追跡システム構築
- Week 1→2移行準備完了
🎯 Week 2開始準備: JSON出力統一→mir_json_emit.rs実装へ
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 02:13:43 +09:00
28c721d82b
feat: Phase 15.5 llvmlite革命達成!真の統一Call基盤完成
...
6種類Callee完全統一でデリゲート方式→真の統一実装へ革命的移行。
モックルート回避確立でセルフホスティング基盤強化完了。
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 02:11:59 +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
fdc889ed58
selfhost: Integrate ChatGPT's using system parser fixes
...
- Fix using paths in mini_vm_prints.nyash and mini_vm_core.nyash
- Convert multi-line JSON literal to single-line in empty args smoke test
- Remove extra closing brace in mini_vm_core.nyash
- Add verbose logging for using system visited file tracking
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 02:15:53 +09:00
da78fc174b
selfhost/runtime: Stage 0-1 runner + MIR JSON loader (summary) with trace; compiler: scopebox/loopform prepass wiring (flags, child args); libs: add P1 standard boxes (console/string/array/map) as thin wrappers; runner: pass --box-pref via env; ops_calls dispatcher skeleton; docs: selfhost executor roadmap + scopebox/loopform notes; smokes: selfhost runner + identity prepasses; CURRENT_TASK: update plan and box lib schedule
2025-09-22 21:52:39 +09:00
27568eb4a6
json: add v2 JsonDoc/JsonNode plugin with runtime provider switch; vendored yyjson + FFI; loader resolve(name)->method_id; PyVM JSON shims; smokes + CI gate; disable MiniVmPrints fallbacks by default
...
- plugin_loader_v2: store per-Box resolve() from TypeBox FFI; add resolve_method_id() and use in invoke_instance_method
- plugin_loader_unified: resolve_method() falls back to loader’s resolve when TOML lacks method entries
- nyash.toml: register JsonDocBox/JsonNodeBox methods (birth/parse/root/error; kind/get/size/at/str/int/bool)
- plugins/nyash-json-plugin:
* serde/yyjson provider switch via env NYASH_JSON_PROVIDER (default serde)
* vendored yyjson (c/yyjson) + shim; parse/root/get/size/at/str/int/bool implemented for yyjson
* TLV void returns aligned to tag=9
- PyVM: add minimal JsonDocBox/JsonNodeBox shims in ops_box.py (for dev path)
- tests/smokes: add jsonbox_{parse_ok,parse_err,nested,collect_prints}; wire two into min-gate CI
- tools: collect_prints_mixed now uses JSON-based app
- MiniVmPrints: move BinaryOp and fallback heuristics behind a dev toggle (default OFF)
- CURRENT_TASK.md: updated with provider policy and fallback stance
2025-09-22 06:16:20 +09:00
14c6b72417
current_task: record using seam fixes, mini_vm_core brace fix, collect_prints harden; mark using-mixed smoke WIP with flags; note private branches main/selfhost
2025-09-22 03:56:11 +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
ee17cfd979
mini_vm: stabilize BinOp(+), literal/string/functioncall/compare/if fast-paths; pyvm: indexOf(start)/lastIndexOf(start), substring(None) guard, __me__ dispatch; update CURRENT_TASK; selfhost smokes green for core cases
2025-09-21 06:45:21 +09:00
37f93d5630
golden: add for/foreach normalized AST and loop_nonreorder (skip-reorder); docs: MacroCtx section; demo macro (identity)
2025-09-20 09:19:28 +09:00
497da75f90
macroctx: pass ctx JSON (caps) to user macros; add demo macro; docs: MacroCtx section and sandbox Box API; golden for for/foreach normalized AST
2025-09-20 09:11:52 +09:00
8a84339ac2
core: for/foreach -> Loop normalization (always-on); LoopForm MVP-3 per-segment reorder; smokes stabilized (VM + LLVM PHI); docs updated (macro-system, loopform); quiet macro load logs
2025-09-20 08:39:40 +09:00
3ee54470a5
macro(match): add golden for guard literal OR; add smoke; update CURRENT_TASK milestones
2025-09-20 05:36:25 +09:00
c536b402a2
macro(match): add guard/type normalization smoke; update CURRENT_TASK progress
2025-09-20 05:01:58 +09:00
166c374eec
macro(if/match): stabilize PeekExpr→If normalization via internal-child; default runner off; propagate child stderr; fix JsonBuilder local_decl; add scope-hints doc; extend PHI smoke; golden for match literal passes
2025-09-20 05:00:31 +09:00
8cb93b9f1f
tests(macro): inline samples into new directory hierarchy and drop legacy macro_golden_* sources
2025-09-20 03:37:20 +09:00
3c1486e411
tests(macro): organize under apps/tests/macro/{if,loopform,collections,types,strings,identity,test_runner} with thin include wrappers; update all golden/smoke scripts and docs to new paths
2025-09-20 02:20:02 +09:00
c5ab95d082
docs(cf/pattern): add ControlFlowBuilder and PatternBuilder guides; reference from If/Match normalization; plan updated in CURRENT_TASK
2025-09-20 01:15:26 +09:00
02c8244964
scopebox: add design guide; scaffold no-op scope/defer macro; add MIR hint plan to CURRENT_TASK
2025-09-20 00:59:50 +09:00
1d965c7241
docs(cf-normalize): add If/Match normalization guide and note in CURRENT_TASK Next; confirm pipeline order before LoopForm
2025-09-20 00:36:25 +09:00
7a57abfb95
docs(loopform): add carrier normalization examples and local run tips; task: Next short + 48h Action Items updated for LoopForm MVP-2/3 and LLVM PHI smoke
2025-09-20 00:32:29 +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
811e3eb3f8
feat: comprehensive development progress
...
- Pattern matching implementation extended in match_expr.rs
- CLI configuration structured with categorized groups (task recommendation completed)
- Python LLVM builder split into function_lower.py (task recommendation completed)
- parse_box_declaration massive function refactored (task recommendation completed)
- Phase 16 Macro Revolution comprehensive planning and documentation
- Archive legacy phase documentation for clean structure
- HTTP message box improvements and performance optimizations
- MIR builder enhancements and control flow improvements
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-19 15:11:57 +09:00
3c7a5de900
runner(cli): adopt CliConfig::as_groups across runner modules (dispatch/common/pipe_io/mir/bench). llvm-builder: extract ny_main wrapper to builders.entry; add optional env-gated function_lower delegation; keep default behavior unchanged
2025-09-19 14:29:02 +09:00
5bb7f67c01
perf(typebox): reduce clones with Arc<str> for MethodSignature.name and TypeBox.methods keys; API kept stable. tools: add all-cases empty-PHI smoke runner. parser(box): extract birth_once cycle validation into helper
2025-09-19 12:13:43 +09:00
ef1f5206da
tools: add LLVM IR empty-PHI smoke checker; ensures every 'phi i64' has incoming list; used with NYASH_LLVM_DUMP_IR
2025-09-19 12:01:13 +09:00
4f82edf901
llvm: gate empty PHI sanitize behind NYASH_LLVM_SANITIZE_EMPTY_PHI=1; docs: AGENTS.md note. perf: begin clone() reduction plan — TypeBox.name/type_parameters to Arc<str>, adjusted builders/registry; no behavior change
2025-09-19 11:54:28 +09:00
f64718d22a
parser(box): extract block-first unified members into helper; preserve cache/poison and birth_once guard; integrate in parse_box_declaration; update CURRENT_TASK.md
2025-09-19 11:08:14 +09:00
7dfd55bfdb
pyvm: implement TypeOp(check) + strict match-guard smokes; parser: guard support in match; llvm: PHI wiring at block head + incoming normalization; docs: AGENTS LLVM/PHI + guard policy; add tests; plan: refactor parse_box_declaration + TODO triage + clone reduction + CLI split + LLVM builder split; update CURRENT_TASK.md
2025-09-19 10:52:57 +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
951a050592
selfhost: introduce using-based imports for compiler/parser/tools; keep includes temporarily. llvm: add PHI wiring JSON trace + unit/integration tests; fast test suite extended. runner: split selfhost helpers, small cleanups.
2025-09-18 13:35: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
5d51086530
python-plugin: RAII (PyOwned/PyBorrowed) + autodecode enum; crate: ny-llvmc --emit exe with NyRT link; tools: build_llvm.sh crate-exe path + crate_exe_smoke; CURRENT_TASK update
2025-09-18 03:57:25 +09:00
8aa01668ff
feat(plugins): migrate Python family to TypeBox v2; complete first‑party v2 set (Regex/Net/Path/Math/Time/File)\n\nfeat(smoke): add Net round‑trip sample and wire to plugin v2 smoke\n\nfeat(cli): add --emit-mir-json and runner emit+exit path\n\nchore(config): register Python v2 boxes in nyash.toml\n\nchore(loader): improve v2 diagnostics and ensure v2 shim dispatch\n\nchore(build): integrate ny-llvmc env gate in build_llvm.sh\n\nchore(tasks): update CURRENT_TASK with v2 Python/Net/emit flag
2025-09-17 22:01:29 +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
a5054a271b
llvm(py): introduce BuildCtx + trace hub; refactor if-merge prepass + PHI wiring into module; unify logs; ctx-enable compare/ret/call/boxcall/externcall/typeop/newbox/safepoint; curated smoke option for if-merge; README updates; keep behavior stable
2025-09-17 16:11:01 +09:00
2720884a20
bridge/json_v0: split expr lowering; add Ternary/Peek lowering + AST; selfhost Peek JSON emit; add selfhost Peek smoke; warning cleanup in lowering/optimizer/verification
...
- Split expr lowering into ; route calls from stmt lowering
- Implement ternary/peek lowering (MIR13 PHI-off=Copy, PHI-on=Phi)
- Extend JSON v0 AST (ExprV0::{Ternary,Peek}, PeekArmV0)
- Selfhost parser_box: emit Peek JSON; add Stage-2 'Peek basic' smoke
- Reduce warnings: remove unused imports/vars in several modules
- current_task: update plan for legacy VM/Interpreter offboarding
2025-09-17 11:45:57 +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
adbb0201a9
chore(fmt): add legacy stubs and strip trailing whitespace to unblock cargo fmt
2025-09-17 07:43:07 +09:00
f80f6b7796
docs: update CURRENT_TASK.md with logging helpers and next steps (runner trace + selfhost helpers)
2025-09-17 07:12:15 +09:00
c553f2952d
runner/env: centralize CLI/env getters; parser expr split (call/primary); verifier utils direct; optimizer: boxfield peephole; LLVM: branch cond normalize hook; add trace macro scaffolding; refactor common.rs verbose checks
2025-09-17 06:55:39 +09:00
9dc5c9afb9
refactor: split optimizer/verifier/parser modules (mainline); add runner trace/directives; add LLVM terminator/select scaffolds; extract AST Span; update CURRENT_TASK with remaining plan
2025-09-17 05:56:33 +09:00
4bd49884ca
llvm/codegen: extract wrapper/object emission into object.rs; dedupe mod.rs. runner/json_v0_bridge: introduce BridgeEnv + VarScope to unify lowering paths (lower_expr/args) and cache env flags; thread env through stmt lowering; minor HashMap type cleanups. Build + PyVM stage-2 smokes passed.
2025-09-17 02:50:39 +09:00
adbfbb2c76
ci: add GitHub Actions workflow; runner: prefer PyVM in selfhost paths; stage3: add LLVM + bridge acceptance smokes; docs: update env flags
2025-09-17 01:20:15 +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
fa1619bf4b
selfhost: add ternary parser and plugin prefix guard
2025-09-16 17:38:22 +09:00