class))
(define built-in-class-table
- (make-eq-hash-table))
-
+ ;; This should be an ephemeral hash table of some flavour (either
+ ;; key-ephemeral or key-and-datum-ephemeral), so that, e.g., dispatch
+ ;; tags can be garbage-collected if you redefine record types. There
+ ;; are two reasons it is not now:
+ ;;
+ ;; 1. 9.0.1 doesn't have ephemeral hash tables, and this definition
+ ;; figures into bootstrapping, so we can't use them here until 9.1
+ ;; is released.
+ ;;
+ ;; 2. Methods' specializers currently hold only strong references to
+ ;; classes anyway, which have strong references to dispatch tags,
+ ;; so they need to be changed to hold weak references.
+ (make-strong-eq-hash-table))
+\f
(let ((assign-type
(lambda (name class)
(hash-table/put! built-in-class-table