Rename hash-table-entry-type:key{/,&}datum-weak.
authorChris Hanson <org/chris-hanson/cph>
Thu, 26 Apr 2018 06:21:44 +0000 (23:21 -0700)
committerChris Hanson <org/chris-hanson/cph>
Thu, 26 Apr 2018 06:21:44 +0000 (23:21 -0700)
This makes it consistent with the ephemeron naming.

src/runtime/hash-table.scm
src/runtime/runtime.pkg
tests/runtime/test-hash-table.scm

index caa07094e2e17be75cf0f51d67df98cbc9787beb..8c4e73ac4f02d178b9ac3cd2402c7bc1ea156b08 100644 (file)
@@ -500,44 +500,44 @@ USA.
 
 ;;; Key-or-datum-weak -- if either is GC'd, the entry is dropped.
 
-(define-integrable (make-key/datum-weak-entry key datum)
+(define-integrable (make-key&datum-weak-entry key datum)
   (maybe-weak-cons key (maybe-weak-cons datum '())))
 
-(define-integrable (key/datum-weak-entry-valid? entry)
+(define-integrable (key&datum-weak-entry-valid? entry)
   (and (system-pair-car entry)
        (system-pair-car (system-pair-cdr entry))))
 
-(define-integrable key/datum-weak-entry-key system-pair-car)
-(define-integrable (key/datum-weak-entry-datum entry)
+(define-integrable key&datum-weak-entry-key system-pair-car)
+(define-integrable (key&datum-weak-entry-datum entry)
   (system-pair-car (system-pair-cdr entry)))
 
-(define-integrable (set-key/datum-weak-entry-datum! entry object)
+(define-integrable (set-key&datum-weak-entry-datum! entry object)
   (system-pair-set-car! (system-pair-cdr entry) object))
 
-(define-integrable (call-with-key/datum-weak-entry-key entry if-valid if-not)
-  (call-with-key/datum-weak-entry-key&datum entry
+(define-integrable (call-with-key&datum-weak-entry-key entry if-valid if-not)
+  (call-with-key&datum-weak-entry-key&datum entry
     (lambda (k d barrier) d (if-valid k barrier))
     if-not))
 
-(define-integrable (call-with-key/datum-weak-entry-key&datum entry
+(define-integrable (call-with-key&datum-weak-entry-key&datum entry
                     if-valid
                     if-not)
-  (let ((k (key/datum-weak-entry-key entry))
-       (d (key/datum-weak-entry-datum entry)))
+  (let ((k (key&datum-weak-entry-key entry))
+       (d (key&datum-weak-entry-datum entry)))
     (if (and (or (pair? entry) k)
             (or (pair? (system-pair-cdr entry))
                 d))
        (if-valid k d (lambda () (reference-barrier k) (reference-barrier d)))
        (if-not))))
 
-(declare (integrate-operator hash-table-entry-type:key/datum-weak))
-(define hash-table-entry-type:key/datum-weak
-  (make-entry-type make-key/datum-weak-entry
-                  key/datum-weak-entry-valid?
-                  call-with-key/datum-weak-entry-key
-                  call-with-key/datum-weak-entry-key&datum
-                  set-key/datum-weak-entry-datum!))
-(register-entry-type! 'key/datum-weak hash-table-entry-type:key/datum-weak)
+(declare (integrate-operator hash-table-entry-type:key&datum-weak))
+(define hash-table-entry-type:key&datum-weak
+  (make-entry-type make-key&datum-weak-entry
+                  key&datum-weak-entry-valid?
+                  call-with-key&datum-weak-entry-key
+                  call-with-key&datum-weak-entry-key&datum
+                  set-key&datum-weak-entry-datum!))
+(register-entry-type! 'key&datum-weak hash-table-entry-type:key&datum-weak)
 \f
 ;;; Key-ephemeral -- if the key is GC'd, the entry is dropped.
 
@@ -1288,7 +1288,7 @@ USA.
    (open-type-constructor! hash-table-entry-type:strong)
    (open-type-constructor! hash-table-entry-type:key-weak)
    (open-type-constructor! hash-table-entry-type:datum-weak)
-   (open-type-constructor! hash-table-entry-type:key/datum-weak)
+   (open-type-constructor! hash-table-entry-type:key&datum-weak)
    (open-type-constructor! hash-table-entry-type:key-ephemeral)
    (open-type-constructor! hash-table-entry-type:datum-ephemeral)
    (open-type-constructor! hash-table-entry-type:key&datum-ephemeral)
index 1f779e62fa6fdefa40eec548c158cd5f305779ac..7c30660b2a5bee509a9e1652e3bd6cef6a170f85 100644 (file)
@@ -2378,8 +2378,9 @@ USA.
   (import (runtime population)
          add-to-population!/unsafe)
   (export () deprecated:hash-table
-         (hash-table/clear! hash-table-clear!)
+         (hash-table-entry-type:key/datum-weak hash-table-entry-type:key&datum-weak)
          (hash-table/clean! hash-table-clean!)
+         (hash-table/clear! hash-table-clear!)
          (hash-table/count hash-table-size)
          (hash-table/datum-list hash-table-values)
          (hash-table/for-each hash-table-walk)
@@ -2439,7 +2440,7 @@ USA.
          hash-table-entry-type:key&datum-ephemeral
          hash-table-entry-type:key-ephemeral
          hash-table-entry-type:key-weak
-         hash-table-entry-type:key/datum-weak
+         hash-table-entry-type:key&datum-weak
          hash-table-entry-type:strong
          hash-table-equivalence-function ;SRFI-69
          hash-table-exists?            ;SRFI-69
index 2d1c35ed23f3a94fd7d2b848dc279844fe22b9e6..b6d6e8195770b150fb25da35e92167397fc72553 100644 (file)
@@ -201,7 +201,7 @@ USA.
        (list (list 'strong hash-table-entry-type:strong)
             (list 'key-weak hash-table-entry-type:key-weak)
             (list 'datum-weak hash-table-entry-type:datum-weak)
-            (list 'key/datum-weak hash-table-entry-type:key/datum-weak)
+            (list 'key&datum-weak hash-table-entry-type:key&datum-weak)
             (list 'key-ephemeral hash-table-entry-type:key-ephemeral)
             (list 'datum-ephemeral hash-table-entry-type:datum-ephemeral)
             (list 'key&datum-ephemeral