b4ef8a0023
docs: Update JoinIR design map + organize CLAUDE.md (Phase 135 follow-up)
...
## Changes
### joinir-design-map.md
- Added "Allocator SSOT (Phase 135)" section
- Principle: All ValueId allocation via single allocator (ConditionContext.alloc_value)
- Prohibited: Internal counters in ConditionLoweringBox/ExprLowerer
- Reason: Collisions with JoinIR params (ValueId(1000+)) overwrite header PHI dst
- Detection: --verify catches "Value %N defined multiple times"
- Added "Boundary Injection SSA (Phase 135)" section
- Principle: condition_bindings allow aliases, but injected Copy dst must be unique
- Fail-Fast: Error on different sources to same dst
- Reason: Breaks MIR SSA, causes undefined behavior in VM/LLVM
- Added "Box Implementation Checklist"
- 4-point checklist for Box implementation/changes
- Covers: --verify, smoke tests, allocator usage, boundary injection
### CLAUDE.md
- Organized "重要設計書" section with clearer structure
- Added "JoinIR 設計図" subsection with both documents:
- JoinIR アーキテクチャ概要 (normative SSOT for contracts/invariants)
- JoinIR 設計マップ (navigation SSOT for implementation)
- Grouped related documents: JoinIR, MIR・言語仕様
## Context
Phase 135 revealed that missing "what not to do" (invariants/contracts) in
design docs led to Allocator SSOT violations and ValueId collisions.
This update ensures future Box implementations can follow clear contracts.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-15 19:03:05 +09:00
413504d6de
feat(mir): Phase 131-11-F - MIR JSON metadata 出力実装
...
## 実装内容
- mir_json_emit.rs に function-level metadata 追加
- PHI 命令に dst_type ヒント追加
- v0/v1 両 emitter で実装
## 成果物
- ✅ metadata.value_types を JSON に出力
- ✅ PHI dst_type を metadata から取得
- ✅ ビルド成功(0 エラー)
## JSON 出力例
```json
{
"functions": [{
"metadata": {
"value_types": {
"1": "i64",
"3": "i64"
}
}
}]
}
```
## 既知の問題(Phase 131-11-E 再調査必要)
- MIR dump で PHI が String 型のまま
- Phase 131-11-E の TypeFacts 分離が完全に動作していない可能性
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-14 19:34:02 +09:00
4b87b6cc88
docs: ドキュメント配置ルール(SSOT)確立
...
## 追加内容
- CLAUDE.md にドキュメント配置ルール(SSOT)セクション追加
- DOCS_LAYOUT.md (SSOT): 置き場所ルール定義
- phases/README.md: Phase ドキュメント説明
- design/README.md: 設計図ドキュメント説明
- investigations/README.md: 調査ログ説明
## ルール概要
1. **Phase 文書** → phases/phase-<N>/
2. **設計図** → design/
3. **調査ログ** → investigations/ (結論を 10-Now/20-Decisions に反映)
## 導線
- CLAUDE.md で概要説明
- DOCS_LAYOUT.md で詳細定義(SSOT)
- 各フォルダ README で参照方法
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2025-12-14 18:27:24 +09:00
9e32807a96
refactor(joinir): Phase 82-83 - Debug flag SSOT + Fallback verification
...
Phase 82: Centralized JoinIR debug flag reading
- Added is_joinir_debug() SSOT function in joinir_flags.rs
- Replaced 16 direct env::var() calls across 8 files
- Updated docs to recommend HAKO_JOINIR_DEBUG (NYASH_ deprecated)
- Backward compat: Both env vars work
Phase 83: Verified promoted carrier fallback behavior
- Confirmed NO fallback to name-based lookup for DigitPos/Trim
- Documented fallback expectations in Phase 80/81 docs
- Added verification commands and expected output
Changes:
- src/config/env/joinir_flags.rs: +187 lines (new SSOT module)
- 8 files: env var reads → is_joinir_debug() calls
- 3 docs: HAKO_JOINIR_DEBUG examples + fallback sections
- 1 summary doc: phase82-83-debug-flag-ssot-summary.md
Tests: 970/970 lib PASS, 58/58 normalized_dev PASS
Impact: Dev-only (zero production changes)
2025-12-13 19:01:14 +09:00
d7805e5974
feat(joinir): Phase 213-2 Step 2-2 & 2-3 Data structure extensions
...
Extended PatternPipelineContext and CarrierUpdateInfo for Pattern 3 AST-based generalization.
Changes:
1. PatternPipelineContext:
- Added loop_condition: Option<ASTNode>
- Added loop_body: Option<Vec<ASTNode>>
- Added loop_update_summary: Option<LoopUpdateSummary>
- Updated build_pattern_context() for Pattern 3
2. CarrierUpdateInfo:
- Added then_expr: Option<ASTNode>
- Added else_expr: Option<ASTNode>
- Updated analyze_loop_updates() with None defaults
Status: Phase 213-2 Steps 2-2 & 2-3 complete
Next: Create Pattern3IfAnalyzer to extract if statement and populate update summary
2025-12-10 00:01:53 +09:00
95f3aa429e
refactor(joinir): Extract legacy binding path to routing_legacy_binding.rs
...
Phase 179-A Step 2: Separate LoopFrontendBinding JSON construction logic
into dedicated module for better organization.
Changes:
- New file: routing_legacy_binding.rs (223 lines)
- routing.rs: cf_loop_joinir_impl() simplified to 15 lines (delegates to legacy path)
- Routing now clearly separates pattern-based vs. legacy binding paths
Benefits:
- Clear separation of concerns (pattern router vs. legacy whitelist)
- routing.rs reduced from 364 to 146 lines (60% reduction)
- Legacy path isolated for future deprecation
2025-12-08 18:36:13 +09:00
35f5a48eb0
docs(joinir): Phase 33 Completion - Box Theory Modularization Summary
...
## Phase 33: Complete JoinIR Modularization via Box Theory (3 Phases)
This commit consolidates the comprehensive modularization work across three phases:
- Phase 33-10: Exit Line Modularization (ExitLineReconnector + ExitMetaCollector Boxes)
- Phase 33-11: Quick Wins (Pattern 4 stub clarification, unused imports cleanup)
- Phase 33-12: Large Module Modularization (split mod.rs, loop_patterns.rs restructuring)
### Phase 33-10: Exit Line Modularization (Boxes P0-P1)
**New Files**:
- `exit_line/reconnector.rs` (+130 lines): ExitLineReconnector Box
- Responsibility: Update host variable_map with remapped exit values
- Design: Phase 197-B multi-carrier support (each carrier gets specific remapped value)
- Pure side effects: Only updates builder.variable_map
- Testing: Independent unit testing possible without full merge machinery
- `exit_line/meta_collector.rs` (+102 lines): ExitMetaCollector Box
- Responsibility: Construct exit_bindings from ExitMeta + variable_map lookup
- Design: Pure function philosophy (no side effects except variable_map reads)
- Reusability: Pattern-agnostic (works for Pattern 1, 2, 3, 4)
- Algorithm: For each carrier in exit_meta, lookup host ValueId, create binding
- `exit_line/mod.rs` (+58 lines): ExitLineOrchestrator facade
- Coordination: Orchestrates Phase 6 boundary reconnection
- Architecture: Delegates to ExitLineReconnector (demonstrates Box composition)
- Documentation: Comprehensive header explaining Box Theory modularization benefits
**Modified Files**:
- `merge/mod.rs` (-91 lines): Extracted reconnect_boundary() → ExitLineReconnector
- Made exit_line module public (was mod, now pub mod)
- Phase 6 delegation: Local function call → ExitLineOrchestrator::execute()
- Added exit_bindings' join_exit_values to used_values for remapping (Phase 172-3)
- `patterns/pattern2_with_break.rs` (-20 lines): Uses ExitMetaCollector
- Removed: Manual exit_binding construction loop
- Added: Delegated ExitMetaCollector::collect() for cleaner caller code
- Benefit: Reusable collector for all pattern lowerers (Pattern 1-4)
**Design Philosophy** (Exit Line Module):
Each Box handles one concern:
- ExitLineReconnector: Updates host variable_map with exit values
- ExitMetaCollector: Constructs exit_bindings from ExitMeta
- ExitLineOrchestrator: Orchestrates Phase 6 reconnection
### Phase 33-11: Quick Wins
**Pattern 4 Stub Clarification** (+132 lines):
- Added comprehensive header documentation (106 lines)
- Made `lower()` return explicit error (not silent stub)
- Migration guide: Workarounds using Pattern 1-3
- New file: `docs/development/proposals/phase-195-pattern4.md` (implementation plan)
- Status: Formal documentation that Pattern 4 is deferred to Phase 195
**Cleanup**:
- Removed unused imports via `cargo fix` (-10 lines, 11 files)
- Files affected: generic_case_a/ (5 files), if_merge.rs, if_select.rs, etc.
### Phase 33-12: Large Module Modularization
**New Files** (Modularization):
- `if_lowering_router.rs` (172 lines): If-expression routing
- Extracted from mod.rs lines 201-423
- Routes if-expressions to appropriate JoinIR lowering strategies
- Single responsibility: If expression dispatch
- `loop_pattern_router.rs` (149 lines): Loop pattern routing
- Extracted from mod.rs lines 424-511
- Routes loop patterns to Pattern 1-4 implementations
- Design: Dispatcher pattern for pattern selection
- `loop_patterns/mod.rs` (178 lines): Pattern dispatcher + shared utilities
- Created as coordinator for per-pattern files
- Exports all pattern functions via pub use
- Utilities: Shared logic across pattern lowerers
- `loop_patterns/simple_while.rs` (225 lines): Pattern 1 lowering
- `loop_patterns/with_break.rs` (129 lines): Pattern 2 lowering
- `loop_patterns/with_if_phi.rs` (123 lines): Pattern 3 lowering
- `loop_patterns/with_continue.rs` (129 lines): Pattern 4 stub
**Modified Files** (Refactoring):
- `lowering/mod.rs` (511 → 221 lines, -57%):
- Removed try_lower_if_to_joinir() (223 lines) → if_lowering_router.rs
- Removed try_lower_loop_pattern_to_joinir() (88 lines) → loop_pattern_router.rs
- Result: Cleaner core module with routers handling dispatch
- `loop_patterns.rs` → Re-export wrapper (backward compatibility)
**Result**: Clearer code organization
- Monolithic mod.rs split into focused routers
- Large loop_patterns.rs split into per-pattern files
- Better maintainability and testability
### Phase 33: Comprehensive Documentation
**New Architecture Documentation** (+489 lines):
- File: `docs/development/architecture/phase-33-modularization.md`
- Coverage: All three phases (33-10, 33-11, 33-12)
- Content:
- Box Theory principles applied
- Complete statistics table (commits, files, lines)
- Code quality analysis
- Module structure diagrams
- Design patterns explanation
- Testing strategy
- Future work recommendations
- References to implementation details
**Source Code Comments** (+165 lines):
- `exit_line/mod.rs`: Box Theory modularization context
- `exit_line/reconnector.rs`: Design notes on multi-carrier support
- `exit_line/meta_collector.rs`: Pure function philosophy
- `pattern4_with_continue.rs`: Comprehensive stub documentation + migration paths
- `if_lowering_router.rs`: Modularization context
- `loop_pattern_router.rs`: Pattern dispatch documentation
- `loop_patterns/mod.rs`: Per-pattern structure benefits
**Project Documentation** (+45 lines):
- CLAUDE.md: Phase 33 completion summary + links
- CURRENT_TASK.md: Current state and next phases
### Metrics Summary
**Phase 33 Total Impact**:
- Commits: 5 commits (P0, P1, Quick Wins×2, P2)
- Files Changed: 15 files modified/created
- Lines Added: ~1,500 lines (Boxes + documentation + comments)
- Lines Removed: ~200 lines (monolithic extractions)
- Code Organization: 2 monolithic files → 7 focused modules
- Documentation: 1 comprehensive architecture guide created
**mod.rs Impact** (Phase 33-12 P2):
- Before: 511 lines (monolithic)
- After: 221 lines (dispatcher + utilities)
- Reduction: -57% (290 lines extracted)
**loop_patterns.rs Impact** (Phase 33-12 P2):
- Before: 735 lines (monolithic)
- After: 5 files in loop_patterns/ (178 + 225 + 129 + 123 + 129)
- Improvement: Per-pattern organization
### Box Theory Principles Applied
1. **Single Responsibility**: Each Box handles one concern
- ExitLineReconnector: variable_map updates
- ExitMetaCollector: exit_binding construction
- if_lowering_router: if-expression dispatch
- loop_pattern_router: loop pattern dispatch
- Per-pattern files: Individual pattern lowering
2. **Clear Boundaries**: Public/private visibility enforced
- Boxes have explicit input/output contracts
- Module boundaries clearly defined
- Re-exports for backward compatibility
3. **Replaceability**: Boxes can be swapped/upgraded independently
- ExitLineReconnector can be optimized without affecting ExitMetaCollector
- Per-pattern files can be improved individually
- Router logic decoupled from lowering implementations
4. **Testability**: Smaller modules easier to unit test
- ExitMetaCollector can be tested independently
- ExitLineReconnector mockable with simple boundary
- Pattern lowerers isolated in separate files
### Design Patterns Introduced
1. **Facade Pattern**: ExitLineOrchestrator
- Single-entry point for Phase 6 reconnection
- Hides complexity of multi-step process
- Coordinates ExitLineReconnector + other steps
2. **Dispatcher Pattern**: if_lowering_router + loop_pattern_router
- Centralized routing logic
- Easy to add new strategies
- Separates dispatch from implementation
3. **Pure Function Pattern**: ExitMetaCollector::collect()
- No side effects (except reading variable_map)
- Easy to test, reason about, parallelize
- Reusable across all pattern lowerers
### Testing Strategy
- **Unit Tests**: Can test ExitMetaCollector independently
- **Integration Tests**: Verify boundary reconnection works end-to-end
- **Regression Tests**: Pattern 2 simple loop still passes
- **Backward Compatibility**: All existing imports still work
### Future Work
- **Phase 33-13**: Consolidate whitespace utilities (expected -100 lines)
- **Phase 34**: Extract inline_boundary validators (expected 3h effort)
- **Phase 35**: Mark loop_patterns_old.rs as legacy and remove (Phase 35+)
- **Phase 195**: Implement Pattern 4 (continue) fully
- **Phase 200+**: More complex loop patterns and optimizations
🧱 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-07 04:03:42 +09:00
120fbdb523
fix(mir): Receiver used_values for DCE + trace + cleanup
...
- Fix: Call with Callee::Method now includes receiver in used_values()
- Prevents DCE from eliminating Copy instructions that define receivers
- Pattern 3 (loop_if_phi.hako) now works correctly (sum=9)
- Add: NYASH_DCE_TRACE=1 for debugging eliminated instructions
- Shows which pure instructions DCE removes and from which block
- Cleanup: Consolidate Call used_values to single source of truth
- Early return in methods.rs handles all Call variants
- Removed duplicate match arm (now unreachable!())
- ChatGPT's suggestion for cleaner architecture
- Docs: Phase 166 analysis of inst_meta layer architecture
- Identified CSE pass callee bug (to be fixed next)
- Improvement proposals for CallLikeInst
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-05 23:26:55 +09:00
02c471ccd4
docs(claude.md): Add NYASH_JOINIR_DEBUG env var documentation (Phase 195)
...
Document the new JoinLoopTrace unified tracing system:
- NYASH_JOINIR_DEBUG for routing and block allocation traces
- Example output format with [trace:pattern], [trace:joinir], [trace:blocks]
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-05 22:28:55 +09:00
e1f1ba6427
docs: Add NYASH_TRACE_VARMAP debug guide to MIR debugging section
2025-12-05 22:01:59 +09:00
6f7c2f1f94
docs: Add control_flow modularization to CLAUDE.md
...
- Document 17-module structure with complete directory tree
- Record 50% line reduction achievement (312 → 187 lines in mod.rs)
- List all 7 modularization phases
- Add navigation link to architecture section
- Total module count: 2,129 lines across 17 files
2025-12-05 21:12:47 +09:00
e0a0928d79
docs(CLAUDE.md): Add hako_check usage guide
...
hako_check ツール(Phase 153復活!)の使い方を CLAUDE.md に追加
内容:
- 基本的な使用方法(単発ファイル、ディレクトリ、オプション)
- 実用的な使用例(デッドコード検出、JSON-LSP出力)
- 環境変数制御ガイド(HAKO_CHECK_DEBUG, VERBOSE)
- 検出ルール一覧(HC011, HC012, HC019等)
- 出力例とトラブルシューティング
- 次のステップ(Phase 2-3計画)
セルフホスティング .hako 開発時の品質チェック手段として、
すぐに参照できるように MIRデバッグガイドの直後に配置
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-04 19:24:28 +09:00
11221aec29
docs(claude.md): Add hako_check workflow for .hako development (Phase 153)
...
Added new section "🔍 コード品質チェック - hako_check" after selfhost section:
- 5-step workflow with hako_check examples
- Development flow example (edit → run → check → fix loop)
- Check contents: HC011, HC012, HC019 (dead code detection)
- Value: JoinIR-based, safety net for Phase 160+ migration, instant feedback
Integration with selfhost line creates complete .hako development experience:
1. NYASH_USE_NY_COMPILER=1 for fast iteration
2. ./tools/hako_check.sh --dead-code for quality assurance
3. Full verification loop without cargo build overhead
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-04 14:33:30 +09:00
588129db65
feat(joinir): Phase 34-6 MethodCall 構造と本物の substring 意味論
...
**Phase 34-6 実装完了**: MethodCall 構造を JoinIR に追加し、本物の substring
呼び出しを通すことに成功。
## 主要変更
### 1. MethodCall 構造追加 (34-6.1)
- `src/mir/join_ir/mod.rs`: JoinInst::MethodCall バリアント (+8 lines)
- 構造: `{ dst, receiver, method, args }`
- 設計原則: JoinIR は構造のみ、意味論は MIR レベル
### 2. extract_value 更新 (34-6.2)
- `src/mir/join_ir/frontend/ast_lowerer.rs`: Method 処理本物化 (+37 lines)
- receiver/args を extract_value で再帰処理
- ダミー Const(0) 削除 → 本物の MethodCall 生成
- cond 処理修正: ValueId(0) ハードコード → extract_value で取得
### 3. JoinIR→MIR 変換実装 (34-6.3)
- `src/mir/join_ir_vm_bridge.rs`: MethodCall → BoxCall 変換 (+12 lines)
- `src/mir/join_ir/json.rs`: MethodCall JSON シリアライゼーション (+16 lines)
- `src/mir/join_ir_runner.rs`: MethodCall 未対応エラー (+7 lines)
### 4. テスト更新 (34-6.4)
- `docs/.../fixtures/json_shape_read_value.program.json`: 本物の substring 構造
- `src/tests/joinir_frontend_if_select.rs`: run_joinir_via_vm 使用
- テスト成功: v="hello", at=3 → "hel" ✅
## 成果
- ✅ テスト全通過(1 passed; 0 failed)
- ✅ 設計原則確立: JoinIR = 構造 SSOT、意味論 = MIR レベル
- ✅ Phase 33-10 原則との整合性: Method でも同じ原則適用
**ドキュメント更新**: CURRENT_TASK.md + TASKS.md(Phase 34-6 完了記録)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-27 17:05:46 +09:00
daf4f9af57
docs: CLAUDE.md にセルフホストライン追加
...
- 🔥 セルフホストライン セクション追加
- 環境変数の使い方とコマンド例
- タイムアウト延長、デバッグ出力のオプション
- セルフホストの価値(ビルド不要で爆速開発)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-25 09:30:48 +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
9feb575c47
docs: CLAUDE.md更新 - PHI Option C完了+MIRデバッグガイド追加
...
✅ 現在の開発状況セクション更新(2025-11-20)
- PHI Bug Option C実装ほぼ完了(267/268テストPASS)
- commit 461bdec4の成果サマリー
✅ MIRデバッグ完全ガイド追加(超重要!)
- --dump-mir, NYASH_VM_DUMP_MIR, NYASH_OPTION_C_DEBUG等
- JSON形式解析、決定性テスト手順
- 実践的コマンド集
✅ HashMap非決定性の発見記録
- 根本原因(HashDoS対策のランダムseed)
- 解決策(BTreeSet/BTreeMap)
- 残課題(variable_map)
📖 次回セッションでの即時参照用
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-20 17:12:46 +09:00
6856922374
Phase 25.1a: selfhost builder hotfix (fn rename, docs)
2025-11-15 05:42:32 +09:00
a85045df26
fix(aot): Phase 25 MVP - numeric_core transformation完全動作
...
2つの重大バグを修正してBoxCall→Call変換を実現:
1. nyash.toml: numeric_coreモジュールマッピング追加
- selfhost.llvm.ir.aot_prep.passes.numeric_core パスが解決できなかった
- 224行目に追加してusing解決を修正
2. numeric_core.hako: JSONパース処理の根本修正
- 問題: text.indexOf("{") が全JSONのルート{を検出
- 結果: 全体が1命令として扱われ型検出が完全に破綻
- 修正: op-marker-first パターンに変更
- "op":"..." を先に検出
- lastIndexOf("{") で命令開始を特定
- 各命令を個別に正しく処理
成果:
- 型テーブルサイズ: 1 → 3 (MatI64インスタンス完全検出)
- 変換: BoxCall(MatI64, "mul_naive") → Call("NyNumericMatI64.mul_naive")
- 検証: 全テストパス(単体・E2E・変換・残骸確認)✅
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-15 00:02:13 +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
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
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
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
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
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
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
f4fe548787
feat: Phase 2.4 NyRT→NyKernel Architecture Revolution 100%完了!
...
ChatGPT5 Pro設計分析による42%コード削減の完全実現:
- crates/nyrt → crates/nyash_kernel 完全移行
- with_legacy_vm_args系統11箇所削除(encode/birth/future/invoke系)
- Plugin-First Architecture統一(VM依存根絶)
- libnyash_kernel.a生成成功(0エラー・0警告)
- LLVM統合更新(build_llvm.sh, ny-llvmc対応)
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 12:57:33 +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
a160c186fd
docs: Phase 15.5 Core Box Unification更新&既存システム発見
...
Phase 15.5計画と実装状況を更新:
- CLAUDE.md: Phase 15.5を最新アップデートに追加
- CURRENT_TASK.md: Core Box Unificationを現在のタスクに設定
- 重要な発見: NYASH_USE_PLUGIN_BUILTINS=1が既に完全実装済み
- 環境変数制御システムが src/box_factory/mod.rs に存在
- 新規実装不要、既存機能の活用が鍵と判明
ChatGPTの革命的提案とTask先生の詳細分析により、
3層→2層アーキテクチャ移行の道筋が明確化
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 04:55:55 +09:00
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
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
b7a3e129bd
feat: using system完全実装完了!nyashstdビルトイン名前空間対応
...
✅ 実装内容:
- ビルトイン名前空間解決: nyashstd → builtin:nyashstd
- 自動コード生成: static box群(string/integer/bool/array/console)
- 環境変数デフォルト化: NYASH_ENABLE_USING, NYASH_RESOLVE_FIX_BRACES, NYASH_LLVM_USE_HARNESS
✅ 動作確認:
- パース→解決→読み込み→コード生成の全段階が正常動作
- 環境変数8個→6個に削減(25%改善)
✅ 主要変更:
- src/runner/pipeline.rs: builtin namespace特別処理追加
- src/runner/modes/common_util/resolve/strip.rs: builtin:プレフィックス処理
- src/config/env.rs: 3つの環境変数をデフォルトON化
🎯 次: Mini-VM開発でusing nyashstd活用可能
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 12:39:35 +09:00
bbc581a07f
feat: using ブレース均等解明完了&環境変数簡略化戦略策定
...
🎯 using ブレース均等の正体完全解明:
- SeamInspector.report()のprelude_brace_delta計算を解析
- "static box Main {" より前のブレース{/}バランス検証
- usingシステムでファイル結合時の整合性チェック機能と判明
📝 環境変数地獄(8変数)の簡略化戦略策定:
- Phase 1: NYASH_ENABLE_USING, NYASH_RESOLVE_FIX_BRACESデフォルト化
- Phase 2: PyVM/ny_plugins安定化後の段階的デフォルト化
- Phase 3: デバッグ変数のCLIフラグ化(--debug-pyvm等)
- 理想形: 8変数→0変数(./target/release/nyash program.nyash)
🔧 skip_newlines()削除革命継続:
- TokenCursor v2パーサー実装(nyash_parser_v2.rs新規)
- 既存パーサー拡張版(parser_enhanced.rs)
- Smart advance()とTokenCursorの協調実装
📚 次の課題:
- 環境変数デフォルト化の段階的実装
- using systemの完全安定化
- codex協働でのデバッグ効率化
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 11:58:31 +09:00
9b801de98d
feat: 改行処理革命Phase 1-2完全達成!skip_newlines()根絶成功
...
🎉 skip_newlines()完全根絶達成!
- 削減実績: 48箇所→0箇所(100%削除完了)
- Phase 2-A~2-E: 段階的削除で完全根絶達成
- Smart advance()システム完全動作確認
🧠 技術的成果:
- 深度追跡による括弧内改行自動処理
- match式・オブジェクトリテラル完全対応
- OR pattern複雑パターン完全動作
🔬 副次成果:
- MIR compiler OR pattern bug発見・修正
- exprs_peek.rs全LiteralValue型対応で根治
🚀 革命的効果:
- 保守性向上、開発体験向上、システム安定化
- AI協働による完璧な実装達成
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 11:34:44 +09:00
ad62066172
feat: 改行処理革命Phase 2-B完了 - Box宣言系skip_newlines()完全削除
...
✅ **41%削減達成**: 48→35→21箇所(14箇所削除)
- fields.rs: 9箇所のskip_newlines()削除
- box_definition.rs: 3箇所削除
- static_box.rs: 2箇所削除
✅ **Smart advance()実用化**: 深度追跡で自動改行処理完璧機能
- Box宣言、match式OR、複数行構文すべて対応
- NYASH_SMART_ADVANCE=1で安定動作確認
🔧 **ORパターンバグ同時修正**: exprs_peek.rsでInteger/Boolean型マッチング実装
- 修正前: 1 | 2 => "found" が動作せず(String型のみ)
- 修正後: 全リテラル型(Integer/Bool/Float/Null/Void)完全対応
🎉 **技術的価値**: 手動skip依存→コンテキスト認識自動処理への移行成功
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 11:22:16 +09:00
5eb23f9b4c
feat: 改行処理Phase 1 Smart advance完全実装 - 深度追跡でskip_newlines削減開始
...
✨ Smart advance()による自動改行処理を実装
- depth_tracking.rsで括弧深度(paren/brace/bracket)を自動管理
- 括弧内では改行を自動スキップ、演算子後の行継続も自動判定
- デフォルトで有効化(NYASH_SMART_ADVANCE=0で無効化可能)
♻️ skip_newlines()の段階的削除を開始
- primary.rsのオブジェクトリテラル内8箇所を削除(48→40箇所、17%削減)
- 深度追跡により手動skip_newlines()が不要に
🧪 テスト結果
- 文区切り、演算子行継続、括弧内改行、次行演算子すべて成功
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 10:59:51 +09:00
0012f65f0a
feat: IDENTIFIERキーをデフォルトで有効化 - DX大幅改善!
...
- primary.rs: sugar_level != "basic"でIDENTIFIERキーを許可
- デフォルトで {name: "value"} のようなモダンな構文が使える
- NYASH_SYNTAX_SUGAR_LEVEL=basic で厳密モード(文字列キーのみ)
- 環境変数なしで複数行match式が完全動作
- エラーメッセージも改善(basicモード時に解決方法を提示)
これでPhase 15セルフホスティングの開発が快適に!
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 10:33:26 +09:00
bbde1d3d70
feat: 改行処理Phase 1 TokenCursor基本実装完了
...
- src/parser/cursor.rs: TokenCursor本体実装(230行)
- NewlineMode(Stmt/Expr)による文脈認識改行処理
- ブレース/パーレン/ブラケット深度の自動追跡
- 行継続判定(演算子・カンマ等)
- with_expr_mode/with_stmt_mode によるモード切替
- src/parser/expr_cursor.rs: TokenCursor版式パーサー(250行)
- 実験的実装として式パーサーを TokenCursor対応
- 二項演算子・比較・プライマリ式・オブジェクトリテラル対応
- ビルド成功(warning のみ、エラーなし)
- CLAUDE.md更新: Phase 1実装内容を記載
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 10:24:40 +09:00
75b42bbff5
feat: 改行処理Phase 0 Quick Fix完了 - 複数行match式完全対応
...
- primary.rsに3箇所のskip_newlines()追加(COLON前後、COMMA判定前)
- match_expr.rsのis_object_literal()を改行対応(lookahead改良)
- セミコロンモード確認(NYASH_PARSER_ALLOW_SEMICOLON=1)
- テストケース全て成功(NYASH_SYNTAX_SUGAR_LEVEL=full必須)
- CLAUDE.md更新、改行処理戦略ドキュメント作成済み
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 10:14:53 +09:00
c9e4a1a6e6
fix: ループexit PHI生成を追加し、break後の変数値伝播を修正
...
問題:
- ループexit時のPHI命令が完全に欠落していた
- break後の変数値が初期値に戻ってしまうバグ
- gemini_test_case.nyashで期待値2→実際0が出力
解決:
- LoopBuilderにexit_snapshots追加でbreak時点の変数を収集
- do_break()でスナップショット収集処理を追加
- create_exit_phis()メソッドを新規実装し、exit PHI生成
効果:
- gemini_test_caseが正しく2を出力
- 0回実行、複数break、continue混在すべてのケースで正常動作
- collect_printsのnullエラー解消
テスト済み:
- gemini_test_case.nyash: ✅ 期待値2
- test_loop_zero.nyash: ✅ 期待値42
- test_multi_break.nyash: ✅ 期待値20
- test_continue_break.nyash: ✅ 期待値3
MIR確認:
bb3: %15 = phi [%4, bb1], [%9, bb9]
exit PHIが正しく生成されている
Thanks: ChatGPT Pro for root cause analysis
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 09:48:29 +09:00
fc4c866151
Step 2完了: peek→match完全統一 + 重大PHI命令バグ発見
...
## 🎉 Step 2: peek→match完全統一アーキテクチャクリーンアップ完了
- ✅ 15ファイルで PeekExpr → MatchExpr 一括置換完了
- ✅ lowering/peek.rs → match_expr.rs 完全移行
- ✅ AI理解性・コードベース一貫性・保守性大幅向上
## 🔍 Step 3: 複数行パース問題調査完了
- ✅ Task先生による根本原因特定完了
- 原因: オブジェクトリテラルパーサーの改行スキップ不足
- 修正: src/parser/expr/primary.rs の skip_newlines() 追加
## 🚨 重大発見: PHI命令処理バグ
- 問題: gemini_test_case.nyash で期待値2→実際0
- 原因: フェーズM+M.2のPHI統一作業でループ後変数マージに回帰バグ
- 詳細: PHI命令は正常だが、print時に間違ったPHI参照
- 影響: Phase 15セルフホスティング基盤の重大バグ
## 📝 CLAUDE.md更新
- 全進捗状況の詳細記録
- 次のアクション: ChatGPT相談でMIRビルダー修正戦略立案
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 09:00:07 +09:00
f469b80f0a
feat: match式オブジェクトリテラル判定修正完了 (peek→match統一 Step 1)
...
✅ Step 1完全達成:
- is_object_literal()メソッド追加でmatch式内オブジェクトリテラル対応
- match_token()副作用問題をcurrent_token()で解決
- 3箇所修正: デフォルト・型パターン・リテラルアーム全対応
🧪 動作確認済み:
- 基本match式: ✅ 回帰なし
- オブジェクトリテラル単体: ✅ 正常動作
- 単行match+オブジェクト: ✅ 完全動作
🚀 次段階準備:
- 複数行パース問題発見(後回し決定)
- peek→match完全統一 Step 2開始準備完了
- アーキテクチャクリーンアップによるソースコード美化へ
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 08:18:23 +09:00
09149be41a
feat: フェーズM.2完了 - JSON v0 Bridge層PHI統一でno_phi完全撤廃
...
- strip_phi_functions()削除: 40行の複雑なPHI→edge-copy後処理撤廃
- JSON v0 Bridge 8箇所のno_phi分岐完全削除:
- try_catch.rs: 3箇所統一
- ternary.rs, peek.rs, expr.rs, loop_.rs: 各1-2箇所統一
- config::env::mir_no_phi()大幅簡略化: 40行→8行、phi-legacy依存除去
- 未使用コード削除: PHI_ON_GATED_WARNED static、mir_no_phiフィールド
- 未使用import削除: HashSet、collect_phi_incoming_if_reachable
効果: フェーズM+M.2で推定500行超削減、MIR層PHI完全統一達成
Phase 15セルフホスティング80k→20k行圧縮の主要基盤完成
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 07:41:08 +09:00
96abbf1634
feat: フェーズM実装 - no_phi_mode完全撤廃でPHI一本化達成
...
✅ **コア実装完了**:
- MirBuilder: phi.rs, exprs_peek.rs全no_phi_mode分岐削除
- LoopBuilder: 3箇所のno_phi_mode分岐をPHI命令に統一
- edge_copy関連: insert_edge_copy()メソッド含む数十行削除
⚡ **効果**:
- 数百行削減によりPhase 15の80k→20k圧縮目標に大幅貢献
- 常にPHI命令使用でMIR生成の一貫性向上
- フェーズS制御フロー統一と合わせて設計改善達成
🎯 **次段階**: JSON v0 Bridge対応→collect_prints動作確認
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 07:25:58 +09:00
2e93403de0
phase15: implement Phase S root treatment for break control flow
...
🔧 **Phase S (Immediate Stabilization) Implementation**
- Create control flow utilities module (src/mir/utils/)
- Refactor loop_builder.rs duplicated code to utilities
- Fix PHI incoming predecessor capture per ChatGPT Pro analysis
📊 **AI Collaborative Analysis Complete**
- Task agent: Root cause identification
- Gemini: Strategic 3-phase approach
- codex: Advanced type inference solution (archived)
- ChatGPT Pro: Definitive staged treatment strategy
🗂️ **Documentation & Archive**
- Strategy document: docs/development/strategies/break-control-flow-strategy.md
- codex solutions: archive/codex-solutions/ (100+ lines changes)
- Update CLAUDE.md with 2025-09-23 progress
⚡ **Expected Impact**
- Resolve collect_prints null return issue
- Eliminate code duplication (4 locations unified)
- Foundation for Phase M (PHI unification) and Phase L (BuildOutcome)
🎯 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 07:13:32 +09:00
7ab1e59450
json_native: Import JSON native implementation from feature branch
...
- Added apps/lib/json_native/ directory with complete JSON parser implementation
- Updated CLAUDE.md with JSON native import status and collect_prints investigation
- Added debug traces to mini_vm_core.nyash for collect_prints abnormal termination
- Note: JSON native uses match expressions incompatible with current parser
- Investigation ongoing with Codex for collect_prints method issues
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 04:51:17 +09:00
39f27a348a
Phase 15: using system BOX parser problem completely resolved
...
✅ Major breakthroughs in using system stability:
- Fixed using system brace balance issue with NYASH_RESOLVE_FIX_BRACES=1
- Confirmed ChatGPT's JSON processing unification approach is correct
- Added comprehensive trace debugging for collect_prints method
- Identified collect_prints abnormal termination issue (method executes normally but return trace missing)
🔧 Technical improvements:
- Enhanced trace logging with method entry, loop exit, break conditions
- Documented using system file integration mechanism
- Validated echo/itoa processing works correctly with empty arguments
🎯 Phase 15 progress:
- Main using system parser errors: ✅ RESOLVED
- collect_prints processing: ✅ Functional (echo/itoa working)
- Remaining: investigate return value handling anomaly
Next: Codex investigation of collect_prints return behavior
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 04:10:00 +09:00