diff --git a/collects/compiler/zo-marshal.rkt b/collects/compiler/zo-marshal.rkt index a626ac7a7a..9438fc71aa 100644 --- a/collects/compiler/zo-marshal.rkt +++ b/collects/compiler/zo-marshal.rkt @@ -978,13 +978,14 @@ num-all-params max-let-depth (and tl-map - (if (tl-map . < . #x7FFFFFFF) + (if (tl-map . <= . #xFFFFFFF) + ;; Encode as a fixnum: tl-map ;; Encode as an even-sized vector of 16-bit integers: (let ([len (* 2 (quotient (+ (integer-length tl-map) 31) 32))]) (for/vector ([i (in-range len)]) - (let ([s (* i 16)]) - (bitwise-bit-field tl-map s (+ s 16))))))) + (let ([s (* i 16)]) + (bitwise-bit-field tl-map s (+ s 16))))))) name l) out))])) diff --git a/collects/compiler/zo-parse.rkt b/collects/compiler/zo-parse.rkt index ac27f36b56..66ee70a765 100644 --- a/collects/compiler/zo-parse.rkt +++ b/collects/compiler/zo-parse.rkt @@ -136,9 +136,9 @@ (and tl-map (let* ([bits (if (exact-integer? tl-map) tl-map - (for/fold ([i 0]) ([v (in-list tl-map)] + (for/fold ([i 0]) ([v (in-vector tl-map)] [s (in-naturals)]) - (bitwise-ior i (arithmetic-shift v 16))))] + (bitwise-ior i (arithmetic-shift v (* s 16)))))] [len (integer-length bits)]) (list->set (let loop ([bit 0])