cs: tweak for chaperoned structure reference

No need for `|#%app|` on chaperoned operation.
This commit is contained in:
Matthew Flatt 2020-02-08 10:13:44 -07:00
parent 7f729a1a2b
commit a3f1ab8b60

View File

@ -46,8 +46,8 @@
(record? (impersonator-val orig) rtd))) (record? (impersonator-val orig) rtd)))
(let loop ([v orig]) (let loop ([v orig])
(cond (cond
[(and (struct-undefined-chaperone? v) [(and rtd
rtd) (struct-undefined-chaperone? v))
;; Must be the only wrapper left ;; Must be the only wrapper left
(let ([abs-pos (fx+ key2/pos (struct-type-parent-total*-count rtd))]) (let ([abs-pos (fx+ key2/pos (struct-type-parent-total*-count rtd))])
(let ([r (unsafe-struct*-ref (impersonator-val v) abs-pos)]) (let ([r (unsafe-struct*-ref (impersonator-val v) abs-pos)])
@ -80,7 +80,7 @@
(if rtd (if rtd
(let ([abs-pos (fx+ key2/pos (struct-type-parent-total*-count rtd))]) (let ([abs-pos (fx+ key2/pos (struct-type-parent-total*-count rtd))])
(unsafe-struct*-ref v abs-pos)) (unsafe-struct*-ref v abs-pos))
(|#%app| acc v))]))] (acc v))]))]
[else [else
(raise-argument-error (string->symbol (raise-argument-error (string->symbol
(string-append (symbol->string (or record-name 'struct)) (string-append (symbol->string (or record-name 'struct))