Merge separately committed support for INT64 import.

This commit is contained in:
David Brown 2016-09-18 11:06:20 +01:00
commit 08f09a097d
196 changed files with 770 additions and 538 deletions

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -18,6 +18,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("1.95 [2016/09/15] for gcc LP64 on cygwin", Configuration_versionLong, 41); __MOVE("1.95 [2016/09/18] for gcc LP64 on cygwin", Configuration_versionLong, 41);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Console__h #ifndef Console__h
#define Console__h #define Console__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -89,11 +89,11 @@ typedef
export void (*OPT_typSize)(OPT_Struct); export void (*OPT_typSize)(OPT_Struct);
export OPT_Object OPT_topScope; export OPT_Object OPT_topScope;
export OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp; export OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp;
export OPT_Object OPT_sintobj, OPT_intobj, OPT_lintobj;
export int8 OPT_nofGmod; export int8 OPT_nofGmod;
export OPT_Object OPT_GlbMod[64]; export OPT_Object OPT_GlbMod[64];
export OPS_Name OPT_SelfName; export OPS_Name OPT_SelfName;
export BOOLEAN OPT_SYSimported; export BOOLEAN OPT_SYSimported;
static OPT_Struct OPT_IntTypes[20];
static OPT_Object OPT_universe, OPT_syslink; static OPT_Object OPT_universe, OPT_syslink;
static OPT_ImpCtxt OPT_impCtxt; static OPT_ImpCtxt OPT_impCtxt;
static OPT_ExpCtxt OPT_expCtxt; static OPT_ExpCtxt OPT_expCtxt;
@ -113,6 +113,7 @@ static void OPT_DebugStruct (OPT_Struct btyp);
static void OPT_EnterBoolConst (OPS_Name name, int32 value); static void OPT_EnterBoolConst (OPS_Name name, int32 value);
static void OPT_EnterProc (OPS_Name name, int16 num); static void OPT_EnterProc (OPS_Name name, int16 num);
static void OPT_EnterTyp (OPS_Name name, int8 form, int16 size, OPT_Struct *res); static void OPT_EnterTyp (OPS_Name name, int8 form, int16 size, OPT_Struct *res);
static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res);
export void OPT_Export (BOOLEAN *ext, BOOLEAN *new); export void OPT_Export (BOOLEAN *ext, BOOLEAN *new);
export void OPT_FPrintErr (OPT_Object obj, int16 errcode); export void OPT_FPrintErr (OPT_Object obj, int16 errcode);
static void OPT_FPrintName (int32 *fp, CHAR *name, LONGINT name__len); static void OPT_FPrintName (int32 *fp, CHAR *name, LONGINT name__len);
@ -165,16 +166,20 @@ static void OPT_err (int16 n)
OPT_Struct OPT_IntType (int32 size) OPT_Struct OPT_IntType (int32 size)
{ {
OPT_Struct _o_result; OPT_Struct _o_result;
int16 i; if (size <= OPT_int8typ->size) {
i = 1; _o_result = OPT_int8typ;
while (i < 19) {
if ((OPT_IntTypes[__X(i, 20)] != NIL && OPT_IntTypes[__X(i, 20)]->size >= size)) {
_o_result = OPT_IntTypes[__X(i, 20)];
return _o_result; return _o_result;
} }
i += 1; if (size <= OPT_int16typ->size) {
_o_result = OPT_int16typ;
return _o_result;
} }
__RETCHK; if (size <= OPT_int32typ->size) {
_o_result = OPT_int32typ;
return _o_result;
}
_o_result = OPT_int64typ;
return _o_result;
} }
OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, int16 dir) OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, int16 dir)
@ -182,15 +187,40 @@ OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, int16 dir)
OPT_Struct _o_result; OPT_Struct _o_result;
int16 i; int16 i;
__ASSERT(x->form == 4, 0); __ASSERT(x->form == 4, 0);
__ASSERT(dir == 1 || dir == -1, 0);
__ASSERT(x->BaseTyp == OPT_undftyp, 0); __ASSERT(x->BaseTyp == OPT_undftyp, 0);
i = 0; __ASSERT(dir == 1 || dir == -1, 0);
while ((OPT_IntTypes[__X(i, 20)] != x && i < 20)) { if (dir > 0) {
i += 1; if (x->size < OPT_sinttyp->size) {
} _o_result = OPT_sinttyp;
__ASSERT(i < 19, 0);
_o_result = OPT_IntTypes[__X(i + dir, 20)];
return _o_result; return _o_result;
}
if (x->size < OPT_inttyp->size) {
_o_result = OPT_inttyp;
return _o_result;
}
if (x->size < OPT_linttyp->size) {
_o_result = OPT_linttyp;
return _o_result;
}
_o_result = OPT_int64typ;
return _o_result;
} else {
if (x->size > OPT_linttyp->size) {
_o_result = OPT_linttyp;
return _o_result;
}
if (x->size > OPT_inttyp->size) {
_o_result = OPT_inttyp;
return _o_result;
}
if (x->size > OPT_sinttyp->size) {
_o_result = OPT_sinttyp;
return _o_result;
}
_o_result = OPT_int8typ;
return _o_result;
}
__RETCHK;
} }
OPT_Const OPT_NewConst (void) OPT_Const OPT_NewConst (void)
@ -505,21 +535,21 @@ void OPT_IdFPrint (OPT_Struct typ)
} }
} }
static struct FPrintStr__12 { static struct FPrintStr__13 {
int32 *pbfp, *pvfp; int32 *pbfp, *pvfp;
struct FPrintStr__12 *lnk; struct FPrintStr__13 *lnk;
} *FPrintStr__12_s; } *FPrintStr__13_s;
static void FPrintFlds__13 (OPT_Object fld, int32 adr, BOOLEAN visible); static void FPrintFlds__14 (OPT_Object fld, int32 adr, BOOLEAN visible);
static void FPrintHdFld__15 (OPT_Struct typ, OPT_Object fld, int32 adr); static void FPrintHdFld__16 (OPT_Struct typ, OPT_Object fld, int32 adr);
static void FPrintTProcs__17 (OPT_Object obj); static void FPrintTProcs__18 (OPT_Object obj);
static void FPrintHdFld__15 (OPT_Struct typ, OPT_Object fld, int32 adr) static void FPrintHdFld__16 (OPT_Struct typ, OPT_Object fld, int32 adr)
{ {
int32 i, j, n; int32 i, j, n;
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
if (typ->comp == 4) { if (typ->comp == 4) {
FPrintFlds__13(typ->link, adr, 0); FPrintFlds__14(typ->link, adr, 0);
} else if (typ->comp == 2) { } else if (typ->comp == 2) {
btyp = typ->BaseTyp; btyp = typ->BaseTyp;
n = typ->n; n = typ->n;
@ -529,53 +559,53 @@ static void FPrintHdFld__15 (OPT_Struct typ, OPT_Object fld, int32 adr)
} }
if (btyp->form == 11 || btyp->comp == 4) { if (btyp->form == 11 || btyp->comp == 4) {
j = OPT_nofhdfld; j = OPT_nofhdfld;
FPrintHdFld__15(btyp, fld, adr); FPrintHdFld__16(btyp, fld, adr);
if (j != OPT_nofhdfld) { if (j != OPT_nofhdfld) {
i = 1; i = 1;
while ((i < n && OPT_nofhdfld <= 2048)) { while ((i < n && OPT_nofhdfld <= 2048)) {
adr += btyp->size; adr += btyp->size;
FPrintHdFld__15(btyp, fld, adr); FPrintHdFld__16(btyp, fld, adr);
i += 1; i += 1;
} }
} }
} }
} else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) { } else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) {
OPM_FPrint(&*FPrintStr__12_s->pvfp, 11); OPM_FPrint(&*FPrintStr__13_s->pvfp, 11);
OPM_FPrint(&*FPrintStr__12_s->pvfp, adr); OPM_FPrint(&*FPrintStr__13_s->pvfp, adr);
OPT_nofhdfld += 1; OPT_nofhdfld += 1;
} }
} }
static void FPrintFlds__13 (OPT_Object fld, int32 adr, BOOLEAN visible) static void FPrintFlds__14 (OPT_Object fld, int32 adr, BOOLEAN visible)
{ {
while ((fld != NIL && fld->mode == 4)) { while ((fld != NIL && fld->mode == 4)) {
if ((fld->vis != 0 && visible)) { if ((fld->vis != 0 && visible)) {
OPM_FPrint(&*FPrintStr__12_s->pbfp, fld->vis); OPM_FPrint(&*FPrintStr__13_s->pbfp, fld->vis);
OPT_FPrintName(&*FPrintStr__12_s->pbfp, (void*)fld->name, 256); OPT_FPrintName(&*FPrintStr__13_s->pbfp, (void*)fld->name, 256);
OPM_FPrint(&*FPrintStr__12_s->pbfp, fld->adr); OPM_FPrint(&*FPrintStr__13_s->pbfp, fld->adr);
OPT_FPrintStr(fld->typ); OPT_FPrintStr(fld->typ);
OPM_FPrint(&*FPrintStr__12_s->pbfp, fld->typ->pbfp); OPM_FPrint(&*FPrintStr__13_s->pbfp, fld->typ->pbfp);
OPM_FPrint(&*FPrintStr__12_s->pvfp, fld->typ->pvfp); OPM_FPrint(&*FPrintStr__13_s->pvfp, fld->typ->pvfp);
} else { } else {
FPrintHdFld__15(fld->typ, fld, fld->adr + adr); FPrintHdFld__16(fld->typ, fld, fld->adr + adr);
} }
fld = fld->link; fld = fld->link;
} }
} }
static void FPrintTProcs__17 (OPT_Object obj) static void FPrintTProcs__18 (OPT_Object obj)
{ {
if (obj != NIL) { if (obj != NIL) {
FPrintTProcs__17(obj->left); FPrintTProcs__18(obj->left);
if (obj->mode == 13) { if (obj->mode == 13) {
if (obj->vis != 0) { if (obj->vis != 0) {
OPM_FPrint(&*FPrintStr__12_s->pbfp, 13); OPM_FPrint(&*FPrintStr__13_s->pbfp, 13);
OPM_FPrint(&*FPrintStr__12_s->pbfp, __ASHR(obj->adr, 16)); OPM_FPrint(&*FPrintStr__13_s->pbfp, __ASHR(obj->adr, 16));
OPT_FPrintSign(&*FPrintStr__12_s->pbfp, obj->typ, obj->link); OPT_FPrintSign(&*FPrintStr__13_s->pbfp, obj->typ, obj->link);
OPT_FPrintName(&*FPrintStr__12_s->pbfp, (void*)obj->name, 256); OPT_FPrintName(&*FPrintStr__13_s->pbfp, (void*)obj->name, 256);
} }
} }
FPrintTProcs__17(obj->right); FPrintTProcs__18(obj->right);
} }
} }
@ -585,11 +615,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
OPT_Object strobj = NIL, bstrobj = NIL; OPT_Object strobj = NIL, bstrobj = NIL;
int32 pbfp, pvfp; int32 pbfp, pvfp;
struct FPrintStr__12 _s; struct FPrintStr__13 _s;
_s.pbfp = &pbfp; _s.pbfp = &pbfp;
_s.pvfp = &pvfp; _s.pvfp = &pvfp;
_s.lnk = FPrintStr__12_s; _s.lnk = FPrintStr__13_s;
FPrintStr__12_s = &_s; FPrintStr__13_s = &_s;
if (!typ->fpdone) { if (!typ->fpdone) {
OPT_IdFPrint(typ); OPT_IdFPrint(typ);
pbfp = typ->idfp; pbfp = typ->idfp;
@ -626,11 +656,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPM_FPrint(&pvfp, typ->align); OPM_FPrint(&pvfp, typ->align);
OPM_FPrint(&pvfp, typ->n); OPM_FPrint(&pvfp, typ->n);
OPT_nofhdfld = 0; OPT_nofhdfld = 0;
FPrintFlds__13(typ->link, 0, 1); FPrintFlds__14(typ->link, 0, 1);
if (OPT_nofhdfld > 2048) { if (OPT_nofhdfld > 2048) {
OPM_Mark(225, typ->txtpos); OPM_Mark(225, typ->txtpos);
} }
FPrintTProcs__17(typ->link); FPrintTProcs__18(typ->link);
OPM_FPrint(&pvfp, pbfp); OPM_FPrint(&pvfp, pbfp);
strobj = typ->strobj; strobj = typ->strobj;
if (strobj == NIL || strobj->name[0] == 0x00) { if (strobj == NIL || strobj->name[0] == 0x00) {
@ -640,7 +670,7 @@ void OPT_FPrintStr (OPT_Struct typ)
typ->pbfp = pbfp; typ->pbfp = pbfp;
typ->pvfp = pvfp; typ->pvfp = pvfp;
} }
FPrintStr__12_s = _s.lnk; FPrintStr__13_s = _s.lnk;
} }
void OPT_FPrintObj (OPT_Object obj) void OPT_FPrintObj (OPT_Object obj)
@ -1754,6 +1784,18 @@ static void OPT_EnterTyp (OPS_Name name, int8 form, int16 size, OPT_Struct *res)
*res = typ; *res = typ;
} }
static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res)
{
OPT_Object obj = NIL;
OPS_Name name__copy;
__DUPARR(name, OPS_Name);
OPT_Insert(name, &obj);
obj->mode = 5;
obj->typ = NIL;
obj->vis = 1;
*res = obj;
}
static void OPT_EnterProc (OPS_Name name, int16 num) static void OPT_EnterProc (OPS_Name name, int16 num)
{ {
OPT_Object obj = NIL; OPT_Object obj = NIL;
@ -1787,8 +1829,10 @@ static void EnumPtrs(void (*P)(void*))
P(OPT_niltyp); P(OPT_niltyp);
P(OPT_notyp); P(OPT_notyp);
P(OPT_sysptrtyp); P(OPT_sysptrtyp);
P(OPT_sintobj);
P(OPT_intobj);
P(OPT_lintobj);
__ENUMP(OPT_GlbMod, 64, P); __ENUMP(OPT_GlbMod, 64, P);
__ENUMP(OPT_IntTypes, 20, P);
P(OPT_universe); P(OPT_universe);
P(OPT_syslink); P(OPT_syslink);
__ENUMR(&OPT_impCtxt, OPT_ImpCtxt__typ, 3140, 1, P); __ENUMR(&OPT_impCtxt, OPT_ImpCtxt__typ, 3140, 1, P);
@ -1881,10 +1925,10 @@ export void *OPT__init(void)
OPT_EnterTyp((CHAR*)"CHAR", 3, OPM_CharSize, &OPT_chartyp); OPT_EnterTyp((CHAR*)"CHAR", 3, OPM_CharSize, &OPT_chartyp);
OPT_EnterTyp((CHAR*)"SET", 7, OPM_SetSize, &OPT_settyp); OPT_EnterTyp((CHAR*)"SET", 7, OPM_SetSize, &OPT_settyp);
OPT_EnterTyp((CHAR*)"REAL", 5, OPM_RealSize, &OPT_realtyp); OPT_EnterTyp((CHAR*)"REAL", 5, OPM_RealSize, &OPT_realtyp);
OPT_EnterTyp((CHAR*)"INTEGER", 4, OPM_IntSize, &OPT_inttyp);
OPT_EnterTyp((CHAR*)"LONGINT", 4, OPM_LIntSize, &OPT_linttyp);
OPT_EnterTyp((CHAR*)"LONGREAL", 6, OPM_LRealSize, &OPT_lrltyp); OPT_EnterTyp((CHAR*)"LONGREAL", 6, OPM_LRealSize, &OPT_lrltyp);
OPT_EnterTyp((CHAR*)"SHORTINT", 4, OPM_SIntSize, &OPT_sinttyp); OPT_EnterTypeAlias((CHAR*)"SHORTINT", &OPT_sintobj);
OPT_EnterTypeAlias((CHAR*)"INTEGER", &OPT_intobj);
OPT_EnterTypeAlias((CHAR*)"LONGINT", &OPT_lintobj);
OPT_EnterBoolConst((CHAR*)"FALSE", 0); OPT_EnterBoolConst((CHAR*)"FALSE", 0);
OPT_EnterBoolConst((CHAR*)"TRUE", 1); OPT_EnterBoolConst((CHAR*)"TRUE", 1);
OPT_EnterProc((CHAR*)"HALT", 0); OPT_EnterProc((CHAR*)"HALT", 0);
@ -1912,7 +1956,7 @@ export void *OPT__init(void)
OPT_impCtxt.ref[1] = OPT_bytetyp; OPT_impCtxt.ref[1] = OPT_bytetyp;
OPT_impCtxt.ref[2] = OPT_booltyp; OPT_impCtxt.ref[2] = OPT_booltyp;
OPT_impCtxt.ref[3] = OPT_chartyp; OPT_impCtxt.ref[3] = OPT_chartyp;
OPT_impCtxt.ref[4] = OPT_inttyp; OPT_impCtxt.ref[4] = OPT_int32typ;
OPT_impCtxt.ref[5] = OPT_realtyp; OPT_impCtxt.ref[5] = OPT_realtyp;
OPT_impCtxt.ref[6] = OPT_lrltyp; OPT_impCtxt.ref[6] = OPT_lrltyp;
OPT_impCtxt.ref[7] = OPT_settyp; OPT_impCtxt.ref[7] = OPT_settyp;
@ -1920,12 +1964,5 @@ export void *OPT__init(void)
OPT_impCtxt.ref[9] = OPT_niltyp; OPT_impCtxt.ref[9] = OPT_niltyp;
OPT_impCtxt.ref[10] = OPT_notyp; OPT_impCtxt.ref[10] = OPT_notyp;
OPT_impCtxt.ref[11] = OPT_sysptrtyp; OPT_impCtxt.ref[11] = OPT_sysptrtyp;
OPT_IntTypes[1] = OPT_sinttyp;
OPT_IntTypes[2] = OPT_inttyp;
OPT_IntTypes[3] = OPT_linttyp;
OPT_IntTypes[5] = OPT_int8typ;
OPT_IntTypes[6] = OPT_int16typ;
OPT_IntTypes[7] = OPT_int32typ;
OPT_IntTypes[8] = OPT_int64typ;
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h
@ -68,6 +68,7 @@ typedef
import void (*OPT_typSize)(OPT_Struct); import void (*OPT_typSize)(OPT_Struct);
import OPT_Object OPT_topScope; import OPT_Object OPT_topScope;
import OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp; import OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp;
import OPT_Object OPT_sintobj, OPT_intobj, OPT_lintobj;
import int8 OPT_nofGmod; import int8 OPT_nofGmod;
import OPT_Object OPT_GlbMod[64]; import OPT_Object OPT_GlbMod[64];
import OPS_Name OPT_SelfName; import OPS_Name OPT_SelfName;

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -258,6 +258,9 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte
void OPV_AdrAndSize (OPT_Object topScope) void OPV_AdrAndSize (OPT_Object topScope)
{ {
__ASSERT(OPT_sinttyp != NIL, 0);
__ASSERT(OPT_inttyp != NIL, 0);
__ASSERT(OPT_linttyp != NIL, 0);
OPM_errpos = topScope->adr; OPM_errpos = topScope->adr;
topScope->leaf = 1; topScope->leaf = 1;
OPV_Traverse(topScope->right, topScope, 1); OPV_Traverse(topScope->right, topScope, 1);
@ -265,15 +268,12 @@ void OPV_AdrAndSize (OPT_Object topScope)
OPT_chartyp->strobj->linkadr = 2; OPT_chartyp->strobj->linkadr = 2;
OPT_settyp->strobj->linkadr = 2; OPT_settyp->strobj->linkadr = 2;
OPT_realtyp->strobj->linkadr = 2; OPT_realtyp->strobj->linkadr = 2;
OPT_inttyp->strobj->linkadr = 2;
OPT_linttyp->strobj->linkadr = 2;
OPT_adrtyp->strobj->linkadr = 2; OPT_adrtyp->strobj->linkadr = 2;
OPT_int8typ->strobj->linkadr = 2; OPT_int8typ->strobj->linkadr = 2;
OPT_int16typ->strobj->linkadr = 2; OPT_int16typ->strobj->linkadr = 2;
OPT_int32typ->strobj->linkadr = 2; OPT_int32typ->strobj->linkadr = 2;
OPT_int64typ->strobj->linkadr = 2; OPT_int64typ->strobj->linkadr = 2;
OPT_lrltyp->strobj->linkadr = 2; OPT_lrltyp->strobj->linkadr = 2;
OPT_sinttyp->strobj->linkadr = 2;
OPT_booltyp->strobj->linkadr = 2; OPT_booltyp->strobj->linkadr = 2;
OPT_bytetyp->strobj->linkadr = 2; OPT_bytetyp->strobj->linkadr = 2;
OPT_sysptrtyp->strobj->linkadr = 2; OPT_sysptrtyp->strobj->linkadr = 2;

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkamSf */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkamSf */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -84,12 +84,20 @@ static void Vishap_PropagateElementaryTypeSizes (void)
OPT_chartyp->size = OPM_CharSize; OPT_chartyp->size = OPM_CharSize;
OPT_settyp->size = OPM_SetSize; OPT_settyp->size = OPM_SetSize;
OPT_realtyp->size = OPM_RealSize; OPT_realtyp->size = OPM_RealSize;
OPT_inttyp->size = OPM_IntSize;
OPT_linttyp->size = OPM_LIntSize;
OPT_adrtyp->size = OPM_PointerSize; OPT_adrtyp->size = OPM_PointerSize;
OPT_lrltyp->size = OPM_LRealSize; OPT_lrltyp->size = OPM_LRealSize;
OPT_sinttyp->size = OPM_SIntSize;
OPT_booltyp->size = OPM_BoolSize; OPT_booltyp->size = OPM_BoolSize;
OPT_sinttyp = OPT_int8typ;
if (OPM_IntSize == 2) {
OPT_inttyp = OPT_int16typ;
OPT_linttyp = OPT_int32typ;
} else {
OPT_inttyp = OPT_int32typ;
OPT_linttyp = OPT_int64typ;
}
OPT_sintobj->typ = OPT_sinttyp;
OPT_intobj->typ = OPT_inttyp;
OPT_lintobj->typ = OPT_linttyp;
} }
void Vishap_Translate (void) void Vishap_Translate (void)

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef errors__h #ifndef errors__h
#define errors__h #define errors__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef vt100__h #ifndef vt100__h
#define vt100__h #define vt100__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -18,6 +18,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("1.95 [2016/09/15] for gcc LP64 on cygwin", Configuration_versionLong, 41); __MOVE("1.95 [2016/09/18] for gcc LP64 on cygwin", Configuration_versionLong, 41);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Console__h #ifndef Console__h
#define Console__h #define Console__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -89,11 +89,11 @@ typedef
export void (*OPT_typSize)(OPT_Struct); export void (*OPT_typSize)(OPT_Struct);
export OPT_Object OPT_topScope; export OPT_Object OPT_topScope;
export OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp; export OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp;
export OPT_Object OPT_sintobj, OPT_intobj, OPT_lintobj;
export int8 OPT_nofGmod; export int8 OPT_nofGmod;
export OPT_Object OPT_GlbMod[64]; export OPT_Object OPT_GlbMod[64];
export OPS_Name OPT_SelfName; export OPS_Name OPT_SelfName;
export BOOLEAN OPT_SYSimported; export BOOLEAN OPT_SYSimported;
static OPT_Struct OPT_IntTypes[20];
static OPT_Object OPT_universe, OPT_syslink; static OPT_Object OPT_universe, OPT_syslink;
static OPT_ImpCtxt OPT_impCtxt; static OPT_ImpCtxt OPT_impCtxt;
static OPT_ExpCtxt OPT_expCtxt; static OPT_ExpCtxt OPT_expCtxt;
@ -113,6 +113,7 @@ static void OPT_DebugStruct (OPT_Struct btyp);
static void OPT_EnterBoolConst (OPS_Name name, int32 value); static void OPT_EnterBoolConst (OPS_Name name, int32 value);
static void OPT_EnterProc (OPS_Name name, int16 num); static void OPT_EnterProc (OPS_Name name, int16 num);
static void OPT_EnterTyp (OPS_Name name, int8 form, int16 size, OPT_Struct *res); static void OPT_EnterTyp (OPS_Name name, int8 form, int16 size, OPT_Struct *res);
static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res);
export void OPT_Export (BOOLEAN *ext, BOOLEAN *new); export void OPT_Export (BOOLEAN *ext, BOOLEAN *new);
export void OPT_FPrintErr (OPT_Object obj, int16 errcode); export void OPT_FPrintErr (OPT_Object obj, int16 errcode);
static void OPT_FPrintName (int32 *fp, CHAR *name, LONGINT name__len); static void OPT_FPrintName (int32 *fp, CHAR *name, LONGINT name__len);
@ -165,16 +166,20 @@ static void OPT_err (int16 n)
OPT_Struct OPT_IntType (int32 size) OPT_Struct OPT_IntType (int32 size)
{ {
OPT_Struct _o_result; OPT_Struct _o_result;
int16 i; if (size <= OPT_int8typ->size) {
i = 1; _o_result = OPT_int8typ;
while (i < 19) {
if ((OPT_IntTypes[__X(i, 20)] != NIL && OPT_IntTypes[__X(i, 20)]->size >= size)) {
_o_result = OPT_IntTypes[__X(i, 20)];
return _o_result; return _o_result;
} }
i += 1; if (size <= OPT_int16typ->size) {
_o_result = OPT_int16typ;
return _o_result;
} }
__RETCHK; if (size <= OPT_int32typ->size) {
_o_result = OPT_int32typ;
return _o_result;
}
_o_result = OPT_int64typ;
return _o_result;
} }
OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, int16 dir) OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, int16 dir)
@ -182,15 +187,40 @@ OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, int16 dir)
OPT_Struct _o_result; OPT_Struct _o_result;
int16 i; int16 i;
__ASSERT(x->form == 4, 0); __ASSERT(x->form == 4, 0);
__ASSERT(dir == 1 || dir == -1, 0);
__ASSERT(x->BaseTyp == OPT_undftyp, 0); __ASSERT(x->BaseTyp == OPT_undftyp, 0);
i = 0; __ASSERT(dir == 1 || dir == -1, 0);
while ((OPT_IntTypes[__X(i, 20)] != x && i < 20)) { if (dir > 0) {
i += 1; if (x->size < OPT_sinttyp->size) {
} _o_result = OPT_sinttyp;
__ASSERT(i < 19, 0);
_o_result = OPT_IntTypes[__X(i + dir, 20)];
return _o_result; return _o_result;
}
if (x->size < OPT_inttyp->size) {
_o_result = OPT_inttyp;
return _o_result;
}
if (x->size < OPT_linttyp->size) {
_o_result = OPT_linttyp;
return _o_result;
}
_o_result = OPT_int64typ;
return _o_result;
} else {
if (x->size > OPT_linttyp->size) {
_o_result = OPT_linttyp;
return _o_result;
}
if (x->size > OPT_inttyp->size) {
_o_result = OPT_inttyp;
return _o_result;
}
if (x->size > OPT_sinttyp->size) {
_o_result = OPT_sinttyp;
return _o_result;
}
_o_result = OPT_int8typ;
return _o_result;
}
__RETCHK;
} }
OPT_Const OPT_NewConst (void) OPT_Const OPT_NewConst (void)
@ -505,21 +535,21 @@ void OPT_IdFPrint (OPT_Struct typ)
} }
} }
static struct FPrintStr__12 { static struct FPrintStr__13 {
int32 *pbfp, *pvfp; int32 *pbfp, *pvfp;
struct FPrintStr__12 *lnk; struct FPrintStr__13 *lnk;
} *FPrintStr__12_s; } *FPrintStr__13_s;
static void FPrintFlds__13 (OPT_Object fld, int32 adr, BOOLEAN visible); static void FPrintFlds__14 (OPT_Object fld, int32 adr, BOOLEAN visible);
static void FPrintHdFld__15 (OPT_Struct typ, OPT_Object fld, int32 adr); static void FPrintHdFld__16 (OPT_Struct typ, OPT_Object fld, int32 adr);
static void FPrintTProcs__17 (OPT_Object obj); static void FPrintTProcs__18 (OPT_Object obj);
static void FPrintHdFld__15 (OPT_Struct typ, OPT_Object fld, int32 adr) static void FPrintHdFld__16 (OPT_Struct typ, OPT_Object fld, int32 adr)
{ {
int32 i, j, n; int32 i, j, n;
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
if (typ->comp == 4) { if (typ->comp == 4) {
FPrintFlds__13(typ->link, adr, 0); FPrintFlds__14(typ->link, adr, 0);
} else if (typ->comp == 2) { } else if (typ->comp == 2) {
btyp = typ->BaseTyp; btyp = typ->BaseTyp;
n = typ->n; n = typ->n;
@ -529,53 +559,53 @@ static void FPrintHdFld__15 (OPT_Struct typ, OPT_Object fld, int32 adr)
} }
if (btyp->form == 11 || btyp->comp == 4) { if (btyp->form == 11 || btyp->comp == 4) {
j = OPT_nofhdfld; j = OPT_nofhdfld;
FPrintHdFld__15(btyp, fld, adr); FPrintHdFld__16(btyp, fld, adr);
if (j != OPT_nofhdfld) { if (j != OPT_nofhdfld) {
i = 1; i = 1;
while ((i < n && OPT_nofhdfld <= 2048)) { while ((i < n && OPT_nofhdfld <= 2048)) {
adr += btyp->size; adr += btyp->size;
FPrintHdFld__15(btyp, fld, adr); FPrintHdFld__16(btyp, fld, adr);
i += 1; i += 1;
} }
} }
} }
} else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) { } else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) {
OPM_FPrint(&*FPrintStr__12_s->pvfp, 11); OPM_FPrint(&*FPrintStr__13_s->pvfp, 11);
OPM_FPrint(&*FPrintStr__12_s->pvfp, adr); OPM_FPrint(&*FPrintStr__13_s->pvfp, adr);
OPT_nofhdfld += 1; OPT_nofhdfld += 1;
} }
} }
static void FPrintFlds__13 (OPT_Object fld, int32 adr, BOOLEAN visible) static void FPrintFlds__14 (OPT_Object fld, int32 adr, BOOLEAN visible)
{ {
while ((fld != NIL && fld->mode == 4)) { while ((fld != NIL && fld->mode == 4)) {
if ((fld->vis != 0 && visible)) { if ((fld->vis != 0 && visible)) {
OPM_FPrint(&*FPrintStr__12_s->pbfp, fld->vis); OPM_FPrint(&*FPrintStr__13_s->pbfp, fld->vis);
OPT_FPrintName(&*FPrintStr__12_s->pbfp, (void*)fld->name, 256); OPT_FPrintName(&*FPrintStr__13_s->pbfp, (void*)fld->name, 256);
OPM_FPrint(&*FPrintStr__12_s->pbfp, fld->adr); OPM_FPrint(&*FPrintStr__13_s->pbfp, fld->adr);
OPT_FPrintStr(fld->typ); OPT_FPrintStr(fld->typ);
OPM_FPrint(&*FPrintStr__12_s->pbfp, fld->typ->pbfp); OPM_FPrint(&*FPrintStr__13_s->pbfp, fld->typ->pbfp);
OPM_FPrint(&*FPrintStr__12_s->pvfp, fld->typ->pvfp); OPM_FPrint(&*FPrintStr__13_s->pvfp, fld->typ->pvfp);
} else { } else {
FPrintHdFld__15(fld->typ, fld, fld->adr + adr); FPrintHdFld__16(fld->typ, fld, fld->adr + adr);
} }
fld = fld->link; fld = fld->link;
} }
} }
static void FPrintTProcs__17 (OPT_Object obj) static void FPrintTProcs__18 (OPT_Object obj)
{ {
if (obj != NIL) { if (obj != NIL) {
FPrintTProcs__17(obj->left); FPrintTProcs__18(obj->left);
if (obj->mode == 13) { if (obj->mode == 13) {
if (obj->vis != 0) { if (obj->vis != 0) {
OPM_FPrint(&*FPrintStr__12_s->pbfp, 13); OPM_FPrint(&*FPrintStr__13_s->pbfp, 13);
OPM_FPrint(&*FPrintStr__12_s->pbfp, __ASHR(obj->adr, 16)); OPM_FPrint(&*FPrintStr__13_s->pbfp, __ASHR(obj->adr, 16));
OPT_FPrintSign(&*FPrintStr__12_s->pbfp, obj->typ, obj->link); OPT_FPrintSign(&*FPrintStr__13_s->pbfp, obj->typ, obj->link);
OPT_FPrintName(&*FPrintStr__12_s->pbfp, (void*)obj->name, 256); OPT_FPrintName(&*FPrintStr__13_s->pbfp, (void*)obj->name, 256);
} }
} }
FPrintTProcs__17(obj->right); FPrintTProcs__18(obj->right);
} }
} }
@ -585,11 +615,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
OPT_Object strobj = NIL, bstrobj = NIL; OPT_Object strobj = NIL, bstrobj = NIL;
int32 pbfp, pvfp; int32 pbfp, pvfp;
struct FPrintStr__12 _s; struct FPrintStr__13 _s;
_s.pbfp = &pbfp; _s.pbfp = &pbfp;
_s.pvfp = &pvfp; _s.pvfp = &pvfp;
_s.lnk = FPrintStr__12_s; _s.lnk = FPrintStr__13_s;
FPrintStr__12_s = &_s; FPrintStr__13_s = &_s;
if (!typ->fpdone) { if (!typ->fpdone) {
OPT_IdFPrint(typ); OPT_IdFPrint(typ);
pbfp = typ->idfp; pbfp = typ->idfp;
@ -626,11 +656,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPM_FPrint(&pvfp, typ->align); OPM_FPrint(&pvfp, typ->align);
OPM_FPrint(&pvfp, typ->n); OPM_FPrint(&pvfp, typ->n);
OPT_nofhdfld = 0; OPT_nofhdfld = 0;
FPrintFlds__13(typ->link, 0, 1); FPrintFlds__14(typ->link, 0, 1);
if (OPT_nofhdfld > 2048) { if (OPT_nofhdfld > 2048) {
OPM_Mark(225, typ->txtpos); OPM_Mark(225, typ->txtpos);
} }
FPrintTProcs__17(typ->link); FPrintTProcs__18(typ->link);
OPM_FPrint(&pvfp, pbfp); OPM_FPrint(&pvfp, pbfp);
strobj = typ->strobj; strobj = typ->strobj;
if (strobj == NIL || strobj->name[0] == 0x00) { if (strobj == NIL || strobj->name[0] == 0x00) {
@ -640,7 +670,7 @@ void OPT_FPrintStr (OPT_Struct typ)
typ->pbfp = pbfp; typ->pbfp = pbfp;
typ->pvfp = pvfp; typ->pvfp = pvfp;
} }
FPrintStr__12_s = _s.lnk; FPrintStr__13_s = _s.lnk;
} }
void OPT_FPrintObj (OPT_Object obj) void OPT_FPrintObj (OPT_Object obj)
@ -1754,6 +1784,18 @@ static void OPT_EnterTyp (OPS_Name name, int8 form, int16 size, OPT_Struct *res)
*res = typ; *res = typ;
} }
static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res)
{
OPT_Object obj = NIL;
OPS_Name name__copy;
__DUPARR(name, OPS_Name);
OPT_Insert(name, &obj);
obj->mode = 5;
obj->typ = NIL;
obj->vis = 1;
*res = obj;
}
static void OPT_EnterProc (OPS_Name name, int16 num) static void OPT_EnterProc (OPS_Name name, int16 num)
{ {
OPT_Object obj = NIL; OPT_Object obj = NIL;
@ -1787,8 +1829,10 @@ static void EnumPtrs(void (*P)(void*))
P(OPT_niltyp); P(OPT_niltyp);
P(OPT_notyp); P(OPT_notyp);
P(OPT_sysptrtyp); P(OPT_sysptrtyp);
P(OPT_sintobj);
P(OPT_intobj);
P(OPT_lintobj);
__ENUMP(OPT_GlbMod, 64, P); __ENUMP(OPT_GlbMod, 64, P);
__ENUMP(OPT_IntTypes, 20, P);
P(OPT_universe); P(OPT_universe);
P(OPT_syslink); P(OPT_syslink);
__ENUMR(&OPT_impCtxt, OPT_ImpCtxt__typ, 3140, 1, P); __ENUMR(&OPT_impCtxt, OPT_ImpCtxt__typ, 3140, 1, P);
@ -1881,10 +1925,10 @@ export void *OPT__init(void)
OPT_EnterTyp((CHAR*)"CHAR", 3, OPM_CharSize, &OPT_chartyp); OPT_EnterTyp((CHAR*)"CHAR", 3, OPM_CharSize, &OPT_chartyp);
OPT_EnterTyp((CHAR*)"SET", 7, OPM_SetSize, &OPT_settyp); OPT_EnterTyp((CHAR*)"SET", 7, OPM_SetSize, &OPT_settyp);
OPT_EnterTyp((CHAR*)"REAL", 5, OPM_RealSize, &OPT_realtyp); OPT_EnterTyp((CHAR*)"REAL", 5, OPM_RealSize, &OPT_realtyp);
OPT_EnterTyp((CHAR*)"INTEGER", 4, OPM_IntSize, &OPT_inttyp);
OPT_EnterTyp((CHAR*)"LONGINT", 4, OPM_LIntSize, &OPT_linttyp);
OPT_EnterTyp((CHAR*)"LONGREAL", 6, OPM_LRealSize, &OPT_lrltyp); OPT_EnterTyp((CHAR*)"LONGREAL", 6, OPM_LRealSize, &OPT_lrltyp);
OPT_EnterTyp((CHAR*)"SHORTINT", 4, OPM_SIntSize, &OPT_sinttyp); OPT_EnterTypeAlias((CHAR*)"SHORTINT", &OPT_sintobj);
OPT_EnterTypeAlias((CHAR*)"INTEGER", &OPT_intobj);
OPT_EnterTypeAlias((CHAR*)"LONGINT", &OPT_lintobj);
OPT_EnterBoolConst((CHAR*)"FALSE", 0); OPT_EnterBoolConst((CHAR*)"FALSE", 0);
OPT_EnterBoolConst((CHAR*)"TRUE", 1); OPT_EnterBoolConst((CHAR*)"TRUE", 1);
OPT_EnterProc((CHAR*)"HALT", 0); OPT_EnterProc((CHAR*)"HALT", 0);
@ -1912,7 +1956,7 @@ export void *OPT__init(void)
OPT_impCtxt.ref[1] = OPT_bytetyp; OPT_impCtxt.ref[1] = OPT_bytetyp;
OPT_impCtxt.ref[2] = OPT_booltyp; OPT_impCtxt.ref[2] = OPT_booltyp;
OPT_impCtxt.ref[3] = OPT_chartyp; OPT_impCtxt.ref[3] = OPT_chartyp;
OPT_impCtxt.ref[4] = OPT_inttyp; OPT_impCtxt.ref[4] = OPT_int32typ;
OPT_impCtxt.ref[5] = OPT_realtyp; OPT_impCtxt.ref[5] = OPT_realtyp;
OPT_impCtxt.ref[6] = OPT_lrltyp; OPT_impCtxt.ref[6] = OPT_lrltyp;
OPT_impCtxt.ref[7] = OPT_settyp; OPT_impCtxt.ref[7] = OPT_settyp;
@ -1920,12 +1964,5 @@ export void *OPT__init(void)
OPT_impCtxt.ref[9] = OPT_niltyp; OPT_impCtxt.ref[9] = OPT_niltyp;
OPT_impCtxt.ref[10] = OPT_notyp; OPT_impCtxt.ref[10] = OPT_notyp;
OPT_impCtxt.ref[11] = OPT_sysptrtyp; OPT_impCtxt.ref[11] = OPT_sysptrtyp;
OPT_IntTypes[1] = OPT_sinttyp;
OPT_IntTypes[2] = OPT_inttyp;
OPT_IntTypes[3] = OPT_linttyp;
OPT_IntTypes[5] = OPT_int8typ;
OPT_IntTypes[6] = OPT_int16typ;
OPT_IntTypes[7] = OPT_int32typ;
OPT_IntTypes[8] = OPT_int64typ;
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h
@ -68,6 +68,7 @@ typedef
import void (*OPT_typSize)(OPT_Struct); import void (*OPT_typSize)(OPT_Struct);
import OPT_Object OPT_topScope; import OPT_Object OPT_topScope;
import OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp; import OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp;
import OPT_Object OPT_sintobj, OPT_intobj, OPT_lintobj;
import int8 OPT_nofGmod; import int8 OPT_nofGmod;
import OPT_Object OPT_GlbMod[64]; import OPT_Object OPT_GlbMod[64];
import OPS_Name OPT_SelfName; import OPS_Name OPT_SelfName;

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -258,6 +258,9 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte
void OPV_AdrAndSize (OPT_Object topScope) void OPV_AdrAndSize (OPT_Object topScope)
{ {
__ASSERT(OPT_sinttyp != NIL, 0);
__ASSERT(OPT_inttyp != NIL, 0);
__ASSERT(OPT_linttyp != NIL, 0);
OPM_errpos = topScope->adr; OPM_errpos = topScope->adr;
topScope->leaf = 1; topScope->leaf = 1;
OPV_Traverse(topScope->right, topScope, 1); OPV_Traverse(topScope->right, topScope, 1);
@ -265,15 +268,12 @@ void OPV_AdrAndSize (OPT_Object topScope)
OPT_chartyp->strobj->linkadr = 2; OPT_chartyp->strobj->linkadr = 2;
OPT_settyp->strobj->linkadr = 2; OPT_settyp->strobj->linkadr = 2;
OPT_realtyp->strobj->linkadr = 2; OPT_realtyp->strobj->linkadr = 2;
OPT_inttyp->strobj->linkadr = 2;
OPT_linttyp->strobj->linkadr = 2;
OPT_adrtyp->strobj->linkadr = 2; OPT_adrtyp->strobj->linkadr = 2;
OPT_int8typ->strobj->linkadr = 2; OPT_int8typ->strobj->linkadr = 2;
OPT_int16typ->strobj->linkadr = 2; OPT_int16typ->strobj->linkadr = 2;
OPT_int32typ->strobj->linkadr = 2; OPT_int32typ->strobj->linkadr = 2;
OPT_int64typ->strobj->linkadr = 2; OPT_int64typ->strobj->linkadr = 2;
OPT_lrltyp->strobj->linkadr = 2; OPT_lrltyp->strobj->linkadr = 2;
OPT_sinttyp->strobj->linkadr = 2;
OPT_booltyp->strobj->linkadr = 2; OPT_booltyp->strobj->linkadr = 2;
OPT_bytetyp->strobj->linkadr = 2; OPT_bytetyp->strobj->linkadr = 2;
OPT_sysptrtyp->strobj->linkadr = 2; OPT_sysptrtyp->strobj->linkadr = 2;

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkamSf */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkamSf */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -84,12 +84,20 @@ static void Vishap_PropagateElementaryTypeSizes (void)
OPT_chartyp->size = OPM_CharSize; OPT_chartyp->size = OPM_CharSize;
OPT_settyp->size = OPM_SetSize; OPT_settyp->size = OPM_SetSize;
OPT_realtyp->size = OPM_RealSize; OPT_realtyp->size = OPM_RealSize;
OPT_inttyp->size = OPM_IntSize;
OPT_linttyp->size = OPM_LIntSize;
OPT_adrtyp->size = OPM_PointerSize; OPT_adrtyp->size = OPM_PointerSize;
OPT_lrltyp->size = OPM_LRealSize; OPT_lrltyp->size = OPM_LRealSize;
OPT_sinttyp->size = OPM_SIntSize;
OPT_booltyp->size = OPM_BoolSize; OPT_booltyp->size = OPM_BoolSize;
OPT_sinttyp = OPT_int8typ;
if (OPM_IntSize == 2) {
OPT_inttyp = OPT_int16typ;
OPT_linttyp = OPT_int32typ;
} else {
OPT_inttyp = OPT_int32typ;
OPT_linttyp = OPT_int64typ;
}
OPT_sintobj->typ = OPT_sinttyp;
OPT_intobj->typ = OPT_inttyp;
OPT_lintobj->typ = OPT_linttyp;
} }
void Vishap_Translate (void) void Vishap_Translate (void)

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef errors__h #ifndef errors__h
#define errors__h #define errors__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef vt100__h #ifndef vt100__h
#define vt100__h #define vt100__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64
@ -18,6 +18,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("1.95 [2016/09/15] for gcc LP64 on cygwin", Configuration_versionLong, 41); __MOVE("1.95 [2016/09/18] for gcc LP64 on cygwin", Configuration_versionLong, 41);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Console__h #ifndef Console__h
#define Console__h #define Console__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64
@ -89,11 +89,11 @@ typedef
export void (*OPT_typSize)(OPT_Struct); export void (*OPT_typSize)(OPT_Struct);
export OPT_Object OPT_topScope; export OPT_Object OPT_topScope;
export OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp; export OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp;
export OPT_Object OPT_sintobj, OPT_intobj, OPT_lintobj;
export int8 OPT_nofGmod; export int8 OPT_nofGmod;
export OPT_Object OPT_GlbMod[64]; export OPT_Object OPT_GlbMod[64];
export OPS_Name OPT_SelfName; export OPS_Name OPT_SelfName;
export BOOLEAN OPT_SYSimported; export BOOLEAN OPT_SYSimported;
static OPT_Struct OPT_IntTypes[20];
static OPT_Object OPT_universe, OPT_syslink; static OPT_Object OPT_universe, OPT_syslink;
static OPT_ImpCtxt OPT_impCtxt; static OPT_ImpCtxt OPT_impCtxt;
static OPT_ExpCtxt OPT_expCtxt; static OPT_ExpCtxt OPT_expCtxt;
@ -113,6 +113,7 @@ static void OPT_DebugStruct (OPT_Struct btyp);
static void OPT_EnterBoolConst (OPS_Name name, int64 value); static void OPT_EnterBoolConst (OPS_Name name, int64 value);
static void OPT_EnterProc (OPS_Name name, int32 num); static void OPT_EnterProc (OPS_Name name, int32 num);
static void OPT_EnterTyp (OPS_Name name, int8 form, int32 size, OPT_Struct *res); static void OPT_EnterTyp (OPS_Name name, int8 form, int32 size, OPT_Struct *res);
static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res);
export void OPT_Export (BOOLEAN *ext, BOOLEAN *new); export void OPT_Export (BOOLEAN *ext, BOOLEAN *new);
export void OPT_FPrintErr (OPT_Object obj, int32 errcode); export void OPT_FPrintErr (OPT_Object obj, int32 errcode);
static void OPT_FPrintName (int64 *fp, CHAR *name, LONGINT name__len); static void OPT_FPrintName (int64 *fp, CHAR *name, LONGINT name__len);
@ -165,16 +166,20 @@ static void OPT_err (int32 n)
OPT_Struct OPT_IntType (int64 size) OPT_Struct OPT_IntType (int64 size)
{ {
OPT_Struct _o_result; OPT_Struct _o_result;
int32 i; if (size <= OPT_int8typ->size) {
i = 1; _o_result = OPT_int8typ;
while (i < 19) {
if ((OPT_IntTypes[__X(i, 20)] != NIL && OPT_IntTypes[__X(i, 20)]->size >= size)) {
_o_result = OPT_IntTypes[__X(i, 20)];
return _o_result; return _o_result;
} }
i += 1; if (size <= OPT_int16typ->size) {
_o_result = OPT_int16typ;
return _o_result;
} }
__RETCHK; if (size <= OPT_int32typ->size) {
_o_result = OPT_int32typ;
return _o_result;
}
_o_result = OPT_int64typ;
return _o_result;
} }
OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, int32 dir) OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, int32 dir)
@ -182,15 +187,40 @@ OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, int32 dir)
OPT_Struct _o_result; OPT_Struct _o_result;
int32 i; int32 i;
__ASSERT(x->form == 4, 0); __ASSERT(x->form == 4, 0);
__ASSERT(dir == 1 || dir == -1, 0);
__ASSERT(x->BaseTyp == OPT_undftyp, 0); __ASSERT(x->BaseTyp == OPT_undftyp, 0);
i = 0; __ASSERT(dir == 1 || dir == -1, 0);
while ((OPT_IntTypes[__X(i, 20)] != x && i < 20)) { if (dir > 0) {
i += 1; if (x->size < OPT_sinttyp->size) {
} _o_result = OPT_sinttyp;
__ASSERT(i < 19, 0);
_o_result = OPT_IntTypes[__X(i + dir, 20)];
return _o_result; return _o_result;
}
if (x->size < OPT_inttyp->size) {
_o_result = OPT_inttyp;
return _o_result;
}
if (x->size < OPT_linttyp->size) {
_o_result = OPT_linttyp;
return _o_result;
}
_o_result = OPT_int64typ;
return _o_result;
} else {
if (x->size > OPT_linttyp->size) {
_o_result = OPT_linttyp;
return _o_result;
}
if (x->size > OPT_inttyp->size) {
_o_result = OPT_inttyp;
return _o_result;
}
if (x->size > OPT_sinttyp->size) {
_o_result = OPT_sinttyp;
return _o_result;
}
_o_result = OPT_int8typ;
return _o_result;
}
__RETCHK;
} }
OPT_Const OPT_NewConst (void) OPT_Const OPT_NewConst (void)
@ -505,21 +535,21 @@ void OPT_IdFPrint (OPT_Struct typ)
} }
} }
static struct FPrintStr__12 { static struct FPrintStr__13 {
int64 *pbfp, *pvfp; int64 *pbfp, *pvfp;
struct FPrintStr__12 *lnk; struct FPrintStr__13 *lnk;
} *FPrintStr__12_s; } *FPrintStr__13_s;
static void FPrintFlds__13 (OPT_Object fld, int64 adr, BOOLEAN visible); static void FPrintFlds__14 (OPT_Object fld, int64 adr, BOOLEAN visible);
static void FPrintHdFld__15 (OPT_Struct typ, OPT_Object fld, int64 adr); static void FPrintHdFld__16 (OPT_Struct typ, OPT_Object fld, int64 adr);
static void FPrintTProcs__17 (OPT_Object obj); static void FPrintTProcs__18 (OPT_Object obj);
static void FPrintHdFld__15 (OPT_Struct typ, OPT_Object fld, int64 adr) static void FPrintHdFld__16 (OPT_Struct typ, OPT_Object fld, int64 adr)
{ {
int64 i, j, n; int64 i, j, n;
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
if (typ->comp == 4) { if (typ->comp == 4) {
FPrintFlds__13(typ->link, adr, 0); FPrintFlds__14(typ->link, adr, 0);
} else if (typ->comp == 2) { } else if (typ->comp == 2) {
btyp = typ->BaseTyp; btyp = typ->BaseTyp;
n = typ->n; n = typ->n;
@ -529,53 +559,53 @@ static void FPrintHdFld__15 (OPT_Struct typ, OPT_Object fld, int64 adr)
} }
if (btyp->form == 11 || btyp->comp == 4) { if (btyp->form == 11 || btyp->comp == 4) {
j = OPT_nofhdfld; j = OPT_nofhdfld;
FPrintHdFld__15(btyp, fld, adr); FPrintHdFld__16(btyp, fld, adr);
if (j != OPT_nofhdfld) { if (j != OPT_nofhdfld) {
i = 1; i = 1;
while ((i < n && OPT_nofhdfld <= 2048)) { while ((i < n && OPT_nofhdfld <= 2048)) {
adr += btyp->size; adr += btyp->size;
FPrintHdFld__15(btyp, fld, adr); FPrintHdFld__16(btyp, fld, adr);
i += 1; i += 1;
} }
} }
} }
} else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) { } else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) {
OPM_FPrint(&*FPrintStr__12_s->pvfp, 11); OPM_FPrint(&*FPrintStr__13_s->pvfp, 11);
OPM_FPrint(&*FPrintStr__12_s->pvfp, adr); OPM_FPrint(&*FPrintStr__13_s->pvfp, adr);
OPT_nofhdfld += 1; OPT_nofhdfld += 1;
} }
} }
static void FPrintFlds__13 (OPT_Object fld, int64 adr, BOOLEAN visible) static void FPrintFlds__14 (OPT_Object fld, int64 adr, BOOLEAN visible)
{ {
while ((fld != NIL && fld->mode == 4)) { while ((fld != NIL && fld->mode == 4)) {
if ((fld->vis != 0 && visible)) { if ((fld->vis != 0 && visible)) {
OPM_FPrint(&*FPrintStr__12_s->pbfp, fld->vis); OPM_FPrint(&*FPrintStr__13_s->pbfp, fld->vis);
OPT_FPrintName(&*FPrintStr__12_s->pbfp, (void*)fld->name, 256); OPT_FPrintName(&*FPrintStr__13_s->pbfp, (void*)fld->name, 256);
OPM_FPrint(&*FPrintStr__12_s->pbfp, fld->adr); OPM_FPrint(&*FPrintStr__13_s->pbfp, fld->adr);
OPT_FPrintStr(fld->typ); OPT_FPrintStr(fld->typ);
OPM_FPrint(&*FPrintStr__12_s->pbfp, fld->typ->pbfp); OPM_FPrint(&*FPrintStr__13_s->pbfp, fld->typ->pbfp);
OPM_FPrint(&*FPrintStr__12_s->pvfp, fld->typ->pvfp); OPM_FPrint(&*FPrintStr__13_s->pvfp, fld->typ->pvfp);
} else { } else {
FPrintHdFld__15(fld->typ, fld, fld->adr + adr); FPrintHdFld__16(fld->typ, fld, fld->adr + adr);
} }
fld = fld->link; fld = fld->link;
} }
} }
static void FPrintTProcs__17 (OPT_Object obj) static void FPrintTProcs__18 (OPT_Object obj)
{ {
if (obj != NIL) { if (obj != NIL) {
FPrintTProcs__17(obj->left); FPrintTProcs__18(obj->left);
if (obj->mode == 13) { if (obj->mode == 13) {
if (obj->vis != 0) { if (obj->vis != 0) {
OPM_FPrint(&*FPrintStr__12_s->pbfp, 13); OPM_FPrint(&*FPrintStr__13_s->pbfp, 13);
OPM_FPrint(&*FPrintStr__12_s->pbfp, __ASHR(obj->adr, 16)); OPM_FPrint(&*FPrintStr__13_s->pbfp, __ASHR(obj->adr, 16));
OPT_FPrintSign(&*FPrintStr__12_s->pbfp, obj->typ, obj->link); OPT_FPrintSign(&*FPrintStr__13_s->pbfp, obj->typ, obj->link);
OPT_FPrintName(&*FPrintStr__12_s->pbfp, (void*)obj->name, 256); OPT_FPrintName(&*FPrintStr__13_s->pbfp, (void*)obj->name, 256);
} }
} }
FPrintTProcs__17(obj->right); FPrintTProcs__18(obj->right);
} }
} }
@ -585,11 +615,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
OPT_Object strobj = NIL, bstrobj = NIL; OPT_Object strobj = NIL, bstrobj = NIL;
int64 pbfp, pvfp; int64 pbfp, pvfp;
struct FPrintStr__12 _s; struct FPrintStr__13 _s;
_s.pbfp = &pbfp; _s.pbfp = &pbfp;
_s.pvfp = &pvfp; _s.pvfp = &pvfp;
_s.lnk = FPrintStr__12_s; _s.lnk = FPrintStr__13_s;
FPrintStr__12_s = &_s; FPrintStr__13_s = &_s;
if (!typ->fpdone) { if (!typ->fpdone) {
OPT_IdFPrint(typ); OPT_IdFPrint(typ);
pbfp = typ->idfp; pbfp = typ->idfp;
@ -626,11 +656,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPM_FPrint(&pvfp, typ->align); OPM_FPrint(&pvfp, typ->align);
OPM_FPrint(&pvfp, typ->n); OPM_FPrint(&pvfp, typ->n);
OPT_nofhdfld = 0; OPT_nofhdfld = 0;
FPrintFlds__13(typ->link, 0, 1); FPrintFlds__14(typ->link, 0, 1);
if (OPT_nofhdfld > 2048) { if (OPT_nofhdfld > 2048) {
OPM_Mark(225, typ->txtpos); OPM_Mark(225, typ->txtpos);
} }
FPrintTProcs__17(typ->link); FPrintTProcs__18(typ->link);
OPM_FPrint(&pvfp, pbfp); OPM_FPrint(&pvfp, pbfp);
strobj = typ->strobj; strobj = typ->strobj;
if (strobj == NIL || strobj->name[0] == 0x00) { if (strobj == NIL || strobj->name[0] == 0x00) {
@ -640,7 +670,7 @@ void OPT_FPrintStr (OPT_Struct typ)
typ->pbfp = pbfp; typ->pbfp = pbfp;
typ->pvfp = pvfp; typ->pvfp = pvfp;
} }
FPrintStr__12_s = _s.lnk; FPrintStr__13_s = _s.lnk;
} }
void OPT_FPrintObj (OPT_Object obj) void OPT_FPrintObj (OPT_Object obj)
@ -1754,6 +1784,18 @@ static void OPT_EnterTyp (OPS_Name name, int8 form, int32 size, OPT_Struct *res)
*res = typ; *res = typ;
} }
static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res)
{
OPT_Object obj = NIL;
OPS_Name name__copy;
__DUPARR(name, OPS_Name);
OPT_Insert(name, &obj);
obj->mode = 5;
obj->typ = NIL;
obj->vis = 1;
*res = obj;
}
static void OPT_EnterProc (OPS_Name name, int32 num) static void OPT_EnterProc (OPS_Name name, int32 num)
{ {
OPT_Object obj = NIL; OPT_Object obj = NIL;
@ -1787,8 +1829,10 @@ static void EnumPtrs(void (*P)(void*))
P(OPT_niltyp); P(OPT_niltyp);
P(OPT_notyp); P(OPT_notyp);
P(OPT_sysptrtyp); P(OPT_sysptrtyp);
P(OPT_sintobj);
P(OPT_intobj);
P(OPT_lintobj);
__ENUMP(OPT_GlbMod, 64, P); __ENUMP(OPT_GlbMod, 64, P);
__ENUMP(OPT_IntTypes, 20, P);
P(OPT_universe); P(OPT_universe);
P(OPT_syslink); P(OPT_syslink);
__ENUMR(&OPT_impCtxt, OPT_ImpCtxt__typ, 6216, 1, P); __ENUMR(&OPT_impCtxt, OPT_ImpCtxt__typ, 6216, 1, P);
@ -1881,10 +1925,10 @@ export void *OPT__init(void)
OPT_EnterTyp((CHAR*)"CHAR", 3, OPM_CharSize, &OPT_chartyp); OPT_EnterTyp((CHAR*)"CHAR", 3, OPM_CharSize, &OPT_chartyp);
OPT_EnterTyp((CHAR*)"SET", 7, OPM_SetSize, &OPT_settyp); OPT_EnterTyp((CHAR*)"SET", 7, OPM_SetSize, &OPT_settyp);
OPT_EnterTyp((CHAR*)"REAL", 5, OPM_RealSize, &OPT_realtyp); OPT_EnterTyp((CHAR*)"REAL", 5, OPM_RealSize, &OPT_realtyp);
OPT_EnterTyp((CHAR*)"INTEGER", 4, OPM_IntSize, &OPT_inttyp);
OPT_EnterTyp((CHAR*)"LONGINT", 4, OPM_LIntSize, &OPT_linttyp);
OPT_EnterTyp((CHAR*)"LONGREAL", 6, OPM_LRealSize, &OPT_lrltyp); OPT_EnterTyp((CHAR*)"LONGREAL", 6, OPM_LRealSize, &OPT_lrltyp);
OPT_EnterTyp((CHAR*)"SHORTINT", 4, OPM_SIntSize, &OPT_sinttyp); OPT_EnterTypeAlias((CHAR*)"SHORTINT", &OPT_sintobj);
OPT_EnterTypeAlias((CHAR*)"INTEGER", &OPT_intobj);
OPT_EnterTypeAlias((CHAR*)"LONGINT", &OPT_lintobj);
OPT_EnterBoolConst((CHAR*)"FALSE", 0); OPT_EnterBoolConst((CHAR*)"FALSE", 0);
OPT_EnterBoolConst((CHAR*)"TRUE", 1); OPT_EnterBoolConst((CHAR*)"TRUE", 1);
OPT_EnterProc((CHAR*)"HALT", 0); OPT_EnterProc((CHAR*)"HALT", 0);
@ -1912,7 +1956,7 @@ export void *OPT__init(void)
OPT_impCtxt.ref[1] = OPT_bytetyp; OPT_impCtxt.ref[1] = OPT_bytetyp;
OPT_impCtxt.ref[2] = OPT_booltyp; OPT_impCtxt.ref[2] = OPT_booltyp;
OPT_impCtxt.ref[3] = OPT_chartyp; OPT_impCtxt.ref[3] = OPT_chartyp;
OPT_impCtxt.ref[4] = OPT_inttyp; OPT_impCtxt.ref[4] = OPT_int32typ;
OPT_impCtxt.ref[5] = OPT_realtyp; OPT_impCtxt.ref[5] = OPT_realtyp;
OPT_impCtxt.ref[6] = OPT_lrltyp; OPT_impCtxt.ref[6] = OPT_lrltyp;
OPT_impCtxt.ref[7] = OPT_settyp; OPT_impCtxt.ref[7] = OPT_settyp;
@ -1920,12 +1964,5 @@ export void *OPT__init(void)
OPT_impCtxt.ref[9] = OPT_niltyp; OPT_impCtxt.ref[9] = OPT_niltyp;
OPT_impCtxt.ref[10] = OPT_notyp; OPT_impCtxt.ref[10] = OPT_notyp;
OPT_impCtxt.ref[11] = OPT_sysptrtyp; OPT_impCtxt.ref[11] = OPT_sysptrtyp;
OPT_IntTypes[1] = OPT_sinttyp;
OPT_IntTypes[2] = OPT_inttyp;
OPT_IntTypes[3] = OPT_linttyp;
OPT_IntTypes[5] = OPT_int8typ;
OPT_IntTypes[6] = OPT_int16typ;
OPT_IntTypes[7] = OPT_int32typ;
OPT_IntTypes[8] = OPT_int64typ;
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/15] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h
@ -68,6 +68,7 @@ typedef
import void (*OPT_typSize)(OPT_Struct); import void (*OPT_typSize)(OPT_Struct);
import OPT_Object OPT_topScope; import OPT_Object OPT_topScope;
import OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp; import OPT_Struct OPT_undftyp, OPT_bytetyp, OPT_booltyp, OPT_chartyp, OPT_sinttyp, OPT_inttyp, OPT_linttyp, OPT_adrtyp, OPT_int8typ, OPT_int16typ, OPT_int32typ, OPT_int64typ, OPT_realtyp, OPT_lrltyp, OPT_settyp, OPT_stringtyp, OPT_niltyp, OPT_notyp, OPT_sysptrtyp;
import OPT_Object OPT_sintobj, OPT_intobj, OPT_lintobj;
import int8 OPT_nofGmod; import int8 OPT_nofGmod;
import OPT_Object OPT_GlbMod[64]; import OPT_Object OPT_GlbMod[64];
import OPS_Name OPT_SelfName; import OPS_Name OPT_SelfName;

Some files were not shown because too many files have changed in this diff Show more