File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 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
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 )
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 )
You can’t perform that action at this time.
0 commit comments