hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit e67a75c06e6a93d8ee4323b0d9b365e610f858b8
parent 95feeffe79767bb2b7a59948d8acffdfc18d9eb5
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sun, 24 Jan 2021 13:27:42 -0500

rt::malloc: use array expansion

Diffstat:
Mrt/malloc.ha | 9+--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/rt/malloc.ha b/rt/malloc.ha @@ -36,14 +36,7 @@ def WORD: size = size(size); def WASTE: size = WORD * ALIGN - WORD; def BIGBLOCK: size = (2z << 16z) * WORD; -// TODO: Expandable arrays -let bins: [50]nullable *void = [ - null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - null, null, -]; +let bins: [50]nullable *void = [null...]; fn bin2size(b: size) size = ((b + 1z) * ALIGN - 1z) * WORD;