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: struct interface


Jost Boekemeier <jostobfe@calvados.zrz.TU-Berlin.DE> writes:

> Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> 
> > BTW, with the new record representation I of course mean the same
> > thing as the new low-level representation of GOOPS objects, or a
> > superset of it.
> 
> 
> Any  proposal how it should look like?

Michael is the expert here.  He has come closest to a proposal.  He
has a draft of a proposal, but that might be a bit outdated by now,
since it needs some adaptation to GOOPS.

Here are the basic ideas:



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]