compiler/zo-marshal: fix encoding mistakes
Changes to the optimizer and validator exposed old problems.
This commit is contained in:
parent
36548ea289
commit
83196703ee
|
@ -654,17 +654,17 @@
|
|||
(if (function-shape-preserves-marks? constantness) 1 0))]))]
|
||||
[(struct-type-shape? constantness)
|
||||
(to-sym (arithmetic-shift (struct-type-shape-field-count constantness)
|
||||
4))]
|
||||
3))]
|
||||
[(constructor-shape? constantness)
|
||||
(to-sym (bitwise-ior 1 (arithmetic-shift (constructor-shape-arity constantness)
|
||||
4)))]
|
||||
3)))]
|
||||
[(predicate-shape? constantness) (to-sym 2)]
|
||||
[(accessor-shape? constantness)
|
||||
(to-sym (bitwise-ior 3 (arithmetic-shift (accessor-shape-field-count constantness)
|
||||
4)))]
|
||||
3)))]
|
||||
[(mutator-shape? constantness)
|
||||
(to-sym (bitwise-ior 4 (arithmetic-shift (mutator-shape-field-count constantness)
|
||||
4)))]
|
||||
3)))]
|
||||
[(struct-type-property-shape? constantness)
|
||||
(to-sym #:prefix "prop"
|
||||
(if (struct-type-property-shape-has-guard? constantness)
|
||||
|
@ -1197,7 +1197,7 @@
|
|||
(append
|
||||
(vector->list closure-map)
|
||||
(let* ([v (make-vector (ceiling
|
||||
(/ (* BITS_PER_ARG (+ num-params (vector-length closure-map)))
|
||||
(/ (* BITS_PER_ARG (+ num-all-params (vector-length closure-map)))
|
||||
BITS_PER_MZSHORT)))]
|
||||
[set-bit! (lambda (i bit)
|
||||
(let ([pos (quotient (* BITS_PER_ARG i) BITS_PER_MZSHORT)])
|
||||
|
|
|
@ -801,7 +801,7 @@
|
|||
(define n (string->number (substring (symbol->string shape) 4)))
|
||||
(case n
|
||||
[(0 1) (make-struct-type-property-shape (= n 1))]
|
||||
[(3) (make-property-predicate-shape)]
|
||||
[(2) (make-property-predicate-shape)]
|
||||
[else (make-property-accessor-shape)])]
|
||||
[else
|
||||
;; parse symbol as ":"-separated sequence of arities
|
||||
|
|
Loading…
Reference in New Issue
Block a user