From: Chris Hanson Date: Mon, 21 Dec 2009 05:22:38 +0000 (-0800) Subject: Tweak rule used for building weak keys, and update comment to match. X-Git-Tag: 20100708-Gtk~195^2~2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=9537d99af9ca97ca87805b39f6cbe3c832cb787e;p=mit-scheme.git Tweak rule used for building weak keys, and update comment to match. --- 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)))