[M3devel] fewer wrappers/more C? (or a wash?)

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Tue Apr 21 14:18:00 CEST 2009


On Mon, Apr 20, 2009 at 08:31:32AM -0700, Mika Nystrom wrote:
> 
> I just wanted to point out that the discussion about X pointers 
> is introducing a large red herring into the discussion about tagged REFANYs.
> 
> The tagged REFANY idea just depends on Modula-3's own heap allocator's
> returning aligned addresses.  If they're not aligned, you can't tag
> the REFANY.  If they are, you can, because the only thing ever held by 
> a REFANY is a Modula-3-heap-allocated address, NIL, or a tagged value.
> 
> X pointers should clearly be passed as ADDRESS, not as REFANY.  Completely
> different issue.

Because Modula 3's reference data structures are subject to the 
Modula 3 garbage collector, and C's are not.  And further, C's 
addresses don't have to be aligned; neither do ADDRESSes.

-- hendrik



More information about the M3devel mailing list