3 ms·
Tracing objects in the heap (and/or stack). The GC has to be able to find all the outgoing pointers from any object, and usually the types of the objects pointe
by pcwalton 9y ago
Tracing objects in the heap (and/or stack). The GC has to be able to find all the outgoing pointers from any object, and usually the types of the objects pointed to by those pointers as well. Different language runtimes store objects in memory in different ways.
- crudbug 9y agoI think the interface can provide the semantics - pass by reference or value etc. Which can be standardized. Then it is upto the languages to implement the interface. IMO the languages designers and developers are better off by looking at the GC solution from top-down rather than bottom-up.
- candiodari 9y agoMaybe you should think about what this would mean from the perspective of language designers. That would unearth the main difficulty of such an approach: Every language designer would have to completely redesign it's runtime system just to be able to run on this one backend (in addition to having a new compiler target and linker and debugger and ...). Hoping, of course, that this is possible at all, as many languages have various ways to store pointers to things in memory, which including not storing one at all (ie. pointer arithmetic). Why would they do this ? Why should they do this ? You could simply make the existing runtime libraries run.
- amelius 9y ago> Why would they do this ? Why should they do this ? One answer could be that it would enable multiple languages to interface in a better way, and allow garbage to be collected across language boundaries.