From 9537d99af9ca97ca87805b39f6cbe3c832cb787e Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 20 Dec 2009 21:22:38 -0800 Subject: [PATCH] Tweak rule used for building weak keys, and update comment to match. --- src/runtime/hashtb.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/runtime/hashtb.scm b/src/runtime/hashtb.scm index 629b6adc1..7cf9f070f 100644 --- a/src/runtime/hashtb.scm +++ b/src/runtime/hashtb.scm @@ -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))) -- 2.25.1