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
fix(bindgen): register p3 global table-map intrinsics before per-table assignments
When `Instantiator::instantiate` emits `STREAM_TABLES[N] = …`,
`FUTURE_TABLES[N] = …`, and `ERR_CTX_TABLES[N] = …` lines, it currently
calls `Intrinsic::…::Global…TableMap.name()` directly to get the
identifier string. That bypasses `Bindgen::intrinsic()` and therefore
never inserts the intrinsic into `all_intrinsics`, so the corresponding
render branch (which emits the `const STREAM_TABLES = {};` etc.
declarations) never runs.
For any wasip3-async component with stream/future/err-ctx tables,
the transpiled module then references undeclared identifiers and
fails at module evaluation time:
ReferenceError: STREAM_TABLES is not defined
at line 4554, ‹entry›.js
Route the name lookup through `self.bindgen.intrinsic(…)` so the
declaration is emitted alongside the assignments, and guard each block
on `is_empty()` so we don't register intrinsics nobody uses.
Reproducer: any act:tools/tool-provider component built with
wasip3-async (e.g. `ghcr.io/actpkg/time:0.2.0`) transpiled via
`jco transpile … --async-mode jspi`.
Signed-off-by: Alexander Shishenko <alex@shishenko.com>
0 commit comments