You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thread the measured LdaSmi8; Shr Int32 successor inside Lantern's existing merged Smi-load handler.
Preserve the ordinary Shr handler as the sole non-Int32 coercion, re-entry, BigInt, and exception path.
Keep bytecode and both JIT tiers unchanged while preserving logical opcode/pair/trigram telemetry.
Add adversarial fast/slow-path tests and record the telemetry, native-size, and A/B retention evidence.
Why
Crypto executes 4,646,114 LdaSmi8 -> Shr pairs (5.175% of its 89,774,038 logical instructions). A temporary eligibility probe found 4,645,838 Int32 hits and only 276 declines (99.994% eligible). Splay executes 2,084,482 compact Smi loads but no matching successors, so ordinary decode remains the hinted fallthrough.
60+60 targeted Crypto: 0.9484x; Splay, DeltaBlue, and arith_loop controls remained within the 2% gate.
Logical telemetry is identical after normalizing only direct-transfers; the counter rises by exactly 4,645,838.
Native cost: +52 bytes in runFrames, +48 bytes in Mach-O __TEXT.
The pinned x86_64 bench host was unreachable for three SSH attempts, so the retained wall-time evidence is explicitly role-swapped arm64. Local spreads make sub-percent controls directional; the targeted and compute-six Crypto estimates agree on the material win.
Validation
zig build test-fast
zig build test-fast -Dbytecode-stats=true -Dtest-filter='smi8 shr direct threading'
right-shift test262 baseline/candidate parity: 36 pass / 1 known fail, including candidate --gc-threshold=1
guarded non-cached full main test262: 48,653 pass / 1,324 known fail, no guard failure
Three independent final reviews covered runtime/GC/IP safety, test completeness, and benchmark arithmetic/provenance; all returned no actionable findings.
Three independent subagent reviews covered the published d342e53e diff:
Runtime / host safety: no findings. Bounds, IP advancement, noncommutative operand order, signed-shift semantics, non-Int32 fallback, JS re-entry/GC/exception behavior, logical stats, and unchanged JIT bytecode/deopt behavior are sound.
Tests: no findings. Coverage pins fast-path execution, exact telemetry, modulo-32 signed shifts, duplicate-execution avoidance, width/successor exclusions, Double/object/BigInt fallback, forced GC, and caught coercion throws.
Performance evidence / docs: no findings. All percentages, neutral ratios, geometric mean, targeted controls, transfer counts, native-size deltas, provenance, and noise caveats were independently recomputed.
CI is green 34/34, including both hosted unit suites, full conformance/RSS, Bistromath and Ohaimark differentials, every GC-stress partition, cross-builds, WASM spec tests, formatting, actionlint, and CodeQL.
The first standalone zig build wasm attempt hit the job's exact 15-minute ceiling with no compiler diagnostic; its isolated retry passed in 13m57s. Fifteen adjacent pre-PR runs put successful builds at 10m24s–13m55s (median ~12m53s, mean 12m33s, roughly one-minute standard deviation), and a prior exact-main run had the same timeout pattern. Review verdict: this is insufficient CI headroom, not a candidate-specific retention blocker. Keep the current native-proven source shape; raise that job's timeout to 20 minutes in a separate follow-up.
Verdict: no actionable findings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LdaSmi8; ShrInt32 successor inside Lantern's existing merged Smi-load handler.Shrhandler as the sole non-Int32 coercion, re-entry, BigInt, and exception path.Why
Crypto executes 4,646,114
LdaSmi8 -> Shrpairs (5.175% of its 89,774,038 logical instructions). A temporary eligibility probe found 4,645,838 Int32 hits and only 276 declines (99.994% eligible). Splay executes 2,084,482 compact Smi loads but no matching successors, so ordinary decode remains the hinted fallthrough.Performance
arith_loopcontrols remained within the 2% gate.direct-transfers; the counter rises by exactly 4,645,838.runFrames, +48 bytes in Mach-O__TEXT.The pinned x86_64 bench host was unreachable for three SSH attempts, so the retained wall-time evidence is explicitly role-swapped arm64. Local spreads make sub-percent controls directional; the targeted and compute-six Crypto estimates agree on the material win.
Validation
zig build test-fastzig build test-fast -Dbytecode-stats=true -Dtest-filter='smi8 shr direct threading'--gc-threshold=1zig fmt --check src/runtime/lantern/interpreter.zig src/runtime/lantern/tests.ziggit diff --checkThree independent final reviews covered runtime/GC/IP safety, test completeness, and benchmark arithmetic/provenance; all returned no actionable findings.