Tweak rule used for building weak keys, and update comment to match.
authorChris Hanson <org/chris-hanson/cph>
Mon, 21 Dec 2009 05:22:38 +0000 (21:22 -0800)
committerChris Hanson <org/chris-hanson/cph>
Mon, 21 Dec 2009 05:22:38 +0000 (21:22 -0800)
src/runtime/hashtb.scm

index 629b6adc116c05ed5fedcc51c59f901d0c141e33..7cf9f070f4160d516febb2548a3baa7a02bb1611 100644 (file)
@@ -292,9 +292,11 @@ USA.
                                            %weak-entry-datum)))
 
 (define-integrable (%weak-make-entry key datum)
-  (if (or (not key)
-         (number? key)                 ;Keep numbers in table.
-         (interned-symbol? key))       ;Symbols, too.
+  ;; Use an ordinary pair for objects that aren't pointers or that
+  ;; have unbounded extent.
+  (if (or (object-non-pointer? key)
+         (number? key)
+         (interned-symbol? key))
       (cons key datum)
       (system-pair-cons (ucode-type weak-cons) key datum)))