diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index b4cdd828..0719daf0 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" @@ -13,6 +13,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/08/20] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/08/21] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index c108c791..c88b42d9 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Console.c b/bootstrap/unix-44/Console.c index d0c9621d..4ac0dbdf 100644 --- a/bootstrap/unix-44/Console.c +++ b/bootstrap/unix-44/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/unix-44/Console.h b/bootstrap/unix-44/Console.h index 6fc6afd9..02922b40 100644 --- a/bootstrap/unix-44/Console.h +++ b/bootstrap/unix-44/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index e175fe23..4cf07aee 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 694e9589..3f9cea7d 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 395a53ab..38736ac9 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tskSfF */ #include "SYSTEM.h" struct Heap__1 { diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index b503b070..e1b6dd47 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 49f8a341..a834d08d 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Heap.h" diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index ac58c524..5f2fed1e 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 6567ca50..ba3277ca 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 20c7906a..a9e39066 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 7ce3cbe5..5ff4ff70 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "OPM.h" diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 8786c7c6..b5ddfc97 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 4bdc065f..6804e6b8 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 5f8cc38c..a335fc40 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 16e0120d..76a20bea 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPB.h" #include "OPM.h" diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index fd1bcfb5..50124414 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index d0000064..bb5a1923 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index fa915439..a733c4f9 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index fb9d4f53..7b08e8d6 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index a492d562..399f1b54 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 50f58fae..be86a231 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPC.h" #include "OPM.h" @@ -23,7 +23,7 @@ export LONGINT *OPV_ExitInfo__typ; static void OPV_ActualPar (OPT_Node n, OPT_Object fp); export void OPV_AdrAndSize (OPT_Object topScope); static void OPV_CaseStat (OPT_Node n, OPT_Object outerProc); -static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec); +static void OPV_Convert (OPT_Node n, OPT_Struct typ, INTEGER prec); static void OPV_DefineTDescs (OPT_Node n); static void OPV_Entier (OPT_Node n, INTEGER prec); static void OPV_GetTProcNum (OPT_Object obj); @@ -38,6 +38,7 @@ static LONGINT OPV_NaturalAlignment (LONGINT size, LONGINT max); static void OPV_NewArr (OPT_Node d, OPT_Node x); static INTEGER OPV_Precedence (INTEGER class, INTEGER subclass, INTEGER form, INTEGER comp); static BOOLEAN OPV_SideEffects (OPT_Node n); +static void OPV_SizeCast (LONGINT size); static void OPV_Stamp (OPS_Name s); static OPT_Object OPV_SuperProc (OPT_Node n); static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exported); @@ -465,20 +466,32 @@ static void OPV_Entier (OPT_Node n, INTEGER prec) } } -static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) +static void OPV_SizeCast (LONGINT size) { - INTEGER from; + if (size <= (LONGINT)OPM_SIntSize) { + OPM_WriteString((CHAR*)"(SHORTINT)", (LONGINT)11); + } else if (size <= (LONGINT)OPM_IntSize) { + OPM_WriteString((CHAR*)"(INTEGER)", (LONGINT)10); + } else { + OPM_WriteString((CHAR*)"(LONGINT)", (LONGINT)10); + } +} + +static void OPV_Convert (OPT_Node n, OPT_Struct typ, INTEGER prec) +{ + INTEGER from, to; from = n->typ->form; - if (form == 9) { + to = typ->form; + if (to == 9) { OPM_WriteString((CHAR*)"__SETOF(", (LONGINT)9); OPV_Entier(n, -1); OPM_Write(')'); - } else if (form == 6) { + } else if (to == 6) { if (from < 6) { OPM_WriteString((CHAR*)"(LONGINT)", (LONGINT)10); } OPV_Entier(n, 9); - } else if (form == 5) { + } else if (to == 5) { if (from < 5) { OPM_WriteString((CHAR*)"(int)", (LONGINT)6); OPV_expr(n, 9); @@ -498,7 +511,7 @@ static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) OPV_Entier(n, 9); } } - } else if (form == 4) { + } else if (to == 4) { if (__IN(2, OPM_opt)) { OPM_WriteString((CHAR*)"__SHORT", (LONGINT)8); if (OPV_SideEffects(n)) { @@ -513,7 +526,7 @@ static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) OPM_WriteString((CHAR*)"(int)", (LONGINT)6); OPV_Entier(n, 9); } - } else if (form == 3) { + } else if (to == 3) { if (__IN(2, OPM_opt)) { OPM_WriteString((CHAR*)"__CHR", (LONGINT)6); if (OPV_SideEffects(n)) { @@ -576,7 +589,7 @@ static void OPV_design (OPT_Node n, INTEGER prec) OPT_Struct typ = NIL; INTEGER class, designPrec, comp; OPT_Node d = NIL, x = NIL; - INTEGER dims, i, _for__26; + INTEGER dims, i, _for__27; comp = n->typ->comp; obj = n->obj; class = n->class; @@ -652,9 +665,9 @@ static void OPV_design (OPT_Node n, INTEGER prec) } x = x->left; } - _for__26 = dims; + _for__27 = dims; i = 1; - while (i <= _for__26) { + while (i <= _for__27) { OPM_Write(')'); i += 1; } @@ -914,7 +927,7 @@ static void OPV_expr (OPT_Node n, INTEGER prec) OPM_Write(')'); break; case 20: - OPV_Convert(l, form, exprPrec); + OPV_Convert(l, n->typ, exprPrec); break; case 21: if (OPV_SideEffects(l)) { diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 90fd99e0..86314bd0 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 196fab12..0e0574d0 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index d4c03121..800e014e 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index b7e710d1..32d73c00 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 9e6fe8b0..f59cf847 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 93143345..f327b94d 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 692cd75c..178625ae 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 17a5095c..f8bf9b6c 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 49e953e7..3b33e69e 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/Vishap.c b/bootstrap/unix-44/Vishap.c index a9dfcfeb..7fa5246d 100644 --- a/bootstrap/unix-44/Vishap.c +++ b/bootstrap/unix-44/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkamSf */ #include "SYSTEM.h" #include "Configuration.h" #include "Heap.h" diff --git a/bootstrap/unix-44/errors.c b/bootstrap/unix-44/errors.c index af15b204..595cbc2e 100644 --- a/bootstrap/unix-44/errors.c +++ b/bootstrap/unix-44/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-44/errors.h b/bootstrap/unix-44/errors.h index 79a85935..b1be0927 100644 --- a/bootstrap/unix-44/errors.h +++ b/bootstrap/unix-44/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index ff1668dc..207af008 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 6954be86..43a2690a 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-44/vt100.c b/bootstrap/unix-44/vt100.c index 72e640c5..88f1a6f5 100644 --- a/bootstrap/unix-44/vt100.c +++ b/bootstrap/unix-44/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Strings.h" diff --git a/bootstrap/unix-44/vt100.h b/bootstrap/unix-44/vt100.h index de72ffbc..8c4a8815 100644 --- a/bootstrap/unix-44/vt100.h +++ b/bootstrap/unix-44/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index b4cdd828..0719daf0 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" @@ -13,6 +13,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/08/20] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/08/21] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index c108c791..c88b42d9 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Console.c b/bootstrap/unix-48/Console.c index d0c9621d..4ac0dbdf 100644 --- a/bootstrap/unix-48/Console.c +++ b/bootstrap/unix-48/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/unix-48/Console.h b/bootstrap/unix-48/Console.h index 6fc6afd9..02922b40 100644 --- a/bootstrap/unix-48/Console.h +++ b/bootstrap/unix-48/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index e175fe23..4cf07aee 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 694e9589..3f9cea7d 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 395a53ab..38736ac9 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tskSfF */ #include "SYSTEM.h" struct Heap__1 { diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index b503b070..e1b6dd47 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 49f8a341..a834d08d 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Heap.h" diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index ac58c524..5f2fed1e 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 6567ca50..ba3277ca 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 20c7906a..a9e39066 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 7ce3cbe5..5ff4ff70 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "OPM.h" diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 8786c7c6..b5ddfc97 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 4bdc065f..6804e6b8 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 5f8cc38c..a335fc40 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 16e0120d..76a20bea 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPB.h" #include "OPM.h" diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index fd1bcfb5..50124414 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index d0000064..bb5a1923 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index fa915439..a733c4f9 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index fb9d4f53..7b08e8d6 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index a492d562..399f1b54 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 50f58fae..be86a231 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPC.h" #include "OPM.h" @@ -23,7 +23,7 @@ export LONGINT *OPV_ExitInfo__typ; static void OPV_ActualPar (OPT_Node n, OPT_Object fp); export void OPV_AdrAndSize (OPT_Object topScope); static void OPV_CaseStat (OPT_Node n, OPT_Object outerProc); -static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec); +static void OPV_Convert (OPT_Node n, OPT_Struct typ, INTEGER prec); static void OPV_DefineTDescs (OPT_Node n); static void OPV_Entier (OPT_Node n, INTEGER prec); static void OPV_GetTProcNum (OPT_Object obj); @@ -38,6 +38,7 @@ static LONGINT OPV_NaturalAlignment (LONGINT size, LONGINT max); static void OPV_NewArr (OPT_Node d, OPT_Node x); static INTEGER OPV_Precedence (INTEGER class, INTEGER subclass, INTEGER form, INTEGER comp); static BOOLEAN OPV_SideEffects (OPT_Node n); +static void OPV_SizeCast (LONGINT size); static void OPV_Stamp (OPS_Name s); static OPT_Object OPV_SuperProc (OPT_Node n); static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exported); @@ -465,20 +466,32 @@ static void OPV_Entier (OPT_Node n, INTEGER prec) } } -static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) +static void OPV_SizeCast (LONGINT size) { - INTEGER from; + if (size <= (LONGINT)OPM_SIntSize) { + OPM_WriteString((CHAR*)"(SHORTINT)", (LONGINT)11); + } else if (size <= (LONGINT)OPM_IntSize) { + OPM_WriteString((CHAR*)"(INTEGER)", (LONGINT)10); + } else { + OPM_WriteString((CHAR*)"(LONGINT)", (LONGINT)10); + } +} + +static void OPV_Convert (OPT_Node n, OPT_Struct typ, INTEGER prec) +{ + INTEGER from, to; from = n->typ->form; - if (form == 9) { + to = typ->form; + if (to == 9) { OPM_WriteString((CHAR*)"__SETOF(", (LONGINT)9); OPV_Entier(n, -1); OPM_Write(')'); - } else if (form == 6) { + } else if (to == 6) { if (from < 6) { OPM_WriteString((CHAR*)"(LONGINT)", (LONGINT)10); } OPV_Entier(n, 9); - } else if (form == 5) { + } else if (to == 5) { if (from < 5) { OPM_WriteString((CHAR*)"(int)", (LONGINT)6); OPV_expr(n, 9); @@ -498,7 +511,7 @@ static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) OPV_Entier(n, 9); } } - } else if (form == 4) { + } else if (to == 4) { if (__IN(2, OPM_opt)) { OPM_WriteString((CHAR*)"__SHORT", (LONGINT)8); if (OPV_SideEffects(n)) { @@ -513,7 +526,7 @@ static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) OPM_WriteString((CHAR*)"(int)", (LONGINT)6); OPV_Entier(n, 9); } - } else if (form == 3) { + } else if (to == 3) { if (__IN(2, OPM_opt)) { OPM_WriteString((CHAR*)"__CHR", (LONGINT)6); if (OPV_SideEffects(n)) { @@ -576,7 +589,7 @@ static void OPV_design (OPT_Node n, INTEGER prec) OPT_Struct typ = NIL; INTEGER class, designPrec, comp; OPT_Node d = NIL, x = NIL; - INTEGER dims, i, _for__26; + INTEGER dims, i, _for__27; comp = n->typ->comp; obj = n->obj; class = n->class; @@ -652,9 +665,9 @@ static void OPV_design (OPT_Node n, INTEGER prec) } x = x->left; } - _for__26 = dims; + _for__27 = dims; i = 1; - while (i <= _for__26) { + while (i <= _for__27) { OPM_Write(')'); i += 1; } @@ -914,7 +927,7 @@ static void OPV_expr (OPT_Node n, INTEGER prec) OPM_Write(')'); break; case 20: - OPV_Convert(l, form, exprPrec); + OPV_Convert(l, n->typ, exprPrec); break; case 21: if (OPV_SideEffects(l)) { diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 90fd99e0..86314bd0 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 196fab12..0e0574d0 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index d4c03121..800e014e 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index b7e710d1..32d73c00 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 9e6fe8b0..f59cf847 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 93143345..f327b94d 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 692cd75c..178625ae 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 110f4931..146b616c 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 6000e489..66ed469b 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/Vishap.c b/bootstrap/unix-48/Vishap.c index a9dfcfeb..7fa5246d 100644 --- a/bootstrap/unix-48/Vishap.c +++ b/bootstrap/unix-48/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkamSf */ #include "SYSTEM.h" #include "Configuration.h" #include "Heap.h" diff --git a/bootstrap/unix-48/errors.c b/bootstrap/unix-48/errors.c index af15b204..595cbc2e 100644 --- a/bootstrap/unix-48/errors.c +++ b/bootstrap/unix-48/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-48/errors.h b/bootstrap/unix-48/errors.h index 79a85935..b1be0927 100644 --- a/bootstrap/unix-48/errors.h +++ b/bootstrap/unix-48/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index ff1668dc..207af008 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 6954be86..43a2690a 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/vt100.c b/bootstrap/unix-48/vt100.c index 72e640c5..88f1a6f5 100644 --- a/bootstrap/unix-48/vt100.c +++ b/bootstrap/unix-48/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Strings.h" diff --git a/bootstrap/unix-48/vt100.h b/bootstrap/unix-48/vt100.h index de72ffbc..8c4a8815 100644 --- a/bootstrap/unix-48/vt100.h +++ b/bootstrap/unix-48/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index a917e60f..91dc75d4 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" @@ -14,6 +14,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/08/20] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/08/21] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 8c710916..6973a0c1 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Console.c b/bootstrap/unix-88/Console.c index 40695c51..c05dabb9 100644 --- a/bootstrap/unix-88/Console.c +++ b/bootstrap/unix-88/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/unix-88/Console.h b/bootstrap/unix-88/Console.h index 5c76ef74..2cbaea0b 100644 --- a/bootstrap/unix-88/Console.h +++ b/bootstrap/unix-88/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 9c7a1af7..69f3f776 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 82661e2c..3b2a59d0 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 2ba52d2f..1c901beb 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tskSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 53b21f41..ef54122d 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 9efb8a96..c29c2e54 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 25b9b785..181d0424 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 73daf26e..ecedb8bd 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 6e90fcf5..b921c5dd 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index b74145a7..882d84ed 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 525240c8..40e26bf3 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 1517e019..3cf552ce 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index db45a834..96e1e2b2 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 8c5428b2..fcecc854 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPB.h" diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 04840f08..76568492 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 5196bbd6..389d55af 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index b4346886..f8981f03 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 365abe0b..f09315bf 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 4fe1b205..7f0e4159 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 2632d95e..1ea32c76 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPC.h" @@ -24,7 +24,7 @@ export LONGINT *OPV_ExitInfo__typ; static void OPV_ActualPar (OPT_Node n, OPT_Object fp); export void OPV_AdrAndSize (OPT_Object topScope); static void OPV_CaseStat (OPT_Node n, OPT_Object outerProc); -static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec); +static void OPV_Convert (OPT_Node n, OPT_Struct typ, INTEGER prec); static void OPV_DefineTDescs (OPT_Node n); static void OPV_Entier (OPT_Node n, INTEGER prec); static void OPV_GetTProcNum (OPT_Object obj); @@ -39,6 +39,7 @@ static LONGINT OPV_NaturalAlignment (LONGINT size, LONGINT max); static void OPV_NewArr (OPT_Node d, OPT_Node x); static INTEGER OPV_Precedence (INTEGER class, INTEGER subclass, INTEGER form, INTEGER comp); static BOOLEAN OPV_SideEffects (OPT_Node n); +static void OPV_SizeCast (LONGINT size); static void OPV_Stamp (OPS_Name s); static OPT_Object OPV_SuperProc (OPT_Node n); static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exported); @@ -466,20 +467,32 @@ static void OPV_Entier (OPT_Node n, INTEGER prec) } } -static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) +static void OPV_SizeCast (LONGINT size) { - INTEGER from; + if (size <= (LONGINT)OPM_SIntSize) { + OPM_WriteString((CHAR*)"(SHORTINT)", (LONGINT)11); + } else if (size <= (LONGINT)OPM_IntSize) { + OPM_WriteString((CHAR*)"(INTEGER)", (LONGINT)10); + } else { + OPM_WriteString((CHAR*)"(LONGINT)", (LONGINT)10); + } +} + +static void OPV_Convert (OPT_Node n, OPT_Struct typ, INTEGER prec) +{ + INTEGER from, to; from = n->typ->form; - if (form == 9) { + to = typ->form; + if (to == 9) { OPM_WriteString((CHAR*)"__SETOF(", (LONGINT)9); OPV_Entier(n, -1); OPM_Write(')'); - } else if (form == 6) { + } else if (to == 6) { if (from < 6) { OPM_WriteString((CHAR*)"(LONGINT)", (LONGINT)10); } OPV_Entier(n, 9); - } else if (form == 5) { + } else if (to == 5) { if (from < 5) { OPM_WriteString((CHAR*)"(int)", (LONGINT)6); OPV_expr(n, 9); @@ -499,7 +512,7 @@ static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) OPV_Entier(n, 9); } } - } else if (form == 4) { + } else if (to == 4) { if (__IN(2, OPM_opt)) { OPM_WriteString((CHAR*)"__SHORT", (LONGINT)8); if (OPV_SideEffects(n)) { @@ -514,7 +527,7 @@ static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) OPM_WriteString((CHAR*)"(int)", (LONGINT)6); OPV_Entier(n, 9); } - } else if (form == 3) { + } else if (to == 3) { if (__IN(2, OPM_opt)) { OPM_WriteString((CHAR*)"__CHR", (LONGINT)6); if (OPV_SideEffects(n)) { @@ -577,7 +590,7 @@ static void OPV_design (OPT_Node n, INTEGER prec) OPT_Struct typ = NIL; INTEGER class, designPrec, comp; OPT_Node d = NIL, x = NIL; - INTEGER dims, i, _for__26; + INTEGER dims, i, _for__27; comp = n->typ->comp; obj = n->obj; class = n->class; @@ -653,9 +666,9 @@ static void OPV_design (OPT_Node n, INTEGER prec) } x = x->left; } - _for__26 = dims; + _for__27 = dims; i = 1; - while (i <= _for__26) { + while (i <= _for__27) { OPM_Write(')'); i += 1; } @@ -915,7 +928,7 @@ static void OPV_expr (OPT_Node n, INTEGER prec) OPM_Write(')'); break; case 20: - OPV_Convert(l, form, exprPrec); + OPV_Convert(l, n->typ, exprPrec); break; case 21: if (OPV_SideEffects(l)) { diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 349e3d10..92f7087d 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 3dd6c3f2..9cb82f63 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 74c368da..95db62d1 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index e42135a4..560e16bf 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 3a3a206a..ae552097 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index b64d7db9..c2c341b0 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 68433fb9..bfe312c0 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index a3432709..2b941f46 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Files.h" diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index a86b8717..402a45b4 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/Vishap.c b/bootstrap/unix-88/Vishap.c index b889aad9..377aa70c 100644 --- a/bootstrap/unix-88/Vishap.c +++ b/bootstrap/unix-88/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkamSf */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/errors.c b/bootstrap/unix-88/errors.c index 98e42790..01c4cec3 100644 --- a/bootstrap/unix-88/errors.c +++ b/bootstrap/unix-88/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/errors.h b/bootstrap/unix-88/errors.h index 314ab2dc..879ebb6b 100644 --- a/bootstrap/unix-88/errors.h +++ b/bootstrap/unix-88/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 8a238c7f..cd8571d6 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 359df725..1a9020bd 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/vt100.c b/bootstrap/unix-88/vt100.c index 99663386..8b88e190 100644 --- a/bootstrap/unix-88/vt100.c +++ b/bootstrap/unix-88/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/unix-88/vt100.h b/bootstrap/unix-88/vt100.h index 94b58ced..368af3a0 100644 --- a/bootstrap/unix-88/vt100.h +++ b/bootstrap/unix-88/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index b4cdd828..0719daf0 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" @@ -13,6 +13,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/08/20] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/08/21] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index c108c791..c88b42d9 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Console.c b/bootstrap/windows-48/Console.c index d1736bef..d409b0c9 100644 --- a/bootstrap/windows-48/Console.c +++ b/bootstrap/windows-48/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/windows-48/Console.h b/bootstrap/windows-48/Console.h index 6fc6afd9..02922b40 100644 --- a/bootstrap/windows-48/Console.h +++ b/bootstrap/windows-48/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 3460499e..15b6bfe7 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index cfe27379..7c21fe50 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 395a53ab..38736ac9 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tskSfF */ #include "SYSTEM.h" struct Heap__1 { diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index b503b070..e1b6dd47 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 49f8a341..a834d08d 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Heap.h" diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index ac58c524..5f2fed1e 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 6567ca50..ba3277ca 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 20c7906a..a9e39066 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 7ce3cbe5..5ff4ff70 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "OPM.h" diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 8786c7c6..b5ddfc97 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 4bdc065f..6804e6b8 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 5f8cc38c..a335fc40 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 16e0120d..76a20bea 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPB.h" #include "OPM.h" diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index fd1bcfb5..50124414 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index d0000064..bb5a1923 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index fa915439..a733c4f9 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index fb9d4f53..7b08e8d6 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index a492d562..399f1b54 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 50f58fae..be86a231 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPC.h" #include "OPM.h" @@ -23,7 +23,7 @@ export LONGINT *OPV_ExitInfo__typ; static void OPV_ActualPar (OPT_Node n, OPT_Object fp); export void OPV_AdrAndSize (OPT_Object topScope); static void OPV_CaseStat (OPT_Node n, OPT_Object outerProc); -static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec); +static void OPV_Convert (OPT_Node n, OPT_Struct typ, INTEGER prec); static void OPV_DefineTDescs (OPT_Node n); static void OPV_Entier (OPT_Node n, INTEGER prec); static void OPV_GetTProcNum (OPT_Object obj); @@ -38,6 +38,7 @@ static LONGINT OPV_NaturalAlignment (LONGINT size, LONGINT max); static void OPV_NewArr (OPT_Node d, OPT_Node x); static INTEGER OPV_Precedence (INTEGER class, INTEGER subclass, INTEGER form, INTEGER comp); static BOOLEAN OPV_SideEffects (OPT_Node n); +static void OPV_SizeCast (LONGINT size); static void OPV_Stamp (OPS_Name s); static OPT_Object OPV_SuperProc (OPT_Node n); static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exported); @@ -465,20 +466,32 @@ static void OPV_Entier (OPT_Node n, INTEGER prec) } } -static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) +static void OPV_SizeCast (LONGINT size) { - INTEGER from; + if (size <= (LONGINT)OPM_SIntSize) { + OPM_WriteString((CHAR*)"(SHORTINT)", (LONGINT)11); + } else if (size <= (LONGINT)OPM_IntSize) { + OPM_WriteString((CHAR*)"(INTEGER)", (LONGINT)10); + } else { + OPM_WriteString((CHAR*)"(LONGINT)", (LONGINT)10); + } +} + +static void OPV_Convert (OPT_Node n, OPT_Struct typ, INTEGER prec) +{ + INTEGER from, to; from = n->typ->form; - if (form == 9) { + to = typ->form; + if (to == 9) { OPM_WriteString((CHAR*)"__SETOF(", (LONGINT)9); OPV_Entier(n, -1); OPM_Write(')'); - } else if (form == 6) { + } else if (to == 6) { if (from < 6) { OPM_WriteString((CHAR*)"(LONGINT)", (LONGINT)10); } OPV_Entier(n, 9); - } else if (form == 5) { + } else if (to == 5) { if (from < 5) { OPM_WriteString((CHAR*)"(int)", (LONGINT)6); OPV_expr(n, 9); @@ -498,7 +511,7 @@ static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) OPV_Entier(n, 9); } } - } else if (form == 4) { + } else if (to == 4) { if (__IN(2, OPM_opt)) { OPM_WriteString((CHAR*)"__SHORT", (LONGINT)8); if (OPV_SideEffects(n)) { @@ -513,7 +526,7 @@ static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) OPM_WriteString((CHAR*)"(int)", (LONGINT)6); OPV_Entier(n, 9); } - } else if (form == 3) { + } else if (to == 3) { if (__IN(2, OPM_opt)) { OPM_WriteString((CHAR*)"__CHR", (LONGINT)6); if (OPV_SideEffects(n)) { @@ -576,7 +589,7 @@ static void OPV_design (OPT_Node n, INTEGER prec) OPT_Struct typ = NIL; INTEGER class, designPrec, comp; OPT_Node d = NIL, x = NIL; - INTEGER dims, i, _for__26; + INTEGER dims, i, _for__27; comp = n->typ->comp; obj = n->obj; class = n->class; @@ -652,9 +665,9 @@ static void OPV_design (OPT_Node n, INTEGER prec) } x = x->left; } - _for__26 = dims; + _for__27 = dims; i = 1; - while (i <= _for__26) { + while (i <= _for__27) { OPM_Write(')'); i += 1; } @@ -914,7 +927,7 @@ static void OPV_expr (OPT_Node n, INTEGER prec) OPM_Write(')'); break; case 20: - OPV_Convert(l, form, exprPrec); + OPV_Convert(l, n->typ, exprPrec); break; case 21: if (OPV_SideEffects(l)) { diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 90fd99e0..86314bd0 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 9ec851b2..1b402380 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index a2f6181f..9352c3d3 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index b7e710d1..32d73c00 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 9e6fe8b0..f59cf847 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 93143345..f327b94d 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 692cd75c..178625ae 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 110f4931..146b616c 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 6000e489..66ed469b 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/Vishap.c b/bootstrap/windows-48/Vishap.c index a9dfcfeb..7fa5246d 100644 --- a/bootstrap/windows-48/Vishap.c +++ b/bootstrap/windows-48/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkamSf */ #include "SYSTEM.h" #include "Configuration.h" #include "Heap.h" diff --git a/bootstrap/windows-48/errors.c b/bootstrap/windows-48/errors.c index af15b204..595cbc2e 100644 --- a/bootstrap/windows-48/errors.c +++ b/bootstrap/windows-48/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/windows-48/errors.h b/bootstrap/windows-48/errors.h index 79a85935..b1be0927 100644 --- a/bootstrap/windows-48/errors.h +++ b/bootstrap/windows-48/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index ff1668dc..207af008 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 6954be86..43a2690a 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/vt100.c b/bootstrap/windows-48/vt100.c index 72e640c5..88f1a6f5 100644 --- a/bootstrap/windows-48/vt100.c +++ b/bootstrap/windows-48/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Strings.h" diff --git a/bootstrap/windows-48/vt100.h b/bootstrap/windows-48/vt100.h index de72ffbc..8c4a8815 100644 --- a/bootstrap/windows-48/vt100.h +++ b/bootstrap/windows-48/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index a917e60f..91dc75d4 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" @@ -14,6 +14,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/08/20] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/08/21] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 8c710916..6973a0c1 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Console.c b/bootstrap/windows-88/Console.c index 7ebcf06b..4538d7cc 100644 --- a/bootstrap/windows-88/Console.c +++ b/bootstrap/windows-88/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/windows-88/Console.h b/bootstrap/windows-88/Console.h index 5c76ef74..2cbaea0b 100644 --- a/bootstrap/windows-88/Console.h +++ b/bootstrap/windows-88/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index c1f4b480..cac14c87 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 302ea14e..9319a396 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 2ba52d2f..1c901beb 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tskSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 53b21f41..ef54122d 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 9efb8a96..c29c2e54 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 25b9b785..181d0424 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 73daf26e..ecedb8bd 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 6e90fcf5..b921c5dd 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index b74145a7..882d84ed 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 525240c8..40e26bf3 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 1517e019..3cf552ce 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index db45a834..96e1e2b2 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 8c5428b2..fcecc854 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPB.h" diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 04840f08..76568492 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 5196bbd6..389d55af 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index b4346886..f8981f03 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 365abe0b..f09315bf 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 4fe1b205..7f0e4159 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 2632d95e..1ea32c76 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPC.h" @@ -24,7 +24,7 @@ export LONGINT *OPV_ExitInfo__typ; static void OPV_ActualPar (OPT_Node n, OPT_Object fp); export void OPV_AdrAndSize (OPT_Object topScope); static void OPV_CaseStat (OPT_Node n, OPT_Object outerProc); -static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec); +static void OPV_Convert (OPT_Node n, OPT_Struct typ, INTEGER prec); static void OPV_DefineTDescs (OPT_Node n); static void OPV_Entier (OPT_Node n, INTEGER prec); static void OPV_GetTProcNum (OPT_Object obj); @@ -39,6 +39,7 @@ static LONGINT OPV_NaturalAlignment (LONGINT size, LONGINT max); static void OPV_NewArr (OPT_Node d, OPT_Node x); static INTEGER OPV_Precedence (INTEGER class, INTEGER subclass, INTEGER form, INTEGER comp); static BOOLEAN OPV_SideEffects (OPT_Node n); +static void OPV_SizeCast (LONGINT size); static void OPV_Stamp (OPS_Name s); static OPT_Object OPV_SuperProc (OPT_Node n); static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exported); @@ -466,20 +467,32 @@ static void OPV_Entier (OPT_Node n, INTEGER prec) } } -static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) +static void OPV_SizeCast (LONGINT size) { - INTEGER from; + if (size <= (LONGINT)OPM_SIntSize) { + OPM_WriteString((CHAR*)"(SHORTINT)", (LONGINT)11); + } else if (size <= (LONGINT)OPM_IntSize) { + OPM_WriteString((CHAR*)"(INTEGER)", (LONGINT)10); + } else { + OPM_WriteString((CHAR*)"(LONGINT)", (LONGINT)10); + } +} + +static void OPV_Convert (OPT_Node n, OPT_Struct typ, INTEGER prec) +{ + INTEGER from, to; from = n->typ->form; - if (form == 9) { + to = typ->form; + if (to == 9) { OPM_WriteString((CHAR*)"__SETOF(", (LONGINT)9); OPV_Entier(n, -1); OPM_Write(')'); - } else if (form == 6) { + } else if (to == 6) { if (from < 6) { OPM_WriteString((CHAR*)"(LONGINT)", (LONGINT)10); } OPV_Entier(n, 9); - } else if (form == 5) { + } else if (to == 5) { if (from < 5) { OPM_WriteString((CHAR*)"(int)", (LONGINT)6); OPV_expr(n, 9); @@ -499,7 +512,7 @@ static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) OPV_Entier(n, 9); } } - } else if (form == 4) { + } else if (to == 4) { if (__IN(2, OPM_opt)) { OPM_WriteString((CHAR*)"__SHORT", (LONGINT)8); if (OPV_SideEffects(n)) { @@ -514,7 +527,7 @@ static void OPV_Convert (OPT_Node n, INTEGER form, INTEGER prec) OPM_WriteString((CHAR*)"(int)", (LONGINT)6); OPV_Entier(n, 9); } - } else if (form == 3) { + } else if (to == 3) { if (__IN(2, OPM_opt)) { OPM_WriteString((CHAR*)"__CHR", (LONGINT)6); if (OPV_SideEffects(n)) { @@ -577,7 +590,7 @@ static void OPV_design (OPT_Node n, INTEGER prec) OPT_Struct typ = NIL; INTEGER class, designPrec, comp; OPT_Node d = NIL, x = NIL; - INTEGER dims, i, _for__26; + INTEGER dims, i, _for__27; comp = n->typ->comp; obj = n->obj; class = n->class; @@ -653,9 +666,9 @@ static void OPV_design (OPT_Node n, INTEGER prec) } x = x->left; } - _for__26 = dims; + _for__27 = dims; i = 1; - while (i <= _for__26) { + while (i <= _for__27) { OPM_Write(')'); i += 1; } @@ -915,7 +928,7 @@ static void OPV_expr (OPT_Node n, INTEGER prec) OPM_Write(')'); break; case 20: - OPV_Convert(l, form, exprPrec); + OPV_Convert(l, n->typ, exprPrec); break; case 21: if (OPV_SideEffects(l)) { diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 349e3d10..92f7087d 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 9305e613..042e2829 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 72eceb25..4a85170e 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index e42135a4..560e16bf 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 3a3a206a..ae552097 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index b64d7db9..c2c341b0 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 68433fb9..bfe312c0 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index a3432709..2b941f46 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Files.h" diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index a86b8717..402a45b4 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/Vishap.c b/bootstrap/windows-88/Vishap.c index b889aad9..377aa70c 100644 --- a/bootstrap/windows-88/Vishap.c +++ b/bootstrap/windows-88/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkamSf */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/errors.c b/bootstrap/windows-88/errors.c index 98e42790..01c4cec3 100644 --- a/bootstrap/windows-88/errors.c +++ b/bootstrap/windows-88/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/errors.h b/bootstrap/windows-88/errors.h index 314ab2dc..879ebb6b 100644 --- a/bootstrap/windows-88/errors.h +++ b/bootstrap/windows-88/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 8a238c7f..cd8571d6 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 359df725..1a9020bd 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/vt100.c b/bootstrap/windows-88/vt100.c index 99663386..8b88e190 100644 --- a/bootstrap/windows-88/vt100.c +++ b/bootstrap/windows-88/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/windows-88/vt100.h b/bootstrap/windows-88/vt100.h index 94b58ced..368af3a0 100644 --- a/bootstrap/windows-88/vt100.h +++ b/bootstrap/windows-88/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/08/20] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/21] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/src/compiler/OPC.Mod b/src/compiler/OPC.Mod index 6fa42a48..ee492515 100644 --- a/src/compiler/OPC.Mod +++ b/src/compiler/OPC.Mod @@ -574,29 +574,6 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) END END Align; - (* - PROCEDURE Base0(typ: OPT.Struct): LONGINT; - BEGIN - CASE typ^.form OF - | OPM.Byte: RETURN 1 - | OPM.Char: RETURN OPM.CharAlign - | OPM.Bool: RETURN OPM.BoolAlign - | OPM.SInt: RETURN OPM.SIntAlign - | OPM.Int: RETURN OPM.IntAlign - | OPM.LInt: RETURN OPM.LIntAlign - | OPM.Real: RETURN OPM.RealAlign - | OPM.LReal: RETURN OPM.LRealAlign - | OPM.Set: RETURN OPM.SetAlign - | OPM.Pointer: RETURN OPM.PointerAlign - | OPM.ProcTyp: RETURN OPM.ProcAlign - | OPM.Comp: IF typ^.comp = OPM.Record THEN RETURN typ^.align MOD 10000H - ELSE RETURN Base0(typ^.BaseTyp) - END - ELSE OPM.LogWStr("unhandled case in OPC.BaseAlignment, typ^form = "); OPM.LogWNum(typ^.form, 0); OPM.LogWLn; - END - END Base0; - *) - PROCEDURE SizeAlignment*(size: LONGINT): LONGINT; VAR alignment: LONGINT; BEGIN @@ -619,16 +596,7 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) alignment := BaseAlignment(typ.BaseTyp) END ELSE - (* Not a compound type, determine alignment from size *) alignment := SizeAlignment(typ.size) - (* - IF alignment # Base0(typ) THEN - OPM.LogWStr("BaseAlignment. typ.form "); OPM.LogWNum(typ.form,1); - OPM.LogWStr(", typ.size "); OPM.LogWNum(typ.size,1); - OPM.LogWStr(", old alignment "); OPM.LogWNum(alignment,1); - OPM.LogWStr(", alignment based on size "); OPM.LogWNum(align,1); OPM.LogWLn - END; - *) END; RETURN alignment END BaseAlignment; diff --git a/src/compiler/OPM.cmdln.Mod b/src/compiler/OPM.cmdln.Mod index f7b31286..33d358fb 100644 --- a/src/compiler/OPM.cmdln.Mod +++ b/src/compiler/OPM.cmdln.Mod @@ -717,33 +717,6 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) LIntSize := IntSize * 2; SetSize := LIntSize; - (* Calculate all type alignments *) - (* - CharAlign := AlignSize(CharSize); - BoolAlign := AlignSize(BoolSize); - SIntAlign := AlignSize(SIntSize); - RecAlign := AlignSize(RecSize); - RealAlign := AlignSize(RealSize); - LRealAlign := AlignSize(LRealSize); - PointerAlign := AlignSize(PointerSize); - ProcAlign := AlignSize(ProcSize); - IntAlign := AlignSize(IntSize); - LIntAlign := AlignSize(LIntSize); - SetAlign := AlignSize(SetSize); - *) - - (* - base := -2; - MinSInt := ASH(base, SIntSize*8-2); - MaxSInt := minusop(MinSInt + 1); - - MinInt := ASH(base, IntSize*8-2); - MaxInt := minusop(MinInt + 1); - - MinLInt := ASH(base, LIntSize*8-2); - MaxLInt := minusop(MinLInt +1); - *) - IF RealSize = 4 THEN MaxReal := 3.40282346D38 ELSIF RealSize = 8 THEN MaxReal := 1.7976931348623157D307 * 9.999999 (*should be 1.7976931348623157D308 *) @@ -754,13 +727,9 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) (*should be 1.7976931348623157D308 *) END ; - MinReal := -MaxReal; + MinReal := -MaxReal; MinLReal := -MaxLReal; - - MaxSet := SetSize * 8 - 1; - (* - MaxIndex := MaxLInt; (* shouldn't it be like max(int)? so that for loop will be safe, noch *) - *) + MaxSet := SetSize * 8 - 1; MaxIndex := SignedMaximum(PointerSize); IF Verbose THEN VerboseListSizes END; diff --git a/src/compiler/OPV.Mod b/src/compiler/OPV.Mod index a3e78221..d468f233 100644 --- a/src/compiler/OPV.Mod +++ b/src/compiler/OPV.Mod @@ -290,14 +290,23 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 END END Entier; - PROCEDURE Convert(n: OPT.Node; form, prec: INTEGER); - VAR from: INTEGER; - BEGIN from := n^.typ^.form; - IF form = OPM.Set THEN OPM.WriteString(SetOfFunc); Entier(n, MinPrec); OPM.Write(CloseParen) - ELSIF form = OPM.LInt THEN + PROCEDURE SizeCast(size: LONGINT); + BEGIN + IF size <= OPM.SIntSize THEN OPM.WriteString("(SHORTINT)") + ELSIF size <= OPM.IntSize THEN OPM.WriteString("(INTEGER)") + ELSE OPM.WriteString("(LONGINT)") + END + END SizeCast; + + PROCEDURE Convert(n: OPT.Node; typ: OPT.Struct; prec: INTEGER); + VAR from, to: INTEGER; + BEGIN from := n^.typ^.form; to := typ.form; + IF to = OPM.Set THEN OPM.WriteString(SetOfFunc); Entier(n, MinPrec); OPM.Write(CloseParen) + + ELSIF to = OPM.LInt THEN IF from < OPM.LInt THEN OPM.WriteString("(LONGINT)") END ; Entier(n, 9) - ELSIF form = OPM.Int THEN + ELSIF to = OPM.Int THEN IF from < OPM.Int THEN OPM.WriteString("(int)"); expr(n, 9) ELSE IF OPM.ranchk IN OPM.opt THEN OPM.WriteString("__SHORT"); @@ -307,14 +316,37 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 ELSE OPM.WriteString("(int)"); Entier(n, 9) END END - ELSIF form = OPM.SInt THEN + ELSIF to = OPM.SInt THEN IF OPM.ranchk IN OPM.opt THEN OPM.WriteString("__SHORT"); IF SideEffects(n) THEN OPM.Write("F") END ; OPM.Write(OpenParen); Entier(n, MinPrec); OPM.WriteString(Comma); OPM.WriteInt(OPM.SignedMaximum(OPM.SIntSize) + 1); OPM.Write(CloseParen) ELSE OPM.WriteString("(int)"); Entier(n, 9) END - ELSIF form = OPM.Char THEN + + (* + ELSIF to IN OPM.intSet THEN + IF from IN OPM.intSet + IF typ.size > n.typ.size (* Result is larger *) + SizeCast(typ.size); Entier(n, 9) + ELSIF typ.size = n.typ.size THEN + Entier(n, 9) + ELSE (* Result is smaller *) + IF OPM.ranchk IN OPM.opt THEN + OPM.WriteString("__SHORT"); IF SideEffects(n) THEN OPM.Write("F") END; + OPM.Write(OpenParen); Entier(n, MinPrec); OPM.WriteString(Comma); + OPM.WriteInt(OPM.SignedMaximum(typ.size) + 1); OPM.Write(CloseParen) + ELSE + SizeCast(typ.size); Entier(n, 9) + END + END + ELSE + IF (from < OPM.SInt) & (typ.size > OPM.SIntSize) THEN SizeCast(typ.size) END; + Entier(n, 9) + END + *) + + ELSIF to = OPM.Char THEN IF OPM.ranchk IN OPM.opt THEN OPM.WriteString("__CHR"); IF SideEffects(n) THEN OPM.Write("F") END ; OPM.Write(OpenParen); Entier(n, MinPrec); OPM.Write(CloseParen) @@ -547,7 +579,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 OPM.WriteString(Comma); OPC.Andent(typ); OPM.WriteString(Comma); OPM.WriteInt(typ^.extlev); OPM.Write(")") - | OPM.conv: Convert(l, form, exprPrec) + | OPM.conv: Convert(l, n.typ, exprPrec) | OPM.abs: IF SideEffects(l) THEN IF l^.typ^.form < OPM.Real THEN IF l^.typ^.form < OPM.LInt THEN OPM.WriteString("(int)") END ;