mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-08 02:40:17 +02:00
Add tc7 for finalizer objects
Whippet will need this. * libguile/scm.h (scm_tc7_finalizer): Reserve. * libguile/evalext.c (scm_self_evaluating_p): Add finalizer case. * libguile/print.c (iprin1): * libguile/finalizers.h: * libguile/finalizers.c (scm_i_print_finalizer): Arrange to print finalizers. * module/oop/goops.scm (<finalizer>): * libguile/goops.c (class_finalizer, scm_class_of) (scm_sys_goops_early_init): Wire up support for <finalizer>. * module/system/base/types/internal.scm (heap-tags): Add finalizers. * module/system/vm/assembler.scm (system): Add emit-finalizer?.
This commit is contained in:
parent
532df66e07
commit
cf25a94745
9 changed files with 28 additions and 4 deletions
|
@ -69,7 +69,8 @@
|
|||
<boolean> <char> <list> <pair> <null> <string> <symbol>
|
||||
<vector> <bytevector> <uvec> <foreign> <hashtable>
|
||||
<fluid> <dynamic-state> <frame> <vm> <vm-continuation>
|
||||
<keyword> <syntax> <atomic-box> <thread>
|
||||
<keyword> <syntax> <atomic-box> <thread> <bitvector>
|
||||
<finalizer>
|
||||
|
||||
;; Numbers.
|
||||
<number> <complex> <real> <integer> <fraction>
|
||||
|
@ -82,7 +83,7 @@
|
|||
;; once you have an instance. Perhaps FIXME to provide a
|
||||
;; smob-type-name->class procedure.
|
||||
<promise> <mutex> <condition-variable>
|
||||
<regexp> <hook> <bitvector> <random-state>
|
||||
<regexp> <hook> <random-state>
|
||||
<directory> <array> <character-set>
|
||||
<dynamic-object> <guardian> <macro>
|
||||
|
||||
|
@ -1078,6 +1079,7 @@ slots as we go."
|
|||
(define-standard-class <uvec> (<bytevector>))
|
||||
(define-standard-class <array> (<top>))
|
||||
(define-standard-class <bitvector> (<top>))
|
||||
(define-standard-class <finalizer> (<top>))
|
||||
(define-standard-class <thread> (<top>))
|
||||
(define-standard-class <number> (<top>))
|
||||
(define-standard-class <complex> (<number>))
|
||||
|
|
|
@ -153,7 +153,7 @@
|
|||
(weak-table weak-table? #b1111111 #b1010111)
|
||||
(array array? #b1111111 #b1011101)
|
||||
(bitvector bitvector? #b1111111 #b1011111)
|
||||
;;(unused unused #b1111111 #b1100101)
|
||||
(finalizer finalizer? #b1111111 #b1100101)
|
||||
;;(unused unused #b1111111 #b1100111)
|
||||
;;(unused unused #b1111111 #b1101101)
|
||||
;;(unused unused #b1111111 #b1101111)
|
||||
|
|
|
@ -137,6 +137,7 @@
|
|||
emit-weak-table?
|
||||
emit-array?
|
||||
emit-bitvector?
|
||||
emit-finalizer?
|
||||
emit-port?
|
||||
emit-smob?
|
||||
emit-bignum?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue