3 ms·
Not entirely incompatible... an implementation could manage the stack explicitly.
by couchand 10y ago
Not 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).