feat(joinir): Phase 45-46 read_quoted_from IfMerge implementation
Phase 45: read_quoted_from JoinIR Frontend/Bridge
- Implement lower_read_quoted_pattern() for Guard if + Loop with break + accumulator pattern
- Add T1-T4 Route B E2E tests (all PASS)
- Create phase45_read_quoted_fixture.hako for Route A testing
Phase 46: IfMerge extension for loop-internal if-body reassignment
- Add escape handling: if ch == "\\" { i = i+1; ch = s.substring(...) }
- Use IfMerge to merge i and ch after if-body (speculative execution)
- T5 PASS: "a\"b" → 'a"b' (escape handling works!)
Dev flags:
- HAKO_JOINIR_READ_QUOTED=1: Enable Phase 45 JoinIR route
- HAKO_JOINIR_READ_QUOTED_IFMERGE=1: Enable Phase 46 IfMerge escape handling
Test results (Route B):
- T1: "abc" → 'abc' ✅
- T2: "" → '' ✅
- T3: abc → '' ✅
- T4: xx"def" → 'def' ✅
- T5: "a\"b" → 'a"b' ✅
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -170,8 +170,7 @@ impl<'a> PhiMergeHelper<'a> {
|
||||
else_map_end_opt,
|
||||
);
|
||||
|
||||
conservative.trace_if_enabled(pre_if_snapshot, then_map_end, else_map_end_opt);
|
||||
|
||||
// Phase 42: trace_if_enabled 削除(下の trace_conservative と重複していたため)
|
||||
let trace_conservative = std::env::var("NYASH_CONSERVATIVE_PHI_TRACE")
|
||||
.ok()
|
||||
.as_deref()
|
||||
|
||||
Reference in New Issue
Block a user