3 ms·
> Nothing prevents one to implement a GC on top of existing WebAssembly as it is Except that efficient GC implementations use concurrency with a shared memory
by amelius 9y ago
> Nothing prevents one to implement a GC on top of existing WebAssembly as it is
Except that efficient GC implementations use concurrency with a shared memory space and locking and memory-barrier instructions that are not yet available in WASM. (AFAIK, please prove me wrong)
- jfbastien 9y agoCorrect, shared memory and atomics are likely the first big post-MVP feature: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md https://github.com/WebAssembly/threads/blob/master/proposals...
- pjmlp 9y agoThose operations are not available in all hardware architectures anyway, and they surely weren't even common before processors went multi-core. So GC were implemented within those constraints, which means it is possible to do within the current state, even if it isn't the most optimal one versus the availabilities of such CPU features.