Skip to content
Snippets Groups Projects
Commit 7ab235de authored by Cheng Shao's avatar Cheng Shao :beach:
Browse files

wasm: don't create a wasm global for dyld poison

There's a much more efficient way to convert an unsigned i32 to a
signed one. Thanks, o3-mini-high.

(cherry picked from commit 75fcc5c9)
parent c748e05e
No related branches found
No related tags found
No related merge requests found
......@@ -231,10 +231,7 @@ class DyLD {
// memory access near this address will trap immediately.
//
// In JS API i32 is signed, hence this layer of redirection.
static #poison = new WebAssembly.Global(
{ value: "i32", mutable: false },
0xffffffff - DyLD.#pageSize
).value;
static #poison = (0xffffffff - DyLD.#pageSize) | 0;
// When processing exports, skip the following ones since they're
// generated by wasm-ld.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment