[Top][All Lists]

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

Re: GLOCs are going away.

From: Dirk Herrmann
Subject: Re: GLOCs are going away.
Date: Wed, 25 Jul 2001 14:01:02 +0200 (MEST)

On 24 Jul 2001, Marius Vollmer wrote:

> Hi,
> here is what I plan to do in the near future, just so that you know.
>     - find a tc7 tag for variables so that they are more quickly to
>       identify.
>     - change the evaluator so that evaluating a variable yields its
>       value (setting it sets its value).
>     - memoize global symbols not to glocs but to variables.
>     - remove all code pertaining to glocs.

Hooray!  I very much appreciate this.

>     - 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?  Pairs are
probably very frequent, and I think that speeding up the SCM_CONSP test
would make sense.  This could also help to clean up the tagging system
even further, since tags are designed to allow the recognition of cons
cells based on the object in the pair's CELL_TYPE.

The misuse of SCM_CAR and SCM_CDR for non-pair cells has already been
reduced:  My personal guile runs with SCM_DEBUG_CELL_ACCESSES enabled all
the time, and for all that I use (including the test suite) I don't get
any core dumps.  There _are_ still some uses of SCM_CAR and SCM_CDR for
non-pairs, but if developers compile and run their own code with
SCM_DEBUG_CELL_ACCESSES set to 1 from time to time, we should be able to
extinguish this kind of error quickly.

Further, if the information that a SCM value holds a pair is encoded in
the bits of the SCM value itself, we might use some of the bits in the
pair's cells to realize weak pairs of different flavors.  Two bits are
sufficient to distinguish between *ordinary pairs, *weak-car pairs,
*weak-cdr pairs, *weak-car-cdr pairs.

Best regards,
Dirk Herrmann

reply via email to

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