fix(jit): harden branch-heavy ARM64 traces#137
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (42)
📝 WalkthroughWalkthroughThis change adds ARM64 branch range validation and relaxation, updates native ABI and spill-frame handling, supports top-level virtual exits, changes partial trace and JIT behavior, and adds related tests, benchmarks, profiler growth, documentation, and constant-comparison safety. ChangesRuntime and control-flow changes
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Interpreter
participant Tracer
participant JITLowerer
participant Assembler
participant ThreadedExecution
Interpreter->>Tracer: Capture entry, loop, or bounded trace
Tracer->>JITLowerer: Return complete or partial trace
JITLowerer->>Assembler: Build native instructions
Assembler->>JITLowerer: Return native code or branch/register error
JITLowerer->>ThreadedExecution: Keep threaded execution on unsupported native code
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #137 +/- ##
==========================================
+ Coverage 45.59% 46.52% +0.93%
==========================================
Files 77 78 +1
Lines 18564 18760 +196
==========================================
+ Hits 8465 8729 +264
+ Misses 9125 9029 -96
- Partials 974 1002 +28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
* fix(jit): harden branch-heavy ARM64 traces * fix: correctness
What changed
Why
Branch-heavy LightGBM-style batch traces could spill an F64 value over the Go return address when control flow skipped spill-frame setup or restoration. Large generated programs also amplified profiler growth and tracer coordination overhead.
Validation
go test -race ./...go vet ./...go test -race -run '^TestInterpreter_JITArraySetAfterBranchyCallsInLoop$' -count=100 ./interpgit diff --checkSummary by CodeRabbit
New Features
Bug Fixes
Documentation