Stream: git-wasmtime

Topic: wasmtime / PR #13910 cranelift: drop the call_indirect nu...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 20 2026 at 21:34):

matthargett opened PR #13910 from rebeckerspecialties:call-indirect-null-elision to bytecodealliance:main:

Stacked on #13445 and #13909 — only the last commit here is new. It builds on the sig-check PR because the null-slot analysis extends the same Module::static_funcref_image proof, and the elision is wired through the same StaticMatch path.

What this does

After the table-entry load, call_indirect checks that the loaded function reference isn't null before calling through it. This PR drops that check when the table's static image proves no in-bounds slot can ever be null.

The proof lives in a new Module::table_never_contains_null helper and requires, on top of the static image from the sig-check PR (immutable table, fully precomputed contents, no element segments deferred to instantiation):

The bounds check is unaffected: an out-of-bounds index still traps as before.

Where this matters

Native backends with signals-based traps already get the null check nearly for free — it's trap metadata on the code-pointer load, not an extra instruction — so this mostly changes configurations that emit explicit checks: interpreters (Pulley, the motivating case) and signals_based_traps(false) embeddings, where it removes a dispatched branch per call.

Tests

view this post on Zulip Wasmtime GitHub notifications bot (Jul 20 2026 at 21:43):

matthargett updated PR #13910.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 20 2026 at 23:03):

github-actions[bot] added the label wasmtime:api on PR #13910.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 03:47):

:cross_mark: matthargett closed without merge PR #13910.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 03:47):

matthargett commented on PR #13910:

Per the discussion on #13445 , this work stream (and the product goal it supports) isn't a good match for the wasmtime project. Closing.


Last updated: Jul 29 2026 at 05:03 UTC