mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-23 13:00:34 +02:00
* goops.scm (compute-getter-method): For custom getter: Check
boundness even if there is an init-thunk. (The getter can return #<unbound> even if the slot has been set before.) * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of scm_at_assert_bound_ref. (We don't want the unbound check. See oop/goops/active-slot.scm.)
This commit is contained in:
parent
55f8c6f1ca
commit
168629c99a
5 changed files with 32 additions and 6 deletions
11
NEWS
11
NEWS
|
@ -44,7 +44,18 @@ correctly.
|
|||
The class layout slot, which informs the GC about which slots to GC
|
||||
protect, is now initialized correctly.
|
||||
|
||||
** GOOPS class redefinition bug fixed.
|
||||
|
||||
The class redefinition protocol now properly removes the old accessor
|
||||
methods from their accessors.
|
||||
|
||||
* Changes to Scheme functions and syntax
|
||||
|
||||
** %fast-slot-ref no longer checks slot boundness
|
||||
|
||||
This makes the <active-class> metaclass in (oop goops active-slot)
|
||||
working again.
|
||||
|
||||
* Changes to the C interface
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
||||
|
||||
* goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
|
||||
scm_at_assert_bound_ref. (We don't want the unbound check. See
|
||||
oop/goops/active-slot.scm.)
|
||||
|
||||
2003-04-14 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
||||
|
||||
* print.c (scm_prin1): Remember old state of pstate->writingp.
|
||||
|
|
|
@ -1066,7 +1066,7 @@ SCM_DEFINE (scm_sys_fast_slot_ref, "%fast-slot-ref", 2, 0, 0,
|
|||
i = SCM_INUM (index);
|
||||
|
||||
SCM_ASSERT_RANGE (2, index, i >= 0 && i < SCM_NUMBER_OF_SLOTS (obj));
|
||||
return scm_at_assert_bound_ref (obj, index);
|
||||
return SCM_SLOT (obj, i);
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
||||
|
||||
* goops.scm (compute-getter-method): For custom getter: Check
|
||||
boundness even if there is an init-thunk. (The getter can return
|
||||
#<unbound> even if the slot has been set before.)
|
||||
|
||||
2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
||||
|
||||
* goops.scm (compute-getters-n-setters/verify-accessors): Better
|
||||
|
|
|
@ -909,7 +909,13 @@
|
|||
(define-method (remove-class-accessors! (c <class>))
|
||||
(for-each (lambda (m)
|
||||
(if (is-a? m <accessor-method>)
|
||||
(remove-method-in-classes! m)))
|
||||
(let ((gf (slot-ref m 'generic-function)))
|
||||
;; remove the method from its GF
|
||||
(slot-set! gf 'methods
|
||||
(delq1! m (slot-ref gf 'methods)))
|
||||
(%invalidate-method-cache! gf)
|
||||
;; remove the method from its specializers
|
||||
(remove-method-in-classes! m))))
|
||||
(class-direct-methods c)))
|
||||
|
||||
;;;
|
||||
|
@ -975,10 +981,7 @@
|
|||
(make <accessor-method>
|
||||
#:specializers (list class)
|
||||
#:procedure (cond ((pair? g-n-s)
|
||||
(if init-thunk
|
||||
(car g-n-s)
|
||||
(make-generic-bound-check-getter (car g-n-s))
|
||||
))
|
||||
(make-generic-bound-check-getter (car g-n-s)))
|
||||
(init-thunk
|
||||
(standard-get g-n-s))
|
||||
(else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue