guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 06/07: Remove "redefined" class slot


From: Andy Wingo
Subject: [Guile-commits] 06/07: Remove "redefined" class slot
Date: Thu, 14 Sep 2017 05:10:28 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit 78d587c5e124877c61b0cfab8fbd05e1b46af550
Author: Andy Wingo <address@hidden>
Date:   Thu Sep 14 09:14:29 2017 +0200

    Remove "redefined" class slot
    
    * module/oop/goops.scm (fold-class-slots): Remove "redefined" field from
      class objects.  Redefinable classes are now handled in a layer on top
      of GOOPS core.
---
 module/oop/goops.scm | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/module/oop/goops.scm b/module/oop/goops.scm
index 19e68ad..917367b 100644
--- a/module/oop/goops.scm
+++ b/module/oop/goops.scm
@@ -191,7 +191,6 @@
   (name #:class <protected-hidden-slot>)
   (nfields #:class <hidden-slot>)
   (%reserved #:class <hidden-slot>)
-  (redefined)
   (direct-supers)
   (direct-slots)
   (direct-subclasses)
@@ -327,7 +326,6 @@
       (struct-set! <class> class-index-direct-methods '())
       (struct-set! <class> class-index-cpl '())
       (struct-set! <class> class-index-slots '())
-      (struct-set! <class> class-index-redefined #f)
       <class>)))
 
 ;;;
@@ -437,7 +435,6 @@ followed by its associated value.  If @var{l} does not hold 
a value for
       (struct-set! <slot> class-index-direct-methods '())
       (struct-set! <slot> class-index-cpl (list <slot>))
       (struct-set! <slot> class-index-slots '())
-      (struct-set! <slot> class-index-redefined #f)
       <slot>)))
 
 ;;; Access to slot objects is performance-sensitive for slot-ref, so in
@@ -830,7 +827,6 @@ slots as we go."
     (struct-set! z class-index-direct-supers dsupers)
     (struct-set! z class-index-direct-subclasses '())
     (struct-set! z class-index-direct-methods '())
-    (struct-set! z class-index-redefined #f)
     (let ((cpl (compute-cpl z)))
       (struct-set! z class-index-cpl cpl)
       (when (memq <slot> cpl)
@@ -1030,13 +1026,6 @@ slots as we go."
   "An internal routine to redefine a SMOB class that was added after
 GOOPS was loaded, and on which scm_set_smob_apply installed an apply
 function."
-  ;; Why not use class-redefinition?  We would, except that loading the
-  ;; compiler to compile effective methods can happen while GOOPS has
-  ;; only been partially loaded, and loading the compiler might cause
-  ;; SMOB types to be defined that need this facility.  Instead we make
-  ;; a very specific hack, not a general solution.  Probably the right
-  ;; solution is to avoid using the compiler, but that is another kettle
-  ;; of fish.
   (unless (memq <applicable> (class-precedence-list class))
     (unless (null? (class-slots class))
       (error "SMOB object has slots?"))
@@ -2695,7 +2684,6 @@ var{initargs}."
                (get-keyword #:dsupers initargs '()))
   (struct-set! class class-index-direct-subclasses '())
   (struct-set! class class-index-direct-methods '())
-  (struct-set! class class-index-redefined #f)
   (struct-set! class class-index-cpl (compute-cpl class))
   (when (get-keyword #:static-slot-allocation? initargs #f)
     (match (filter class-has-statically-allocated-slots?



reply via email to

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