nyash-codex
0d41970313
feat(phase21.5): strlen FAST EXE + loop JSONFrag diagnostics
## Task A: emit v0 boxcall (bin version) ✅
- Fix: emit_mir_json_for_harness_bin now handles I::Call with Callee::Method
- Added: Proper v0 boxcall emission when NYASH_MIR_UNIFIED_CALL=0
- Location: src/runner/mir_json_emit.rs:641-707
- Test: emit_boxcall_length_canary_vm.sh → PASS
## Task B: strlen FAST EXE (AOT without plugin) ✅
- Fix: FAST lowering now tracks newbox(StringBox) creation
- Added: newbox_string_args fallback in boxcall.py (lines 133-143)
- Added: StringBox tracking in newbox.py (lines 82-91)
- Benefit: EXE can compute string.length() without StringBox plugin
- Test: s3_backend_selector_crate_exe_strlen_fast_canary_vm.sh → PASS (rc=5)
## Task 1: selfhost-first Diagnostic Logging ✅
- Added: HAKO_SELFHOST_TRACE=1 outputs Program JSON stats
- Added: HAKO_SELFHOST_NO_DELEGATE=1 shows detailed failure logs
- Added: [builder/selfhost-first:fail:*] markers + last 80 lines
- Location: tools/hakorune_emit_mir.sh:try_selfhost_builder()
## Task 2: loop JsonFrag Hit Rate Improvement ✅
- Added: FORCE=1 fallback for non-Lt comparison operators
- Added: find_any_local_int_before() fallback when strict fails
- Location: lang/src/mir/builder/internal/lower_loop_simple_box.hako
- Benefit: Higher JSONFrag hit rate under HAKO_MIR_BUILDER_LOOP_FORCE_JSONFRAG=1
## Task 3: crate EXE Failure Diagnostics ✅
- Added: LLVM IR dump on build failure (first 120 lines)
- Added: Build error log capture (last 40 lines)
- Location: tools/smokes/v2/profiles/quick/core/phase2100/stageb_loop_jsonfrag_crate_exe_canary_vm.sh
## Test Results
- emit_boxcall_length: PASS ✅
- strlen_fast (FAST=1): PASS (rc=5) ✅
- loop_jsonfrag: SKIP (diagnostic enhanced) ⚠️
## Implementation Principles
- 既定挙動不変 (Default unchanged)
- Dev toggle guarded (FAST=1, FORCE=1, TRACE=1, NO_DELEGATE=1)
- Minimal diff, easy rollback
- Clear failure diagnostics for future fixes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 05:50:23 +09:00
..
2025-11-10 19:42:42 +09:00
2025-11-04 16:33:04 +09:00
2025-11-08 15:59:50 +09:00
2025-11-11 05:50:23 +09:00
2025-11-04 16:33:04 +09:00
2025-11-04 16:33:04 +09:00
2025-11-04 16:33:04 +09:00
2025-10-31 20:45:46 +09:00
2025-11-10 23:17:46 +09:00
2025-10-31 20:45:46 +09:00
2025-11-09 15:11:18 +09:00
2025-11-10 19:42:42 +09:00
2025-10-31 20:45:46 +09:00