From: Eun-Sun Cho
Subject: object layout
Date: 
Message-ID: <4a3upk$8r@sun330.snu.ac.kr>
Hello.

I'm trying to design CLOS binding for an OODB these days.
But I found that it's necessary to know about the LISP (CLOS) object layout firs

So, I tried to get any information from LISP or CLOS books, but failed.

If anyone has any idea about them, would you let me know(as soon as possible)?
Any references will be appreciated.

Thanks in advance.




	EUNSUN

============================================================
     E      Eun-Sun Chough
   S U N    Computer Science Dept.
     N      Seoul National Univ.  Korea.

   e-mail : ········@candy.snu.ac.kr
============================================================
From: Ken Anderson
Subject: Re: object layout
Date: 
Message-ID: <KANDERSO.95Dec11101624@lager.bbn.com>
In article <·········@sun330.snu.ac.kr> ········@candy.snu.ac.kr (Eun-Sun Cho) writes:

  
  I'm trying to design CLOS binding for an OODB these days.
  But I found that it's necessary to know about the LISP (CLOS) object layout firs
  
  So, I tried to get any information from LISP or CLOS books, but failed.
  
  If anyone has any idea about them, would you let me know(as soon as possible)?
  Any references will be appreciated.
  
You'll have to poke around in your Lisp.  FOr example, macroexpanding and
disassembling a defmethod with a SLOT-VALUE of an :INSTANCE allocated slot.
Typically, a CLOS instance has a two level structure, something like this:

(defstruct instance
 wrapper
 slots)

where wrapper contains information about the class and slots is a vector of
instance allocated slots.  It is likely that your Lisp will have primitives
for accessing these piece.  The order of slots in the slot vector is
tyically the same order as given by CLASS-SLOTS (or the reverse).  The
wrapper may provide a hint here.

I may be able to provide more details for Lucid, Allegro, and MCL.

k