3 ms·
The other issue is that a lot of GC implementations do stuff that's incompatible with asm.js/WASM like inspecting function stacks.
by hackcasual 10y ago
The other issue is that a lot of GC implementations do stuff that's incompatible with asm.js/WASM like inspecting function stacks.
- couchand 10y agoNot entirely incompatible... an implementation could manage the stack explicitly.
- hackcasual 10y agoNot sure what you mean? Libraries like libgc can't be directly ported over to Emscripten since they depend on platform specific behavior to inspect the execution stack and registers. In asm.js/WASM the execution stack is not inspectable from code.
- couchand 10y agoRather than using the execution stack provided by the environment (by using the built-in calling conventions directly), you could manage your stack on the heap using the linear memory facilities. Function calls are a bit more expensive, since now you need a macro to convert calling conventions. But it's definitely not impossible, and it's not even really all that hard (just tedious).