logoalt Hacker News

cogman10yesterday at 10:15 PM1 replyview on HN

Oh interesting.

In java land the fact that you effectively don't have pointers but rather everything is an object reference, this ends up not being an issue.

I wonder if the WASM limitation is related to the fact that JavaScript has pretty similar semantics with no real concept of a "pointer". It means to get that interior pointer, you'd need to also introduce that concept into the GC of browsers which might be a bit harder since it'd only be for WASM.


Replies

Rohansitoday at 3:21 AM

Object references are pointers. WasmGC only supports pointers which point to the start of an object. However, some languages have features which require pointers that point inside of an object while still keeping that object alive.

Limiting WASM to what is capable in JavaScript is quite a silly thing to do. But at the same time there are vastly different GC requirements between runtimes so it's a challenging issue. Interior pointers is only one issue!