* objects.h (SCM_ENTITY, scm_entity): Removed.
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Wed, 16 Dec 1998 08:06:50 +0000 (08:06 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Wed, 16 Dec 1998 08:06:50 +0000 (08:06 +0000)
(SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0,
SCM_ENTITY_PROC_3): Adjusted for new location of procedure slots.

libguile/objects.h

index 727e293..8f77883 100644 (file)
  * certain class or its subclasses when traversal of the inheritance
  * graph would be too costly.
  */
-#define SCM_CLASS_FLAGS(class) (SCM_STRUCT_DATA (class)[scm_struct_i_tag])
+#define SCM_CLASS_FLAGS(class) (SCM_STRUCT_DATA (class)[scm_struct_i_flags])
 #define SCM_OBJ_CLASS_FLAGS(obj)\
-(SCM_STRUCT_VTABLE_DATA (obj)[scm_struct_i_tag])
+(SCM_STRUCT_VTABLE_DATA (obj)[scm_struct_i_flags])
 #define SCM_SET_CLASS_FLAGS(c, f) (SCM_CLASS_FLAGS (c) |= (f))
 #define SCM_CLEAR_CLASS_FLAGS(c, f) (SCM_CLASS_FLAGS (c) &= ~(f))
 #define SCM_CLASSF_MASK (0xFF << 24)
 
-/* Operator classes need to be identified in the evaluator. */
-#define SCM_CLASSF_OPERATOR    (1L << 30)
-/* Entities also have SCM_CLASSF_OPERATOR set in their vtable. */
-#define SCM_CLASSF_ENTITY      (1L << 29)
+#define SCM_CLASSF_ENTITY      SCM_STRUCTF_ENTITY
+/* Operator classes need to be identified in the evaluator.
+   (Entities also have SCM_CLASSF_OPERATOR set in their vtable.) */
+#define SCM_CLASSF_OPERATOR    (1L << 29)
 
 #define SCM_I_OPERATORP(obj)\
 ((SCM_OBJ_CLASS_FLAGS (obj) & SCM_CLASSF_OPERATOR) != 0)
 
 #define SCM_I_ENTITYP(obj)\
 ((SCM_OBJ_CLASS_FLAGS (obj) & SCM_CLASSF_ENTITY) != 0)
-#define SCM_ENTITY(obj) ((scm_entity*) SCM_STRUCT_DATA (obj))
-#define SCM_ENTITY_PROC_0(obj) (SCM_ENTITY (obj)->proc0)
-#define SCM_ENTITY_PROC_1(obj) (SCM_ENTITY (obj)->proc1)
-#define SCM_ENTITY_PROC_2(obj) (SCM_ENTITY (obj)->proc2)
-#define SCM_ENTITY_PROC_3(obj) (SCM_ENTITY (obj)->proc3)
+#define SCM_ENTITY_PROC_0(obj) (SCM_STRUCT_DATA (obj)[scm_struct_i_proc + 0])
+#define SCM_ENTITY_PROC_1(obj) (SCM_STRUCT_DATA (obj)[scm_struct_i_proc + 1])
+#define SCM_ENTITY_PROC_2(obj) (SCM_STRUCT_DATA (obj)[scm_struct_i_proc + 2])
+#define SCM_ENTITY_PROC_3(obj) (SCM_STRUCT_DATA (obj)[scm_struct_i_proc + 3])
 
 /* {Operator classes}
  *
@@ -158,13 +157,7 @@ struct scm_metaclass_operator {
  *
  * An example of an entity class is the class of generic methods.
  */
-#define SCM_ENTITY_LAYOUT "popopopo"
-typedef struct scm_entity {
-  SCM proc0;
-  SCM proc1;
-  SCM proc2;
-  SCM proc3;
-} scm_entity;
+#define SCM_ENTITY_LAYOUT ""
 
 extern SCM scm_metaclass_standard;
 extern SCM scm_metaclass_operator;