diff --git a/bootstrap/SYSTEM.h b/bootstrap/SYSTEM.h index 43baa836..ff4c724d 100644 --- a/bootstrap/SYSTEM.h +++ b/bootstrap/SYSTEM.h @@ -237,7 +237,7 @@ static inline double SYSTEM_ABSD(double i) {return i >= 0.0 ? i : -i;} #define __GUARDR(r, typ, level) (*((typ*)(__IS(r##__typ,typ,level)?r:(__HALT(-5),r)))) #define __GUARDA(p, typ, level) ((struct typ*)(__IS(__TYPEOF(p),typ,level)?p:(__HALT(-5),p))) #define __GUARDEQR(p, dyntyp, typ) if(dyntyp!=typ##__typ) __HALT(-6);*(p) -#define __GUARDEQP(p, typ) if(__TYPEOF(p)!=typ##__typ)__HALT(-6);*(p) +#define __GUARDEQP(p, typ) if(__TYPEOF(p)!=typ##__typ)__HALT(-6);*((typ*)p) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index cf8a66c5..6200dcea 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index cbbddc2b..13c1e7ff 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index cacb981f..6f418c8a 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 947b36b8..05af3356 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 0abbbc73..1d0b6ef1 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index e39356ea..ae9ffcfb 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,7 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT32 Heap_heap, Heap_heapend; +static INT32 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -170,16 +170,33 @@ void Heap_INCREF (Heap_Module m) static INT32 Heap_NewChunk (INT32 blksz) { - INT32 chnk; + INT32 chnk, blk, end; chnk = Heap_OSAllocate(blksz + 12); if (chnk != 0) { - __PUT(chnk + 4, chnk + (12 + blksz), INT32); - __PUT(chnk + 12, chnk + 16, INT32); - __PUT(chnk + 16, blksz, INT32); - __PUT(chnk + 20, -4, INT32); - __PUT(chnk + 24, Heap_bigBlocks, INT32); - Heap_bigBlocks = chnk + 12; + blk = chnk + 12; + end = blk + blksz; + __PUT(chnk + 4, end, INT32); + __PUT(blk, blk + 4, INT32); + __PUT(blk + 4, blksz, INT32); + __PUT(blk + 8, -4, INT32); + __PUT(blk + 12, Heap_bigBlocks, INT32); + Heap_bigBlocks = blk; Heap_heapsize += blksz; + if (chnk > 0) { + if (chnk < Heap_heapPosMin) { + Heap_heapPosMin = blk + 4; + } + if (end > Heap_heapPosMax) { + Heap_heapPosMax = end; + } + } else { + if (chnk < Heap_heapNegMin) { + Heap_heapNegMin = blk + 4; + } + if (end > Heap_heapNegMax) { + Heap_heapNegMax = end; + } + } } return chnk; } @@ -207,9 +224,6 @@ static void Heap_ExtendHeap (INT32 blksz) __PUT(chnk, next, INT32); __PUT(j, chnk, INT32); } - if (next == 0) { - __GET(chnk + 4, Heap_heapend, INT32); - } } } @@ -592,7 +606,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) } while (sp != stack0) { __GET(sp, p, INT32); - if ((p > Heap_heap && p < Heap_heapend)) { + if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { if (nofcand == cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -703,16 +717,20 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) void Heap_InitHeap (void) { - Heap_heap = Heap_NewChunk(128000); - __GET(Heap_heap + 4, Heap_heapend, INT32); - __PUT(Heap_heap, 0, INT32); + Heap_heap = 0; + Heap_heapsize = 0; Heap_allocated = 0; + Heap_lockdepth = 0; + Heap_heapPosMin = 2147483647; + Heap_heapPosMax = 0; + Heap_heapNegMin = 0; + Heap_heapNegMax = (-2147483647-1); + Heap_heap = Heap_NewChunk(128000); + __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; Heap_freeList[9] = 1; - Heap_lockdepth = 0; Heap_FileCount = 0; Heap_modules = NIL; - Heap_heapsize = 0; Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 700aa7c2..0cf94754 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 8031a41f..e4fa8467 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index e651d9ec..d1227884 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 5ea38d2b..f174acdc 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index de00e17c..1efe3cf3 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index b28012be..4759eb74 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1659,9 +1659,9 @@ void OPC_CompleteIdent (OPT_Object obj) OPC_Ident(obj); OPM_WriteString((CHAR*)"__", 3); } else { - OPM_WriteString((CHAR*)"((", 3); + OPM_WriteString((CHAR*)"(*(", 4); OPC_Ident(obj->typ->strobj); - OPM_Write(')'); + OPM_WriteString((CHAR*)"*)&", 4); OPC_Ident(obj); OPM_Write(')'); } diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index f2ef814d..a485b3c4 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 5bdee03c..34ca07fd 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 7f78e399..0b19f055 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index e3c859a0..aef61fc9 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 0d729ff7..6629924c 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 30737296..d5c0c747 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 4f1e8faa..87418922 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index e2711b4d..0d22f650 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index d3950d01..019dee31 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 9ad04131..ef5a6f06 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 54c8695a..401db9dd 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 9f596918..eba9222e 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index c4807be1..f58803a5 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 2e744566..5cc1bdc0 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index d7337ec6..f4cff92c 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 1a0aae45..5361bdcd 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index a39cdedc..cc2755f0 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index f29bce42..230f60a9 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index d67ec004..ad07bc6d 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index f0340e83..21b5fc34 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,27 +390,27 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t if (__IS(msg__typ, Texts_CopyMsg, 1)) { Texts_CopyMsg *msg__ = (void*)msg; __NEW(e, Texts__1); - Texts_CopyElem((void*)((Texts_Alien)E), (void*)e); - e->file = ((Texts_Alien)E)->file; - e->org = ((Texts_Alien)E)->org; - e->span = ((Texts_Alien)E)->span; - __COPY(((Texts_Alien)E)->mod, e->mod, 32); - __COPY(((Texts_Alien)E)->proc, e->proc, 32); + Texts_CopyElem((void*)(*(Texts_Alien*)&E), (void*)e); + e->file = (*(Texts_Alien*)&E)->file; + e->org = (*(Texts_Alien*)&E)->org; + e->span = (*(Texts_Alien*)&E)->span; + __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { Texts_IdentifyMsg *msg__ = (void*)msg; - __COPY(((Texts_Alien)E)->mod, (*msg__).mod, 32); - __COPY(((Texts_Alien)E)->proc, (*msg__).proc, 32); + __COPY((*(Texts_Alien*)&E)->mod, (*msg__).mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, (*msg__).proc, 32); (*msg__).mod[31] = 0x01; } else __WITHCHK; } else if (__IS(msg__typ, Texts_FileMsg, 1)) { if (__IS(msg__typ, Texts_FileMsg, 1)) { Texts_FileMsg *msg__ = (void*)msg; if ((*msg__).id == 1) { - Files_Set(&r, Files_Rider__typ, ((Texts_Alien)E)->file, ((Texts_Alien)E)->org); - i = ((Texts_Alien)E)->span; + Files_Set(&r, Files_Rider__typ, (*(Texts_Alien*)&E)->file, (*(Texts_Alien*)&E)->org); + i = (*(Texts_Alien*)&E)->span; while (i > 0) { Files_Read(&r, Files_Rider__typ, (void*)&ch); Files_Write(&(*msg__).r, Files_Rider__typ, ch); @@ -646,7 +646,7 @@ void Texts_Read (Texts_Reader *R, ADDRESS *R__typ, CHAR *ch) u = u->next; if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); } else __WITHCHK; } (*R).run = u; @@ -673,7 +673,7 @@ void Texts_ReadElem (Texts_Reader *R, ADDRESS *R__typ) (*R).elem = __GUARDP(u, Texts_ElemDesc, 1); if (__ISP(un, Texts_PieceDesc, 1)) { if (__ISP(un, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)un)->file, ((Texts_Piece)un)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&un)->file, (*(Texts_Piece*)&un)->org); } else __WITHCHK; } } else { @@ -1715,9 +1715,9 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) while (u != T->head) { if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - if (((Texts_Piece)u)->ascii) { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + if ((*(Texts_Piece*)&u)->ascii) { + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 0) { Files_Read(&r1, Files_Rider__typ, (void*)&ch); delta -= 1; @@ -1728,8 +1728,8 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) } } } else { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 1b34b2d4..8b80a18c 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 14140265..57d8a782 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index b8dc8094..5e32e01b 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 7193bad6..18e626a3 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index b6367689..622a5a55 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index cf8a66c5..6200dcea 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index cbbddc2b..13c1e7ff 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index cacb981f..6f418c8a 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 947b36b8..05af3356 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 0abbbc73..1d0b6ef1 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index e39356ea..ae9ffcfb 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,7 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT32 Heap_heap, Heap_heapend; +static INT32 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -170,16 +170,33 @@ void Heap_INCREF (Heap_Module m) static INT32 Heap_NewChunk (INT32 blksz) { - INT32 chnk; + INT32 chnk, blk, end; chnk = Heap_OSAllocate(blksz + 12); if (chnk != 0) { - __PUT(chnk + 4, chnk + (12 + blksz), INT32); - __PUT(chnk + 12, chnk + 16, INT32); - __PUT(chnk + 16, blksz, INT32); - __PUT(chnk + 20, -4, INT32); - __PUT(chnk + 24, Heap_bigBlocks, INT32); - Heap_bigBlocks = chnk + 12; + blk = chnk + 12; + end = blk + blksz; + __PUT(chnk + 4, end, INT32); + __PUT(blk, blk + 4, INT32); + __PUT(blk + 4, blksz, INT32); + __PUT(blk + 8, -4, INT32); + __PUT(blk + 12, Heap_bigBlocks, INT32); + Heap_bigBlocks = blk; Heap_heapsize += blksz; + if (chnk > 0) { + if (chnk < Heap_heapPosMin) { + Heap_heapPosMin = blk + 4; + } + if (end > Heap_heapPosMax) { + Heap_heapPosMax = end; + } + } else { + if (chnk < Heap_heapNegMin) { + Heap_heapNegMin = blk + 4; + } + if (end > Heap_heapNegMax) { + Heap_heapNegMax = end; + } + } } return chnk; } @@ -207,9 +224,6 @@ static void Heap_ExtendHeap (INT32 blksz) __PUT(chnk, next, INT32); __PUT(j, chnk, INT32); } - if (next == 0) { - __GET(chnk + 4, Heap_heapend, INT32); - } } } @@ -592,7 +606,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) } while (sp != stack0) { __GET(sp, p, INT32); - if ((p > Heap_heap && p < Heap_heapend)) { + if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { if (nofcand == cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -703,16 +717,20 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) void Heap_InitHeap (void) { - Heap_heap = Heap_NewChunk(128000); - __GET(Heap_heap + 4, Heap_heapend, INT32); - __PUT(Heap_heap, 0, INT32); + Heap_heap = 0; + Heap_heapsize = 0; Heap_allocated = 0; + Heap_lockdepth = 0; + Heap_heapPosMin = 2147483647; + Heap_heapPosMax = 0; + Heap_heapNegMin = 0; + Heap_heapNegMax = (-2147483647-1); + Heap_heap = Heap_NewChunk(128000); + __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; Heap_freeList[9] = 1; - Heap_lockdepth = 0; Heap_FileCount = 0; Heap_modules = NIL; - Heap_heapsize = 0; Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 700aa7c2..0cf94754 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 8031a41f..e4fa8467 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index e651d9ec..d1227884 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 5ea38d2b..f174acdc 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index de00e17c..1efe3cf3 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index b28012be..4759eb74 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1659,9 +1659,9 @@ void OPC_CompleteIdent (OPT_Object obj) OPC_Ident(obj); OPM_WriteString((CHAR*)"__", 3); } else { - OPM_WriteString((CHAR*)"((", 3); + OPM_WriteString((CHAR*)"(*(", 4); OPC_Ident(obj->typ->strobj); - OPM_Write(')'); + OPM_WriteString((CHAR*)"*)&", 4); OPC_Ident(obj); OPM_Write(')'); } diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index f2ef814d..a485b3c4 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 5bdee03c..34ca07fd 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 7f78e399..0b19f055 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index e3c859a0..aef61fc9 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 0d729ff7..6629924c 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 30737296..d5c0c747 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 4f1e8faa..87418922 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index b84b0516..b4a68499 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index d3950d01..019dee31 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 9ad04131..ef5a6f06 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 54c8695a..401db9dd 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 9f596918..eba9222e 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index c4807be1..f58803a5 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 2e744566..5cc1bdc0 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index d7337ec6..f4cff92c 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 1a0aae45..5361bdcd 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index a39cdedc..cc2755f0 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index f29bce42..230f60a9 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index d67ec004..ad07bc6d 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 4036d0d5..ffda81d3 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,27 +390,27 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t if (__IS(msg__typ, Texts_CopyMsg, 1)) { Texts_CopyMsg *msg__ = (void*)msg; __NEW(e, Texts__1); - Texts_CopyElem((void*)((Texts_Alien)E), (void*)e); - e->file = ((Texts_Alien)E)->file; - e->org = ((Texts_Alien)E)->org; - e->span = ((Texts_Alien)E)->span; - __COPY(((Texts_Alien)E)->mod, e->mod, 32); - __COPY(((Texts_Alien)E)->proc, e->proc, 32); + Texts_CopyElem((void*)(*(Texts_Alien*)&E), (void*)e); + e->file = (*(Texts_Alien*)&E)->file; + e->org = (*(Texts_Alien*)&E)->org; + e->span = (*(Texts_Alien*)&E)->span; + __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { Texts_IdentifyMsg *msg__ = (void*)msg; - __COPY(((Texts_Alien)E)->mod, (*msg__).mod, 32); - __COPY(((Texts_Alien)E)->proc, (*msg__).proc, 32); + __COPY((*(Texts_Alien*)&E)->mod, (*msg__).mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, (*msg__).proc, 32); (*msg__).mod[31] = 0x01; } else __WITHCHK; } else if (__IS(msg__typ, Texts_FileMsg, 1)) { if (__IS(msg__typ, Texts_FileMsg, 1)) { Texts_FileMsg *msg__ = (void*)msg; if ((*msg__).id == 1) { - Files_Set(&r, Files_Rider__typ, ((Texts_Alien)E)->file, ((Texts_Alien)E)->org); - i = ((Texts_Alien)E)->span; + Files_Set(&r, Files_Rider__typ, (*(Texts_Alien*)&E)->file, (*(Texts_Alien*)&E)->org); + i = (*(Texts_Alien*)&E)->span; while (i > 0) { Files_Read(&r, Files_Rider__typ, (void*)&ch); Files_Write(&(*msg__).r, Files_Rider__typ, ch); @@ -646,7 +646,7 @@ void Texts_Read (Texts_Reader *R, ADDRESS *R__typ, CHAR *ch) u = u->next; if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); } else __WITHCHK; } (*R).run = u; @@ -673,7 +673,7 @@ void Texts_ReadElem (Texts_Reader *R, ADDRESS *R__typ) (*R).elem = __GUARDP(u, Texts_ElemDesc, 1); if (__ISP(un, Texts_PieceDesc, 1)) { if (__ISP(un, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)un)->file, ((Texts_Piece)un)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&un)->file, (*(Texts_Piece*)&un)->org); } else __WITHCHK; } } else { @@ -1715,9 +1715,9 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) while (u != T->head) { if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - if (((Texts_Piece)u)->ascii) { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + if ((*(Texts_Piece*)&u)->ascii) { + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 0) { Files_Read(&r1, Files_Rider__typ, (void*)&ch); delta -= 1; @@ -1728,8 +1728,8 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) } } } else { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index befb04d5..ef53cdf5 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 14140265..57d8a782 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index b8dc8094..5e32e01b 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 7193bad6..18e626a3 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index b6367689..622a5a55 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index cf8a66c5..6200dcea 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index cbbddc2b..13c1e7ff 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index cacb981f..6f418c8a 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index fcff6327..2da0ba3b 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 003d8c99..379f329e 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 49d8a8f6..ac52c6ae 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,7 @@ static INT64 Heap_freeList[10]; static INT64 Heap_bigBlocks; export INT64 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT64 Heap_heap, Heap_heapend; +static INT64 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT64 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -170,16 +170,33 @@ void Heap_INCREF (Heap_Module m) static INT64 Heap_NewChunk (INT64 blksz) { - INT64 chnk; + INT64 chnk, blk, end; chnk = Heap_OSAllocate(blksz + 24); if (chnk != 0) { - __PUT(chnk + 8, chnk + (24 + blksz), INT64); - __PUT(chnk + 24, chnk + 32, INT64); - __PUT(chnk + 32, blksz, INT64); - __PUT(chnk + 40, -8, INT64); - __PUT(chnk + 48, Heap_bigBlocks, INT64); - Heap_bigBlocks = chnk + 24; + blk = chnk + 24; + end = blk + blksz; + __PUT(chnk + 8, end, INT64); + __PUT(blk, blk + 8, INT64); + __PUT(blk + 8, blksz, INT64); + __PUT(blk + 16, -8, INT64); + __PUT(blk + 24, Heap_bigBlocks, INT64); + Heap_bigBlocks = blk; Heap_heapsize += blksz; + if (chnk > 0) { + if (chnk < Heap_heapPosMin) { + Heap_heapPosMin = blk + 8; + } + if (end > Heap_heapPosMax) { + Heap_heapPosMax = end; + } + } else { + if (chnk < Heap_heapNegMin) { + Heap_heapNegMin = blk + 8; + } + if (end > Heap_heapNegMax) { + Heap_heapNegMax = end; + } + } } return chnk; } @@ -207,9 +224,6 @@ static void Heap_ExtendHeap (INT64 blksz) __PUT(chnk, next, INT64); __PUT(j, chnk, INT64); } - if (next == 0) { - __GET(chnk + 8, Heap_heapend, INT64); - } } } @@ -592,7 +606,7 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) } while (sp != stack0) { __GET(sp, p, INT64); - if ((p > Heap_heap && p < Heap_heapend)) { + if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { if (nofcand == (INT64)cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -703,16 +717,20 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) void Heap_InitHeap (void) { - Heap_heap = Heap_NewChunk(256000); - __GET(Heap_heap + 8, Heap_heapend, INT64); - __PUT(Heap_heap, 0, INT64); + Heap_heap = 0; + Heap_heapsize = 0; Heap_allocated = 0; + Heap_lockdepth = 0; + Heap_heapPosMin = 9223372036854775807; + Heap_heapPosMax = 0; + Heap_heapNegMin = 0; + Heap_heapNegMax = (-9223372036854775807-1); + Heap_heap = Heap_NewChunk(256000); + __PUT(Heap_heap, 0, INT64); Heap_firstTry = 1; Heap_freeList[9] = 1; - Heap_lockdepth = 0; Heap_FileCount = 0; Heap_modules = NIL; - Heap_heapsize = 0; Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 6f099a6c..9daf685d 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index a6cc971c..f1d1a614 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index e651d9ec..d1227884 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 5ea38d2b..f174acdc 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index de00e17c..1efe3cf3 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index b28012be..4759eb74 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1659,9 +1659,9 @@ void OPC_CompleteIdent (OPT_Object obj) OPC_Ident(obj); OPM_WriteString((CHAR*)"__", 3); } else { - OPM_WriteString((CHAR*)"((", 3); + OPM_WriteString((CHAR*)"(*(", 4); OPC_Ident(obj->typ->strobj); - OPM_Write(')'); + OPM_WriteString((CHAR*)"*)&", 4); OPC_Ident(obj); OPM_Write(')'); } diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index f2ef814d..a485b3c4 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index ae88d2b7..5820c0cc 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 7f78e399..0b19f055 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 1167b5aa..ccf8dbe4 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 0d729ff7..6629924c 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 30737296..d5c0c747 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 4f1e8faa..87418922 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 958185d0..8122f444 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index d3950d01..019dee31 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index f90939e0..a03a1aab 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 54c8695a..401db9dd 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 9f596918..eba9222e 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index c4807be1..f58803a5 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 390490ed..def7cd38 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index de69c8e3..f9a40b7b 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 1a0aae45..5361bdcd 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index a39cdedc..cc2755f0 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index f29bce42..230f60a9 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index d67ec004..ad07bc6d 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 59875b4f..79492c57 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,27 +390,27 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t if (__IS(msg__typ, Texts_CopyMsg, 1)) { Texts_CopyMsg *msg__ = (void*)msg; __NEW(e, Texts__1); - Texts_CopyElem((void*)((Texts_Alien)E), (void*)e); - e->file = ((Texts_Alien)E)->file; - e->org = ((Texts_Alien)E)->org; - e->span = ((Texts_Alien)E)->span; - __COPY(((Texts_Alien)E)->mod, e->mod, 32); - __COPY(((Texts_Alien)E)->proc, e->proc, 32); + Texts_CopyElem((void*)(*(Texts_Alien*)&E), (void*)e); + e->file = (*(Texts_Alien*)&E)->file; + e->org = (*(Texts_Alien*)&E)->org; + e->span = (*(Texts_Alien*)&E)->span; + __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { Texts_IdentifyMsg *msg__ = (void*)msg; - __COPY(((Texts_Alien)E)->mod, (*msg__).mod, 32); - __COPY(((Texts_Alien)E)->proc, (*msg__).proc, 32); + __COPY((*(Texts_Alien*)&E)->mod, (*msg__).mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, (*msg__).proc, 32); (*msg__).mod[31] = 0x01; } else __WITHCHK; } else if (__IS(msg__typ, Texts_FileMsg, 1)) { if (__IS(msg__typ, Texts_FileMsg, 1)) { Texts_FileMsg *msg__ = (void*)msg; if ((*msg__).id == 1) { - Files_Set(&r, Files_Rider__typ, ((Texts_Alien)E)->file, ((Texts_Alien)E)->org); - i = ((Texts_Alien)E)->span; + Files_Set(&r, Files_Rider__typ, (*(Texts_Alien*)&E)->file, (*(Texts_Alien*)&E)->org); + i = (*(Texts_Alien*)&E)->span; while (i > 0) { Files_Read(&r, Files_Rider__typ, (void*)&ch); Files_Write(&(*msg__).r, Files_Rider__typ, ch); @@ -646,7 +646,7 @@ void Texts_Read (Texts_Reader *R, ADDRESS *R__typ, CHAR *ch) u = u->next; if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); } else __WITHCHK; } (*R).run = u; @@ -673,7 +673,7 @@ void Texts_ReadElem (Texts_Reader *R, ADDRESS *R__typ) (*R).elem = __GUARDP(u, Texts_ElemDesc, 1); if (__ISP(un, Texts_PieceDesc, 1)) { if (__ISP(un, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)un)->file, ((Texts_Piece)un)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&un)->file, (*(Texts_Piece*)&un)->org); } else __WITHCHK; } } else { @@ -1715,9 +1715,9 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) while (u != T->head) { if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - if (((Texts_Piece)u)->ascii) { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + if ((*(Texts_Piece*)&u)->ascii) { + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 0) { Files_Read(&r1, Files_Rider__typ, (void*)&ch); delta -= 1; @@ -1728,8 +1728,8 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) } } } else { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 8207d839..9042b9b8 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 14140265..57d8a782 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index b8dc8094..5e32e01b 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 7193bad6..18e626a3 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index b6367689..622a5a55 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index cf8a66c5..6200dcea 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index cbbddc2b..13c1e7ff 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index cacb981f..6f418c8a 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 22743378..ac192041 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index c932d3d5..dca42164 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index e39356ea..ae9ffcfb 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,7 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT32 Heap_heap, Heap_heapend; +static INT32 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -170,16 +170,33 @@ void Heap_INCREF (Heap_Module m) static INT32 Heap_NewChunk (INT32 blksz) { - INT32 chnk; + INT32 chnk, blk, end; chnk = Heap_OSAllocate(blksz + 12); if (chnk != 0) { - __PUT(chnk + 4, chnk + (12 + blksz), INT32); - __PUT(chnk + 12, chnk + 16, INT32); - __PUT(chnk + 16, blksz, INT32); - __PUT(chnk + 20, -4, INT32); - __PUT(chnk + 24, Heap_bigBlocks, INT32); - Heap_bigBlocks = chnk + 12; + blk = chnk + 12; + end = blk + blksz; + __PUT(chnk + 4, end, INT32); + __PUT(blk, blk + 4, INT32); + __PUT(blk + 4, blksz, INT32); + __PUT(blk + 8, -4, INT32); + __PUT(blk + 12, Heap_bigBlocks, INT32); + Heap_bigBlocks = blk; Heap_heapsize += blksz; + if (chnk > 0) { + if (chnk < Heap_heapPosMin) { + Heap_heapPosMin = blk + 4; + } + if (end > Heap_heapPosMax) { + Heap_heapPosMax = end; + } + } else { + if (chnk < Heap_heapNegMin) { + Heap_heapNegMin = blk + 4; + } + if (end > Heap_heapNegMax) { + Heap_heapNegMax = end; + } + } } return chnk; } @@ -207,9 +224,6 @@ static void Heap_ExtendHeap (INT32 blksz) __PUT(chnk, next, INT32); __PUT(j, chnk, INT32); } - if (next == 0) { - __GET(chnk + 4, Heap_heapend, INT32); - } } } @@ -592,7 +606,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) } while (sp != stack0) { __GET(sp, p, INT32); - if ((p > Heap_heap && p < Heap_heapend)) { + if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { if (nofcand == cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -703,16 +717,20 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) void Heap_InitHeap (void) { - Heap_heap = Heap_NewChunk(128000); - __GET(Heap_heap + 4, Heap_heapend, INT32); - __PUT(Heap_heap, 0, INT32); + Heap_heap = 0; + Heap_heapsize = 0; Heap_allocated = 0; + Heap_lockdepth = 0; + Heap_heapPosMin = 2147483647; + Heap_heapPosMax = 0; + Heap_heapNegMin = 0; + Heap_heapNegMax = (-2147483647-1); + Heap_heap = Heap_NewChunk(128000); + __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; Heap_freeList[9] = 1; - Heap_lockdepth = 0; Heap_FileCount = 0; Heap_modules = NIL; - Heap_heapsize = 0; Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 700aa7c2..0cf94754 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 8031a41f..e4fa8467 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index e651d9ec..d1227884 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 5ea38d2b..f174acdc 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index de00e17c..1efe3cf3 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index b28012be..4759eb74 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1659,9 +1659,9 @@ void OPC_CompleteIdent (OPT_Object obj) OPC_Ident(obj); OPM_WriteString((CHAR*)"__", 3); } else { - OPM_WriteString((CHAR*)"((", 3); + OPM_WriteString((CHAR*)"(*(", 4); OPC_Ident(obj->typ->strobj); - OPM_Write(')'); + OPM_WriteString((CHAR*)"*)&", 4); OPC_Ident(obj); OPM_Write(')'); } diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index f2ef814d..a485b3c4 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 5bdee03c..34ca07fd 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 7f78e399..0b19f055 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index e3c859a0..aef61fc9 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 0d729ff7..6629924c 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 30737296..d5c0c747 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 4f1e8faa..87418922 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index b84b0516..b4a68499 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index d3950d01..019dee31 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 9ad04131..ef5a6f06 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 54c8695a..401db9dd 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 32c0b1ba..7b3897d4 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index c4807be1..f58803a5 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index afe3e355..1dc027fb 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 6ce3eb3b..1154e6b1 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 1a0aae45..5361bdcd 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index a39cdedc..cc2755f0 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index f29bce42..230f60a9 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index d67ec004..ad07bc6d 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 4036d0d5..ffda81d3 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,27 +390,27 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t if (__IS(msg__typ, Texts_CopyMsg, 1)) { Texts_CopyMsg *msg__ = (void*)msg; __NEW(e, Texts__1); - Texts_CopyElem((void*)((Texts_Alien)E), (void*)e); - e->file = ((Texts_Alien)E)->file; - e->org = ((Texts_Alien)E)->org; - e->span = ((Texts_Alien)E)->span; - __COPY(((Texts_Alien)E)->mod, e->mod, 32); - __COPY(((Texts_Alien)E)->proc, e->proc, 32); + Texts_CopyElem((void*)(*(Texts_Alien*)&E), (void*)e); + e->file = (*(Texts_Alien*)&E)->file; + e->org = (*(Texts_Alien*)&E)->org; + e->span = (*(Texts_Alien*)&E)->span; + __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { Texts_IdentifyMsg *msg__ = (void*)msg; - __COPY(((Texts_Alien)E)->mod, (*msg__).mod, 32); - __COPY(((Texts_Alien)E)->proc, (*msg__).proc, 32); + __COPY((*(Texts_Alien*)&E)->mod, (*msg__).mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, (*msg__).proc, 32); (*msg__).mod[31] = 0x01; } else __WITHCHK; } else if (__IS(msg__typ, Texts_FileMsg, 1)) { if (__IS(msg__typ, Texts_FileMsg, 1)) { Texts_FileMsg *msg__ = (void*)msg; if ((*msg__).id == 1) { - Files_Set(&r, Files_Rider__typ, ((Texts_Alien)E)->file, ((Texts_Alien)E)->org); - i = ((Texts_Alien)E)->span; + Files_Set(&r, Files_Rider__typ, (*(Texts_Alien*)&E)->file, (*(Texts_Alien*)&E)->org); + i = (*(Texts_Alien*)&E)->span; while (i > 0) { Files_Read(&r, Files_Rider__typ, (void*)&ch); Files_Write(&(*msg__).r, Files_Rider__typ, ch); @@ -646,7 +646,7 @@ void Texts_Read (Texts_Reader *R, ADDRESS *R__typ, CHAR *ch) u = u->next; if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); } else __WITHCHK; } (*R).run = u; @@ -673,7 +673,7 @@ void Texts_ReadElem (Texts_Reader *R, ADDRESS *R__typ) (*R).elem = __GUARDP(u, Texts_ElemDesc, 1); if (__ISP(un, Texts_PieceDesc, 1)) { if (__ISP(un, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)un)->file, ((Texts_Piece)un)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&un)->file, (*(Texts_Piece*)&un)->org); } else __WITHCHK; } } else { @@ -1715,9 +1715,9 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) while (u != T->head) { if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - if (((Texts_Piece)u)->ascii) { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + if ((*(Texts_Piece*)&u)->ascii) { + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 0) { Files_Read(&r1, Files_Rider__typ, (void*)&ch); delta -= 1; @@ -1728,8 +1728,8 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) } } } else { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index befb04d5..ef53cdf5 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 14140265..57d8a782 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index b8dc8094..5e32e01b 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 7193bad6..18e626a3 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index b6367689..622a5a55 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index cf8a66c5..6200dcea 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index cbbddc2b..13c1e7ff 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index cacb981f..6f418c8a 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index dd14992a..517844d9 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 59d053bd..4453e976 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 49d8a8f6..ac52c6ae 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,7 @@ static INT64 Heap_freeList[10]; static INT64 Heap_bigBlocks; export INT64 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT64 Heap_heap, Heap_heapend; +static INT64 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT64 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -170,16 +170,33 @@ void Heap_INCREF (Heap_Module m) static INT64 Heap_NewChunk (INT64 blksz) { - INT64 chnk; + INT64 chnk, blk, end; chnk = Heap_OSAllocate(blksz + 24); if (chnk != 0) { - __PUT(chnk + 8, chnk + (24 + blksz), INT64); - __PUT(chnk + 24, chnk + 32, INT64); - __PUT(chnk + 32, blksz, INT64); - __PUT(chnk + 40, -8, INT64); - __PUT(chnk + 48, Heap_bigBlocks, INT64); - Heap_bigBlocks = chnk + 24; + blk = chnk + 24; + end = blk + blksz; + __PUT(chnk + 8, end, INT64); + __PUT(blk, blk + 8, INT64); + __PUT(blk + 8, blksz, INT64); + __PUT(blk + 16, -8, INT64); + __PUT(blk + 24, Heap_bigBlocks, INT64); + Heap_bigBlocks = blk; Heap_heapsize += blksz; + if (chnk > 0) { + if (chnk < Heap_heapPosMin) { + Heap_heapPosMin = blk + 8; + } + if (end > Heap_heapPosMax) { + Heap_heapPosMax = end; + } + } else { + if (chnk < Heap_heapNegMin) { + Heap_heapNegMin = blk + 8; + } + if (end > Heap_heapNegMax) { + Heap_heapNegMax = end; + } + } } return chnk; } @@ -207,9 +224,6 @@ static void Heap_ExtendHeap (INT64 blksz) __PUT(chnk, next, INT64); __PUT(j, chnk, INT64); } - if (next == 0) { - __GET(chnk + 8, Heap_heapend, INT64); - } } } @@ -592,7 +606,7 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) } while (sp != stack0) { __GET(sp, p, INT64); - if ((p > Heap_heap && p < Heap_heapend)) { + if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { if (nofcand == (INT64)cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -703,16 +717,20 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) void Heap_InitHeap (void) { - Heap_heap = Heap_NewChunk(256000); - __GET(Heap_heap + 8, Heap_heapend, INT64); - __PUT(Heap_heap, 0, INT64); + Heap_heap = 0; + Heap_heapsize = 0; Heap_allocated = 0; + Heap_lockdepth = 0; + Heap_heapPosMin = 9223372036854775807; + Heap_heapPosMax = 0; + Heap_heapNegMin = 0; + Heap_heapNegMax = (-9223372036854775807-1); + Heap_heap = Heap_NewChunk(256000); + __PUT(Heap_heap, 0, INT64); Heap_firstTry = 1; Heap_freeList[9] = 1; - Heap_lockdepth = 0; Heap_FileCount = 0; Heap_modules = NIL; - Heap_heapsize = 0; Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 6f099a6c..9daf685d 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index a6cc971c..f1d1a614 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index e651d9ec..d1227884 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 5ea38d2b..f174acdc 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index de00e17c..1efe3cf3 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index b28012be..4759eb74 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1659,9 +1659,9 @@ void OPC_CompleteIdent (OPT_Object obj) OPC_Ident(obj); OPM_WriteString((CHAR*)"__", 3); } else { - OPM_WriteString((CHAR*)"((", 3); + OPM_WriteString((CHAR*)"(*(", 4); OPC_Ident(obj->typ->strobj); - OPM_Write(')'); + OPM_WriteString((CHAR*)"*)&", 4); OPC_Ident(obj); OPM_Write(')'); } diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index f2ef814d..a485b3c4 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index ae88d2b7..5820c0cc 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 7f78e399..0b19f055 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 1167b5aa..ccf8dbe4 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 0d729ff7..6629924c 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 30737296..d5c0c747 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 4f1e8faa..87418922 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 958185d0..8122f444 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index d3950d01..019dee31 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index f90939e0..a03a1aab 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 54c8695a..401db9dd 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 32c0b1ba..7b3897d4 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index c4807be1..f58803a5 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 6ecc123d..37b61a0f 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 7182d9f7..eff1e977 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 1a0aae45..5361bdcd 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index a39cdedc..cc2755f0 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index f29bce42..230f60a9 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index d67ec004..ad07bc6d 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 59875b4f..79492c57 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,27 +390,27 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t if (__IS(msg__typ, Texts_CopyMsg, 1)) { Texts_CopyMsg *msg__ = (void*)msg; __NEW(e, Texts__1); - Texts_CopyElem((void*)((Texts_Alien)E), (void*)e); - e->file = ((Texts_Alien)E)->file; - e->org = ((Texts_Alien)E)->org; - e->span = ((Texts_Alien)E)->span; - __COPY(((Texts_Alien)E)->mod, e->mod, 32); - __COPY(((Texts_Alien)E)->proc, e->proc, 32); + Texts_CopyElem((void*)(*(Texts_Alien*)&E), (void*)e); + e->file = (*(Texts_Alien*)&E)->file; + e->org = (*(Texts_Alien*)&E)->org; + e->span = (*(Texts_Alien*)&E)->span; + __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { Texts_IdentifyMsg *msg__ = (void*)msg; - __COPY(((Texts_Alien)E)->mod, (*msg__).mod, 32); - __COPY(((Texts_Alien)E)->proc, (*msg__).proc, 32); + __COPY((*(Texts_Alien*)&E)->mod, (*msg__).mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, (*msg__).proc, 32); (*msg__).mod[31] = 0x01; } else __WITHCHK; } else if (__IS(msg__typ, Texts_FileMsg, 1)) { if (__IS(msg__typ, Texts_FileMsg, 1)) { Texts_FileMsg *msg__ = (void*)msg; if ((*msg__).id == 1) { - Files_Set(&r, Files_Rider__typ, ((Texts_Alien)E)->file, ((Texts_Alien)E)->org); - i = ((Texts_Alien)E)->span; + Files_Set(&r, Files_Rider__typ, (*(Texts_Alien*)&E)->file, (*(Texts_Alien*)&E)->org); + i = (*(Texts_Alien*)&E)->span; while (i > 0) { Files_Read(&r, Files_Rider__typ, (void*)&ch); Files_Write(&(*msg__).r, Files_Rider__typ, ch); @@ -646,7 +646,7 @@ void Texts_Read (Texts_Reader *R, ADDRESS *R__typ, CHAR *ch) u = u->next; if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); } else __WITHCHK; } (*R).run = u; @@ -673,7 +673,7 @@ void Texts_ReadElem (Texts_Reader *R, ADDRESS *R__typ) (*R).elem = __GUARDP(u, Texts_ElemDesc, 1); if (__ISP(un, Texts_PieceDesc, 1)) { if (__ISP(un, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)un)->file, ((Texts_Piece)un)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&un)->file, (*(Texts_Piece*)&un)->org); } else __WITHCHK; } } else { @@ -1715,9 +1715,9 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) while (u != T->head) { if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - if (((Texts_Piece)u)->ascii) { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + if ((*(Texts_Piece*)&u)->ascii) { + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 0) { Files_Read(&r1, Files_Rider__typ, (void*)&ch); delta -= 1; @@ -1728,8 +1728,8 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) } } } else { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 8207d839..9042b9b8 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 14140265..57d8a782 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index b8dc8094..5e32e01b 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 7193bad6..18e626a3 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index b6367689..622a5a55 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h