D, Java? To D or not to D?

Walter Bright newshound at digitalmars.com
Fri Jan 5 20:15:06 PST 2007


Frits van Bommel wrote:
> How would you implement a garbage collector in an 
> architecture-independent way?
> 
> Or are you talking about using version(arch_1) to version(arch_N)? [1]
> Because I'm pretty sure the garbage collector has to know some 
> architecture-specific things. Start of stack, direction of stack, 
> location of static data, threading API (if any), that sort of thing.
> So you'd need to perform at least _some_ porting to get it to run on a 
> new architecture, if only to tell the GC what its properties are.

The runtime system would have to be ported, just like the Java VM has to 
be ported, before the code will run. The GC is part of the runtime system.



More information about the Digitalmars-d mailing list