Skip to content

Commit 1287f51

Browse files
committed
bytecode FASLs: allow disltv to dump prototypeless hash tables
1 parent 89aa532 commit 1287f51

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/lisp/kernel/cmp/cmpltv.lisp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@
9999
(%value :initarg :value :reader setf-aref-value :type creator)))
100100

101101
(defclass hash-table-creator (vcreator)
102-
(;; used in disltv
103-
(%test :initarg :test :reader hash-table-creator-test :type symbol)
102+
((%test :initarg :test :reader hash-table-creator-test :type symbol)
104103
(%count :initarg :count :reader hash-table-creator-count
105104
:type (integer 0))))
106105

@@ -827,11 +826,10 @@
827826
(%uaet-info (array-element-type array)))
828827

829828
(defmethod encode ((inst hash-table-creator) stream)
830-
(let* ((ht (prototype inst))
831-
;; TODO: Custom hash-table tests.
829+
(let* (;; TODO: Custom hash-table tests.
832830
;; NOTE that for non-custom hash table tests, the standard
833831
;; guarantees that hash-table-test returns a symbol.
834-
(testcode (ecase (hash-table-test ht)
832+
(testcode (ecase (hash-table-creator-test inst)
835833
((eq) #b00)
836834
((eql) #b01)
837835
((equal) #b10)
@@ -845,7 +843,7 @@
845843
;; up, it might be rehashed and resized during initialization as it
846844
;; reaches the rehash threshold. I am not sure how to deal with this
847845
;; in a portable fashion. (we could just invert a provided rehash-size?)
848-
(count (max (hash-table-count ht) #xffff)))
846+
(count (min (hash-table-creator-count inst) #xffff)))
849847
(write-mnemonic 'make-hash-table stream)
850848
(write-index inst stream)
851849
(write-byte testcode stream)

0 commit comments

Comments
 (0)