guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 41/87: Remove TEST_CHANGE_CLASS


From: Andy Wingo
Subject: [Guile-commits] 41/87: Remove TEST_CHANGE_CLASS
Date: Thu, 22 Jan 2015 17:29:55 +0000

wingo pushed a commit to branch wip-goops-refactor
in repository guile.

commit 3e220aeca983221e2f451b892cc192866179a45e
Author: Andy Wingo <address@hidden>
Date:   Sat Jan 10 00:55:44 2015 +0100

    Remove TEST_CHANGE_CLASS
    
    * libguile/goops.c (TEST_CHANGE_CLASS): Remove unused macro and comment.
---
 libguile/goops.c |   30 ------------------------------
 1 files changed, 0 insertions(+), 30 deletions(-)

diff --git a/libguile/goops.c b/libguile/goops.c
index c0f1de8..95b3bc2 100644
--- a/libguile/goops.c
+++ b/libguile/goops.c
@@ -91,41 +91,11 @@ static SCM var_slot_bound_p = SCM_BOOL_F;
 static SCM var_slot_exists_p = SCM_BOOL_F;
 
 
-SCM_SYMBOL (sym_slot_unbound, "slot-unbound");
-SCM_SYMBOL (sym_slot_missing, "slot-missing");
 SCM_SYMBOL (sym_change_class, "change-class");
 
 SCM_VARIABLE (scm_var_make_extended_generic, "make-extended-generic");
 
 
-/* Class redefinition protocol:
-
-   A class is represented by a heap header h1 which points to a
-   malloc:ed memory block m1.
-
-   When a new version of a class is created, a new header h2 and
-   memory block m2 are allocated.  The headers h1 and h2 then switch
-   pointers so that h1 refers to m2 and h2 to m1.  In this way, names
-   bound to h1 will point to the new class at the same time as h2 will
-   be a handle which the GC will use to free m1.
-
-   The `redefined' slot of m1 will be set to point to h1.  An old
-   instance will have its class pointer (the CAR of the heap header)
-   pointing to m1.  The non-immediate `redefined'-slot in m1 indicates
-   the class modification and the new class pointer can be found via
-   h1.
-*/
-
-#define TEST_CHANGE_CLASS(obj, class)                                 \
-       {                                                              \
-         class = SCM_CLASS_OF (obj);                                  \
-          if (scm_is_true (SCM_OBJ_CLASS_REDEF (obj)))                \
-           {                                                          \
-             scm_change_object_class (obj, class, SCM_OBJ_CLASS_REDEF (obj));\
-             class = SCM_CLASS_OF (obj);                              \
-           }                                                          \
-       }
-
 #define SCM_GOOPS_UNBOUND SCM_UNBOUND
 #define SCM_GOOPS_UNBOUNDP(x) (scm_is_eq (x, SCM_GOOPS_UNBOUND))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]