Skip to content
Snippets Groups Projects
Commit 57e63068 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 74424ceb
No related branches found
No related tags found
No related merge requests found
...@@ -231,10 +231,7 @@ class DyLD { ...@@ -231,10 +231,7 @@ class DyLD {
// memory access near this address will trap immediately. // memory access near this address will trap immediately.
// //
// In JS API i32 is signed, hence this layer of redirection. // In JS API i32 is signed, hence this layer of redirection.
static #poison = new WebAssembly.Global( static #poison = (0xffffffff - DyLD.#pageSize) | 0;
{ value: "i32", mutable: false },
0xffffffff - DyLD.#pageSize
).value;
// When processing exports, skip the following ones since they're // When processing exports, skip the following ones since they're
// generated by wasm-ld. // 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