guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GLOCs are going away.


From: Marius Vollmer
Subject: Re: GLOCs are going away.
Date: 26 Jul 2001 00:31:20 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102

Dirk Herrmann <address@hidden> writes:

> On 24 Jul 2001, Marius Vollmer wrote:
> 
> >     - remove all code pertaining to glocs.
> 
> Hooray!  I very much appreciate this.

Yeah, feels good doing cleanups... but it's not so much the glocs,
it's the overloading of the "001" tag with both glocs and structs.
 
> >     - remove the vcell-slot-hack from structures and the klugy code to
> >       tell structures from glocs.
> > 
> >     - think about the tags of structures and maybe clean them up as
> >       well (that is, find them a proper tc3 tag, if they don't already
> >       have one).
> 
> Hmmm.  Maybe we should think of a different solution:  Why not use a tc7
> tag or smob for structures, and instead use the tc3 tag, which is
> currently used for glocs and structures, for pairs instead?

I think structs should keep their tc3 tag, for now.  This allows them
to store the vtable in the car (together with the tag), which is quite
compact and allows for quick type tests (for exact type matches,
subtyping is more expensive, hmm).

In any case, the tc3 tag of structs couldn't just be used for pairs.
The even tc3 tags are for immediates and in the pointer for
non-immediates, the odd tc3 tags are in the car of cells.  The struct
tag is odd, and thus can't be used to tag pointers to non-immediates
(i.e. pairs).

We could swap the head-address tag 000, and the immediates tag 100,
for example (or reorganize the tc3 tags more generally).  With this
change, accesses to cells will have to subtract 100 from the pointer.
This might make a difference for offset 0, which is used very often.

While this might be possible (and might have the potential for
speeding up fixnum arithmetic in return), I don't want to do it in the
context of the gloc cleanup...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]