3 ms·
I think the difficulty of implementing GC would be the lack of access to stack primitives, something that would be impossible to provide in a way that was backw
by stormbrew 14y ago
I think the difficulty of implementing GC would be the lack of access to stack primitives, something that would be impossible to provide in a way that was backward compatible.
By that I mean the ability to inspect the stack and determine the values present there and determine whether or not they point to 'heap' allocated memory.
- EwanToo 14y agoFrom the asm FAQ, it seems like GC will happen: Q. Can asm.js serve as a VM for managed languages, like the JVM or CLR? A. Right now, asm.js has no direct access to garbage-collected data; an asm.js program can only interact indirectly with external data via numeric handles. In future versions we intend to introduce garbage collection and structured data based on the ES6 structured binary data API, which will make asm.js an even better target for managed languages.
- stormbrew 14y agoI took that to be actually talking about the other way around -- accessing JS GC'd objects from the asm.js code's heap and having it work correctly (which is currently onerous). I don't think that helps implement GC of the asm.js heap.
- deleted 14y ago[deleted]