This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: GOOPS obj representation & arithmetic (Re: Dump float support?)
- To: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Subject: Re: GOOPS obj representation & arithmetic (Re: Dump float support?)
- From: Michael Livshin <mlivshin at bigfoot dot com>
- Date: 14 Mar 2000 13:10:23 +0200
- Cc: Marius Vollmer <mvo at zagadka dot ping dot de>, guile at sourceware dot cygnus dot com, djurfeldt at nada dot kth dot se
- Organization: who? me?
- References: <E12UWVe-0006CK-00@mdj.nada.kth.se> <87r9dewtvo.fsf@zagadka.ping.de> <xy7r9deo27n.fsf_-_@mdj.nada.kth.se>
Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> 2. Replace GOOPS low-level representation
> (structs --> something different)
>
> Michael Livshin has thought much more than I on this, but something
> like this could be reasonable:
>
> A GOOPS object is a double-word cell:
>
> WORD 0: tc7 type tag + 25 GOOPS class flags (used for fast protocols)
> WORD 1: pointer to class data (malloc for class object)
> WORD 2: pointer to data (malloc for object)
> WORD 3: optional; some classes of objects don't need this filled in
> (note that initializing object headers also takes time)
this is almost exactly what I had in mind, actually. just be sure to
reserve 2 flag bits in WORD 0 so that all the possible uses of WORD 3
can be told from one another.
the possible uses are:
* containing object, for indirect objects
* freeing function, for foreign objects
maybe some more...
--
Entropy isn't what it used to be.