mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 05:12:26 +00:00
Remove all use of forms SInt and LInt and remove intSet using just Int instead.
This commit is contained in:
parent
0508097ffe
commit
a1fd798f6d
62 changed files with 828 additions and 861 deletions
|
|
@ -173,7 +173,7 @@ OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, INTEGER dir)
|
|||
{
|
||||
OPT_Struct _o_result;
|
||||
INTEGER i;
|
||||
__ASSERT(__IN(x->form, 0x70), 0);
|
||||
__ASSERT(x->form == 5, 0);
|
||||
__ASSERT(dir == 1 || dir == -1, 0);
|
||||
__ASSERT(x->BaseTyp == OPT_undftyp, 0);
|
||||
i = 0;
|
||||
|
|
@ -414,7 +414,7 @@ static void OPT_FPrintName (LONGINT *fp, CHAR *name, LONGINT name__len)
|
|||
i = 0;
|
||||
do {
|
||||
ch = name[__X(i, name__len)];
|
||||
OPM_FPrint(&*fp, ch);
|
||||
OPM_FPrint(&*fp, (SYSTEM_INT16)ch);
|
||||
i += 1;
|
||||
} while (!(ch == 0x00));
|
||||
}
|
||||
|
|
@ -649,7 +649,7 @@ void OPT_FPrintObj (OPT_Object obj)
|
|||
f = obj->typ->form;
|
||||
OPM_FPrint(&fprint, f);
|
||||
switch (f) {
|
||||
case 2: case 3: case 4: case 5: case 6:
|
||||
case 2: case 3: case 5:
|
||||
OPM_FPrint(&fprint, obj->conval->intval);
|
||||
break;
|
||||
case 9:
|
||||
|
|
@ -680,11 +680,11 @@ void OPT_FPrintObj (OPT_Object obj)
|
|||
} else if (obj->mode == 9) {
|
||||
OPT_FPrintSign(&fprint, obj->typ, obj->link);
|
||||
ext = obj->conval->ext;
|
||||
m = (*ext)[0];
|
||||
m = (SYSTEM_INT16)(*ext)[0];
|
||||
f = 1;
|
||||
OPM_FPrint(&fprint, m);
|
||||
while (f <= m) {
|
||||
OPM_FPrint(&fprint, (*ext)[__X(f, 256)]);
|
||||
OPM_FPrint(&fprint, (SYSTEM_INT16)(*ext)[__X(f, 256)]);
|
||||
f += 1;
|
||||
}
|
||||
} else if (obj->mode == 5) {
|
||||
|
|
@ -848,9 +848,9 @@ static void OPT_InConstant (LONGINT f, OPT_Const conval)
|
|||
switch (f) {
|
||||
case 1: case 3: case 2:
|
||||
OPM_SymRCh(&ch);
|
||||
conval->intval = ch;
|
||||
conval->intval = (SYSTEM_INT16)ch;
|
||||
break;
|
||||
case 4: case 5: case 6:
|
||||
case 5:
|
||||
conval->intval = OPM_SymRInt();
|
||||
break;
|
||||
case 9:
|
||||
|
|
@ -979,7 +979,7 @@ static OPT_Object OPT_InTProc (SHORTINT mno)
|
|||
static OPT_Struct OPT_InTyp (LONGINT tag)
|
||||
{
|
||||
OPT_Struct _o_result;
|
||||
if (__IN(tag, 0x70)) {
|
||||
if (tag == 5) {
|
||||
_o_result = OPT_IntType(OPM_SymRInt());
|
||||
return _o_result;
|
||||
} else {
|
||||
|
|
@ -1049,7 +1049,7 @@ static void OPT_InStruct (OPT_Struct *typ)
|
|||
obj->vis = 0;
|
||||
tag = OPM_SymRInt();
|
||||
if (tag == 35) {
|
||||
(*typ)->sysflag = OPM_SymRInt();
|
||||
(*typ)->sysflag = (SYSTEM_INT16)OPM_SymRInt();
|
||||
tag = OPM_SymRInt();
|
||||
}
|
||||
switch (tag) {
|
||||
|
|
@ -1211,7 +1211,7 @@ static OPT_Object OPT_InObj (SHORTINT mno)
|
|||
obj->mode = 9;
|
||||
ext = OPT_NewExt();
|
||||
obj->conval->ext = ext;
|
||||
s = OPM_SymRInt();
|
||||
s = (SYSTEM_INT16)OPM_SymRInt();
|
||||
(*ext)[0] = (CHAR)s;
|
||||
i = 1;
|
||||
while (i <= s) {
|
||||
|
|
@ -1439,7 +1439,7 @@ static void OPT_OutStr (OPT_Struct typ)
|
|||
OPT_Object strobj = NIL;
|
||||
if (typ->ref < OPT_expCtxt.ref) {
|
||||
OPM_SymWInt(-typ->ref);
|
||||
if (__IN(typ->ref, 0x70)) {
|
||||
if (typ->ref == 5) {
|
||||
OPM_SymWInt(typ->size);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1537,7 +1537,7 @@ static void OPT_OutConstant (OPT_Object obj)
|
|||
case 2: case 3:
|
||||
OPM_SymWCh((CHAR)obj->conval->intval);
|
||||
break;
|
||||
case 4: case 5: case 6:
|
||||
case 5:
|
||||
OPM_SymWInt(obj->conval->intval);
|
||||
OPM_SymWInt(obj->typ->size);
|
||||
break;
|
||||
|
|
@ -1631,7 +1631,7 @@ static void OPT_OutObj (OPT_Object obj)
|
|||
OPM_SymWInt(33);
|
||||
OPT_OutSign(obj->typ, obj->link);
|
||||
ext = obj->conval->ext;
|
||||
j = (*ext)[0];
|
||||
j = (SYSTEM_INT16)(*ext)[0];
|
||||
i = 1;
|
||||
OPM_SymWInt(j);
|
||||
while (i <= j) {
|
||||
|
|
@ -1876,7 +1876,7 @@ export void *OPT__init(void)
|
|||
OPT_EnterTyp((CHAR*)"INTEGER", 5, OPM_IntSize, &OPT_inttyp);
|
||||
OPT_EnterTyp((CHAR*)"LONGINT", 5, OPM_LIntSize, &OPT_linttyp);
|
||||
OPT_EnterTyp((CHAR*)"LONGREAL", 8, OPM_LRealSize, &OPT_lrltyp);
|
||||
OPT_EnterTyp((CHAR*)"SHORTINT", 4, OPM_SIntSize, &OPT_sinttyp);
|
||||
OPT_EnterTyp((CHAR*)"SHORTINT", 5, OPM_SIntSize, &OPT_sinttyp);
|
||||
OPT_EnterBoolConst((CHAR*)"FALSE", 0);
|
||||
OPT_EnterBoolConst((CHAR*)"TRUE", 1);
|
||||
OPT_EnterProc((CHAR*)"HALT", 0);
|
||||
|
|
@ -1904,9 +1904,7 @@ export void *OPT__init(void)
|
|||
OPT_impCtxt.ref[1] = OPT_bytetyp;
|
||||
OPT_impCtxt.ref[2] = OPT_booltyp;
|
||||
OPT_impCtxt.ref[3] = OPT_chartyp;
|
||||
OPT_impCtxt.ref[4] = OPT_sinttyp;
|
||||
OPT_impCtxt.ref[5] = OPT_inttyp;
|
||||
OPT_impCtxt.ref[6] = OPT_linttyp;
|
||||
OPT_impCtxt.ref[7] = OPT_realtyp;
|
||||
OPT_impCtxt.ref[8] = OPT_lrltyp;
|
||||
OPT_impCtxt.ref[9] = OPT_settyp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue