repair compute-size-increments for anonymous fields

The size of a record with anonymous fields was not included in the
computed size.

original commit: 1c44e61a8174629cacc71adedccc028e982ca323
This commit is contained in:
Matthew Flatt 2020-03-28 08:33:15 -06:00
parent de465e4f92
commit ec138ba57c

View File

@ -2649,7 +2649,7 @@
(let ([flds (rtd-flds rtd)])
(cond
[(fixnum? flds)
(let loop ([i 0] [size 0])
(let loop ([i 0] [size (fx+ (align (rtd-size rtd)) (compute-size rtd))])
(cond
[(fx= i flds) size]
[else (loop (fx+ i 1)
@ -2707,7 +2707,8 @@
(if (fx= i n)
size
(let ([r ($get-reloc x i)])
(and r
(if (not r)
0
(let ([type (logand (bitwise-arithmetic-shift-right r (constant reloc-type-offset)) (constant reloc-type-mask))])
(if (logtest r (constant reloc-extended-format))
(let ([addr (fx+ addr ($get-reloc x (fx+ i 2)))])