JIT Exception Handling
7 sections
Overview
Fix remaining LLVM codegen bugs exposed by the unified invoke/landingpad exception handling architecture (now fully implemented). The core architectural work (Sections 01-03) is complete: ori_panic uses _Unwind_RaiseException, JIT test wrappers use two-layer invoke/landingpad, InvokeIndirect terminators exist in ARC IR and LLVM emission, short-circuit &&/|| is branch-based, and the evaluator uses direct calls with did_panic(). The remaining work is fixing LLVM codegen bugs exposed by the expanded test coverage (Section 04) and running full verification (Section 05).
Completed
7 sections
Runtime Panic Path
ori_panic/ori_panic_cstr always use _Unwind_RaiseException; JIT test wrappers catch panics via landingpad
ARC IR InvokeIndirect & Short-Circuit
Closure calls inside catch(expr:) use InvokeIndirect terminator; && and || use branch-based short-circuit lowering
LLVM Emission & Test Wrappers
JIT test wrappers use invoke/landingpad catch-all; InvokeIndirect emits LLVM invoke; void-return Apply defines dst
Exposed Bug Fixes
Fix LLVM codegen bugs exposed by the expanded JIT test coverage
Polymorphic Lambda Monomorphization
Polymorphic lambda bodies compile through LLVM with concrete types — lambda-specific LCFails resolved
Verification
Full test suite green, dual-execution parity verified, zero regressions
LCFail Resolution — BUG-04-030/031/032/033
Reduce LLVM spec test LCFails from 2656 toward zero by fixing all known codegen root causes