Update bootstrap C sources.

This commit is contained in:
David Brown 2016-12-22 17:17:34 +00:00
parent 535f80d91c
commit d292b4b2c9
185 changed files with 215 additions and 210 deletions

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#define SHORTINT INT8
#define INTEGER INT16
@ -289,16 +289,17 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag)
if (Heap_firstTry) {
Heap_GC(1);
blksz += 32;
if (Heap_uLT(Heap_heapsize - Heap_allocated, blksz) || Heap_uLT(__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2), Heap_heapsize)) {
Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 96), 7) - Heap_heapsize);
t = __ASHL(__DIV(Heap_allocated + blksz, 96), 7);
if (Heap_uLT(Heap_heapsize, t)) {
Heap_ExtendHeap(t - Heap_heapsize);
}
Heap_firstTry = 0;
new = Heap_NEWREC(tag);
Heap_firstTry = 1;
if (new == NIL) {
Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 96), 7) - Heap_heapsize);
Heap_ExtendHeap(blksz);
new = Heap_NEWREC(tag);
}
Heap_firstTry = 1;
Heap_Unlock();
return new;
} else {