Reading Gauche/Reading Gauche 0.9/gauche.h/ScmClass の変更点

 *ScmClass [#o6239bca]
 *概要 [#c467fd1a]
  %% gauche.h
  typedef struct ScmClassRec ScmClass;
  /* 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 {
         double align_dummy;
     } classHdr;
 8-byte な境界整列に対応するための実装と思われます。
      ScmClassPrintProc     print;
      ScmClassCompareProc   compare;
      ScmClassSerializeProc serialize;
      ScmClassAllocateProc  allocate;
      ScmClass **cpa;             /* class precedence array, NULL terminated */
      int numInstanceSlots;       /* # of instance slots */
      int coreSize;               /* size of core structure; 0 == unknown */
 --ビルトインクラス, ベースクラス, ...
      unsigned int flags;
      ScmObj name;                /* scheme name */
      ScmObj directSupers;        /* list of classes */
      ScmObj cpl;                 /* list of classes */
      ScmObj accessors;           /* alist of slot-name & slot-accessor */
      ScmObj directSlots;         /* alist of slot-name & slot-definition */
      ScmObj slots;               /* alist of slot-name & slot-definition */
      ScmObj directSubclasses;    /* list of direct subclasses */
      ScmObj directMethods;       /* list of methods that has this class in
                                     its specializer */
      ScmObj initargs;            /* saved key-value list for redefinition */
      ScmObj modules;             /* modules where this class is defined */
      ScmObj redefined;           /* if this class is obsoleted by class
                                     redefinition, points to the new class.
                                     if this class is being redefined, points
                                     to a thread that is handling the
                                     redefinition.  (it won't be seen by
                                     Scheme; see class.c)
                                     otherwise #f */
      ScmInternalMutex mutex;     /* to protect from MT hazard */
      ScmInternalCond cv;         /* wait on this while a class being updated */
      void   *data;               /* extra data to do nasty trick */
 *調べるもの [#d990d318]
 -[[Reading Gauche/Reading Gauche 0.9/gauche.h/SCM_INSTANCE_HEADER]]
 -[[Reading Gauche/Reading Gauche 0.9/gauche.h/ScmClassPrintProc]]
 -[[Reading Gauche/Reading Gauche 0.9/gauche.h/ScmClassCompareProc]]
 -[[Reading Gauche/Reading Gauche 0.9/gauche.h/ScmClassSerializeProc]]
 -[[Reading Gauche/Reading Gauche 0.9/gauche.h/ScmClassAllocateProc]]
 -[[Reading Gauche/Reading Gauche 0.9/gauche.h/ScmObj]]
 --[[Reading Gauche/Reading Gauche 0.9/gauche/pthread.h/ScmInternalMutex]]
 --[[Reading Gauche/Reading Gauche 0.9/gauche/uthread.h/ScmInternalMutex]]
 --[[Reading Gauche/Reading Gauche 0.9/gauche/pthread.h/ScmInternalCond]]
 --[[Reading Gauche/Reading Gauche 0.9/gauche/uthread.h/ScmInternalCond]]
 *参照元 [#w9b2ed2b]
 *コメント [#n7e720ea]

リロード   新規 編集 差分 添付 複製 改名   トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS

Modified by mona
PukiWiki 1.4.6 Copyright © 2001-2005 PukiWiki Developers Team. License is GPL.
Based on "PukiWiki" 1.3 by yu-ji
Powered by PHP 5.2.17
HTML convert time to 0.004 sec.