タグ

情報投入中。pattern variable って何だ。
てか、クラスタグのあたりで道に迷ってたりします。とりあえず下書きベースで保存した後で調べてる弱さっぷり。
grep したら gauche.h で以下な記述あり。

./gauche.h:   (That is, we can safely take SCM_OBJ(obj)->tag) */
./gauche.h:#define SCM_HTAG(obj)    (SCM_WORD(SCM_OBJ(obj)->tag)&7)
./gauche.h:# define SCM_CLASS_OF(obj)      SCM_CLASS((SCM_OBJ(obj)->tag - 7))
./gauche.h:# define SCM_SET_CLASS(obj, k)  (SCM_OBJ(obj)->tag = (ScmByte*)(k) + 7)
./gauche.h:    (SCM_HPTRP(obj)&&(SCM_OBJ(obj)->tag == SCM_CLASS2TAG(klass)))
./gauche.h:# define SCM_CLASS_OF(obj)      (*(ScmClass**)((SCM_OBJ(obj)->tag - 7)))
./gauche.h:# define SCM_SET_CLASS(obj, k)  (SCM_OBJ(obj)->tag = (ScmByte*)((k)->classPtr) + 7)

ええと、なんで 3-bit で境界整列かとゆーと、Boehm GC の関係が云々、って ScmClassRec 構造体の定義らへんに記述あり。

/* See class.c for the description of function pointer members.
   There's a lot of voodoo magic in class structure, so don't touch
   those fields casually.  Also, the order of these fields must be
   reflected to the class definition macros below. */
struct ScmClassRec {
    /* We need all class structures be aligned on (at least) 8-byte boundary
       to make our tagging scheme work.  Dynamically allocated objects
       are *always* 8-byte aligned due to Boehm GC's architecture.  However,
       we found that statically allocated class structures can be placed
       4-byte boundary on some 32bit systems if we started ScmClassRec
       with SCM_INSTANCE_HEADER.  The following union is the trick
       to ensure 8-byte alighment on such systems. */ 
    union {
        SCM_INSTANCE_HEADER;
        double align_dummy;
    } classHdr;

_Dynamically allocated objects are *always* 8-byte aligned due to Boehm GC's architecture._との事ですが、しかしながら云々、って記述もあるな。
とりあえず今日は限界ッス。