This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GOOPS obj representation & arithmetic (Re: Dump float support?)


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]