mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 04:02:25 +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
|
|
@ -868,7 +868,7 @@ void Files_ReadSet (Files_Rider *R, LONGINT *R__typ, SET *x)
|
|||
LONGINT l;
|
||||
Files_ReadBytes(&*R, R__typ, (void*)b, 4, 4);
|
||||
l = ((b[0] + __ASHL(b[1], 8)) + __ASHL(b[2], 16)) + __ASHL(b[3], 24);
|
||||
*x = __VAL(SET, l);
|
||||
*x = (SET)l;
|
||||
}
|
||||
|
||||
void Files_ReadReal (Files_Rider *R, LONGINT *R__typ, REAL *x)
|
||||
|
|
@ -959,7 +959,7 @@ void Files_WriteSet (Files_Rider *R, LONGINT *R__typ, SET x)
|
|||
{
|
||||
CHAR b[4];
|
||||
LONGINT i;
|
||||
i = __VAL(LONGINT, x);
|
||||
i = (LONGINT)x;
|
||||
b[0] = (CHAR)i;
|
||||
b[1] = (CHAR)__ASHR(i, 8);
|
||||
b[2] = (CHAR)__ASHR(i, 16);
|
||||
|
|
|
|||
|
|
@ -328,11 +328,11 @@ SYSTEM_PTR Heap_NEWBLK (LONGINT size)
|
|||
Heap_Lock();
|
||||
blksz = __ASHL(__ASHR(size + 63, 5), 5);
|
||||
new = Heap_NEWREC((SYSTEM_ADRINT)&blksz);
|
||||
tag = (__VAL(LONGINT, new) + blksz) - 24;
|
||||
tag = ((LONGINT)(SYSTEM_ADRINT)new + blksz) - 24;
|
||||
__PUT(tag - 8, 0, LONGINT);
|
||||
__PUT(tag, blksz, LONGINT);
|
||||
__PUT(tag + 8, -8, LONGINT);
|
||||
__PUT(__VAL(LONGINT, new) - 8, tag, LONGINT);
|
||||
__PUT((LONGINT)(SYSTEM_ADRINT)new - 8, tag, LONGINT);
|
||||
Heap_Unlock();
|
||||
_o_result = new;
|
||||
return _o_result;
|
||||
|
|
@ -361,7 +361,7 @@ static void Heap_Mark (LONGINT q)
|
|||
__GET(tag, offset, LONGINT);
|
||||
fld = q + offset;
|
||||
p = Heap_FetchAddress(fld);
|
||||
__PUT(fld, __VAL(SYSTEM_PTR, n), SYSTEM_PTR);
|
||||
__PUT(fld, (SYSTEM_PTR)(SYSTEM_ADRINT)n, SYSTEM_PTR);
|
||||
} else {
|
||||
fld = q + offset;
|
||||
n = Heap_FetchAddress(fld);
|
||||
|
|
@ -370,7 +370,7 @@ static void Heap_Mark (LONGINT q)
|
|||
if (!__ODD(tagbits)) {
|
||||
__PUT(n - 8, tagbits + 1, LONGINT);
|
||||
__PUT(q - 8, tag + 1, LONGINT);
|
||||
__PUT(fld, __VAL(SYSTEM_PTR, p), SYSTEM_PTR);
|
||||
__PUT(fld, (SYSTEM_PTR)(SYSTEM_ADRINT)p, SYSTEM_PTR);
|
||||
p = q;
|
||||
q = n;
|
||||
tag = tagbits;
|
||||
|
|
@ -385,7 +385,7 @@ static void Heap_Mark (LONGINT q)
|
|||
|
||||
static void Heap_MarkP (SYSTEM_PTR p)
|
||||
{
|
||||
Heap_Mark(__VAL(LONGINT, p));
|
||||
Heap_Mark((LONGINT)(SYSTEM_ADRINT)p);
|
||||
}
|
||||
|
||||
static void Heap_Scan (void)
|
||||
|
|
@ -554,7 +554,7 @@ static void Heap_Finalize (void)
|
|||
} else {
|
||||
prev->next = n->next;
|
||||
}
|
||||
(*n->finalize)(__VAL(SYSTEM_PTR, n->obj));
|
||||
(*n->finalize)((SYSTEM_PTR)(SYSTEM_ADRINT)n->obj);
|
||||
if (prev == NIL) {
|
||||
n = Heap_fin;
|
||||
} else {
|
||||
|
|
@ -573,7 +573,7 @@ void Heap_FINALL (void)
|
|||
while (Heap_fin != NIL) {
|
||||
n = Heap_fin;
|
||||
Heap_fin = Heap_fin->next;
|
||||
(*n->finalize)(__VAL(SYSTEM_PTR, n->obj));
|
||||
(*n->finalize)((SYSTEM_PTR)(SYSTEM_ADRINT)n->obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -700,7 +700,7 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize)
|
|||
{
|
||||
Heap_FinNode f;
|
||||
__NEW(f, Heap_FinDesc);
|
||||
f->obj = __VAL(LONGINT, obj);
|
||||
f->obj = (LONGINT)(SYSTEM_ADRINT)obj;
|
||||
f->finalize = finalize;
|
||||
f->marked = 1;
|
||||
f->next = Heap_fin;
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ void OPB_Index (OPT_Node *x, OPT_Node y)
|
|||
f = y->typ->form;
|
||||
if ((*x)->class >= 7) {
|
||||
OPB_err(79);
|
||||
} else if (!__IN(f, 0x70) || __IN(y->class, 0x0300)) {
|
||||
} else if (f != 5 || __IN(y->class, 0x0300)) {
|
||||
OPB_err(80);
|
||||
y->typ = OPT_inttyp;
|
||||
}
|
||||
|
|
@ -466,7 +466,7 @@ void OPB_In (OPT_Node *x, OPT_Node y)
|
|||
f = (*x)->typ->form;
|
||||
if ((((*x)->class == 8 || (*x)->class == 9) || y->class == 8) || y->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((__IN(f, 0x70) && y->typ->form == 9)) {
|
||||
} else if ((f == 5 && y->typ->form == 9)) {
|
||||
if ((*x)->class == 7) {
|
||||
k = (*x)->conval->intval;
|
||||
if (k < 0 || k > (SYSTEM_INT64)OPM_MaxSet) {
|
||||
|
|
@ -568,14 +568,14 @@ void OPB_MOp (SHORTINT op, OPT_Node *x)
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
if (!__IN(f, 0x01f0)) {
|
||||
if (!__IN(f, 0x01a0)) {
|
||||
OPB_err(96);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (__IN(f, 0x03f0)) {
|
||||
if (__IN(f, 0x03a0)) {
|
||||
if (z->class == 7) {
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if (z->conval->intval == (-9223372036854775807-1)) {
|
||||
OPB_err(203);
|
||||
} else {
|
||||
|
|
@ -596,9 +596,9 @@ void OPB_MOp (SHORTINT op, OPT_Node *x)
|
|||
}
|
||||
break;
|
||||
case 21:
|
||||
if (__IN(f, 0x01f0)) {
|
||||
if (__IN(f, 0x01a0)) {
|
||||
if (z->class == 7) {
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if (z->conval->intval == (-9223372036854775807-1)) {
|
||||
OPB_err(203);
|
||||
} else {
|
||||
|
|
@ -630,7 +630,7 @@ void OPB_MOp (SHORTINT op, OPT_Node *x)
|
|||
}
|
||||
break;
|
||||
case 23:
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if (z->class == 7) {
|
||||
z->conval->intval = OPB_BoolToInt(__ODD(z->conval->intval));
|
||||
z->obj = NIL;
|
||||
|
|
@ -655,7 +655,7 @@ void OPB_MOp (SHORTINT op, OPT_Node *x)
|
|||
z->typ = OPT_linttyp;
|
||||
break;
|
||||
case 25:
|
||||
if ((__IN(f, 0x70) && z->class == 7)) {
|
||||
if ((f == 5 && z->class == 7)) {
|
||||
if ((0 <= z->conval->intval && z->conval->intval <= -1)) {
|
||||
z = NewOp__29(op, typ, z);
|
||||
} else {
|
||||
|
|
@ -778,7 +778,7 @@ static INTEGER ConstCmp__14 (void)
|
|||
case 0:
|
||||
res = 9;
|
||||
break;
|
||||
case 1: case 3: case 4: case 5: case 6:
|
||||
case 1: case 3: case 4: case 5:
|
||||
if ((*ConstOp__13_s->xval)->intval < (*ConstOp__13_s->yval)->intval) {
|
||||
res = 11;
|
||||
} else if ((*ConstOp__13_s->xval)->intval > (*ConstOp__13_s->yval)->intval) {
|
||||
|
|
@ -865,8 +865,8 @@ static void OPB_ConstOp (INTEGER op, OPT_Node x, OPT_Node y)
|
|||
__GUARDEQP(yval, OPT_ConstDesc) = *xval;
|
||||
}
|
||||
break;
|
||||
case 4: case 5: case 6:
|
||||
if (__IN(g, 0x70)) {
|
||||
case 5:
|
||||
if (g == 5) {
|
||||
if (x->typ->size <= y->typ->size) {
|
||||
x->typ = y->typ;
|
||||
} else {
|
||||
|
|
@ -885,7 +885,7 @@ static void OPB_ConstOp (INTEGER op, OPT_Node x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 7:
|
||||
if (__IN(g, 0x70)) {
|
||||
if (g == 5) {
|
||||
y->typ = x->typ;
|
||||
yval->realval = yval->intval;
|
||||
} else if (g == 8) {
|
||||
|
|
@ -897,7 +897,7 @@ static void OPB_ConstOp (INTEGER op, OPT_Node x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 8:
|
||||
if (__IN(g, 0x70)) {
|
||||
if (g == 5) {
|
||||
y->typ = x->typ;
|
||||
yval->realval = yval->intval;
|
||||
} else if (g == 7) {
|
||||
|
|
@ -941,7 +941,7 @@ static void OPB_ConstOp (INTEGER op, OPT_Node x, OPT_Node y)
|
|||
}
|
||||
switch (op) {
|
||||
case 1:
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
xv = xval->intval;
|
||||
yv = yval->intval;
|
||||
if (((((xv == 0 || yv == 0) || (((xv > 0 && yv > 0)) && yv <= __DIV(9223372036854775807, xv))) || (((xv > 0 && yv < 0)) && yv >= __DIV((-9223372036854775807-1), xv))) || (((xv < 0 && yv > 0)) && xv >= __DIV((-9223372036854775807-1), yv))) || (((((((xv < 0 && yv < 0)) && xv != (-9223372036854775807-1))) && yv != (-9223372036854775807-1))) && -xv <= __DIV(9223372036854775807, -yv))) {
|
||||
|
|
@ -965,7 +965,7 @@ static void OPB_ConstOp (INTEGER op, OPT_Node x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 2:
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if (yval->intval != 0) {
|
||||
xval->realval = xval->intval / (REAL)yval->intval;
|
||||
OPB_CheckRealType(7, 205, xval);
|
||||
|
|
@ -989,7 +989,7 @@ static void OPB_ConstOp (INTEGER op, OPT_Node x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 3:
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if (yval->intval != 0) {
|
||||
xval->intval = __DIV(xval->intval, yval->intval);
|
||||
OPB_SetIntType(x);
|
||||
|
|
@ -1001,7 +1001,7 @@ static void OPB_ConstOp (INTEGER op, OPT_Node x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 4:
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if (yval->intval != 0) {
|
||||
xval->intval = __MOD(xval->intval, yval->intval);
|
||||
OPB_SetIntType(x);
|
||||
|
|
@ -1020,7 +1020,7 @@ static void OPB_ConstOp (INTEGER op, OPT_Node x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
temp = (yval->intval >= 0 && xval->intval <= 9223372036854775807 - yval->intval);
|
||||
if (temp || (yval->intval < 0 && xval->intval >= (-9223372036854775807-1) - yval->intval)) {
|
||||
xval->intval += yval->intval;
|
||||
|
|
@ -1043,7 +1043,7 @@ static void OPB_ConstOp (INTEGER op, OPT_Node x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 7:
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if ((yval->intval >= 0 && xval->intval >= (-9223372036854775807-1) + yval->intval) || (yval->intval < 0 && xval->intval <= 9223372036854775807 + yval->intval)) {
|
||||
xval->intval -= yval->intval;
|
||||
OPB_SetIntType(x);
|
||||
|
|
@ -1123,8 +1123,8 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ)
|
|||
f = (*x)->typ->form;
|
||||
g = typ->form;
|
||||
if ((*x)->class == 7) {
|
||||
if (__IN(f, 0x70)) {
|
||||
if (__IN(g, 0x70)) {
|
||||
if (f == 5) {
|
||||
if (g == 5) {
|
||||
if (f > g) {
|
||||
OPB_SetIntType(*x);
|
||||
if ((*x)->typ->size > typ->size) {
|
||||
|
|
@ -1248,17 +1248,17 @@ void OPB_Op (SHORTINT op, OPT_Node *x, OPT_Node y)
|
|||
OPB_err(100);
|
||||
}
|
||||
break;
|
||||
case 4: case 5: case 6:
|
||||
if ((__IN(g, 0x70) && y->typ->size < z->typ->size)) {
|
||||
case 5:
|
||||
if ((g == 5 && y->typ->size < z->typ->size)) {
|
||||
OPB_Convert(&y, z->typ);
|
||||
} else if (__IN(g, 0x01f0)) {
|
||||
} else if (__IN(g, 0x01a0)) {
|
||||
OPB_Convert(&z, y->typ);
|
||||
} else {
|
||||
OPB_err(100);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (__IN(g, 0x70)) {
|
||||
if (g == 5) {
|
||||
OPB_Convert(&y, z->typ);
|
||||
} else if (__IN(g, 0x0180)) {
|
||||
OPB_Convert(&z, y->typ);
|
||||
|
|
@ -1267,7 +1267,7 @@ void OPB_Op (SHORTINT op, OPT_Node *x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 8:
|
||||
if (__IN(g, 0x01f0)) {
|
||||
if (__IN(g, 0x01a0)) {
|
||||
OPB_Convert(&y, z->typ);
|
||||
} else if (__IN(g, 0x0180)) {
|
||||
OPB_Convert(&y, z->typ);
|
||||
|
|
@ -1306,7 +1306,7 @@ void OPB_Op (SHORTINT op, OPT_Node *x, OPT_Node y)
|
|||
switch (op) {
|
||||
case 1:
|
||||
do_ = 1;
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if (z->class == 7) {
|
||||
val = z->conval->intval;
|
||||
if (val == 1) {
|
||||
|
|
@ -1346,7 +1346,7 @@ void OPB_Op (SHORTINT op, OPT_Node *x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 2:
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if ((y->class == 7 && y->conval->intval == 0)) {
|
||||
OPB_err(205);
|
||||
}
|
||||
|
|
@ -1365,7 +1365,7 @@ void OPB_Op (SHORTINT op, OPT_Node *x, OPT_Node y)
|
|||
break;
|
||||
case 3:
|
||||
do_ = 1;
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if (y->class == 7) {
|
||||
val = y->conval->intval;
|
||||
if (val == 0) {
|
||||
|
|
@ -1388,7 +1388,7 @@ void OPB_Op (SHORTINT op, OPT_Node *x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 4:
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if (y->class == 7) {
|
||||
if (y->conval->intval == 0) {
|
||||
OPB_err(205);
|
||||
|
|
@ -1420,12 +1420,12 @@ void OPB_Op (SHORTINT op, OPT_Node *x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
if (!__IN(f, 0x03f1)) {
|
||||
if (!__IN(f, 0x03e1)) {
|
||||
OPB_err(105);
|
||||
typ = OPT_undftyp;
|
||||
}
|
||||
do_ = 1;
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if ((z->class == 7 && z->conval->intval == 0)) {
|
||||
do_ = 0;
|
||||
z = y;
|
||||
|
|
@ -1439,11 +1439,11 @@ void OPB_Op (SHORTINT op, OPT_Node *x, OPT_Node y)
|
|||
}
|
||||
break;
|
||||
case 7:
|
||||
if (!__IN(f, 0x03f1)) {
|
||||
if (!__IN(f, 0x03e1)) {
|
||||
OPB_err(106);
|
||||
typ = OPT_undftyp;
|
||||
}
|
||||
if ((!__IN(f, 0x70) || y->class != 7) || y->conval->intval != 0) {
|
||||
if ((f != 5 || y->class != 7) || y->conval->intval != 0) {
|
||||
NewOp__39(op, typ, &z, y);
|
||||
}
|
||||
break;
|
||||
|
|
@ -1499,7 +1499,7 @@ void OPB_SetRange (OPT_Node *x, OPT_Node y)
|
|||
LONGINT k, l;
|
||||
if ((((*x)->class == 8 || (*x)->class == 9) || y->class == 8) || y->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((__IN((*x)->typ->form, 0x70) && __IN(y->typ->form, 0x70))) {
|
||||
} else if (((*x)->typ->form == 5 && y->typ->form == 5)) {
|
||||
if ((*x)->class == 7) {
|
||||
k = (*x)->conval->intval;
|
||||
if (0 > k || k > (SYSTEM_INT64)OPM_MaxSet) {
|
||||
|
|
@ -1534,7 +1534,7 @@ void OPB_SetElem (OPT_Node *x)
|
|||
LONGINT k;
|
||||
if ((*x)->class == 8 || (*x)->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (!__IN((*x)->typ->form, 0x70)) {
|
||||
} else if ((*x)->typ->form != 5) {
|
||||
OPB_err(93);
|
||||
} else if ((*x)->class == 7) {
|
||||
k = (*x)->conval->intval;
|
||||
|
|
@ -1584,7 +1584,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
|||
case 0: case 10:
|
||||
break;
|
||||
case 1:
|
||||
if (!((__IN(g, 0x7a) && y->size == 1))) {
|
||||
if (!((__IN(g, 0x2a) && y->size == 1))) {
|
||||
OPB_err(113);
|
||||
}
|
||||
break;
|
||||
|
|
@ -1593,18 +1593,18 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
|||
OPB_err(113);
|
||||
}
|
||||
break;
|
||||
case 4: case 5: case 6:
|
||||
if (!__IN(g, 0x70) || x->size < y->size) {
|
||||
case 5:
|
||||
if (g != 5 || x->size < y->size) {
|
||||
OPB_err(113);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (!__IN(g, 0xf0)) {
|
||||
if (!__IN(g, 0xe0)) {
|
||||
OPB_err(113);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (!__IN(g, 0x01f0)) {
|
||||
if (!__IN(g, 0x01e0)) {
|
||||
OPB_err(113);
|
||||
}
|
||||
break;
|
||||
|
|
@ -1687,7 +1687,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
|||
OPM_LogWLn();
|
||||
break;
|
||||
}
|
||||
if ((((((ynode->class == 7 && g < f)) && __IN(g, 0xf0))) && __IN(f, 0x01e0))) {
|
||||
if ((((((ynode->class == 7 && g < f)) && __IN(g, 0xe0))) && __IN(f, 0x01e0))) {
|
||||
OPB_Convert(&ynode, x);
|
||||
}
|
||||
}
|
||||
|
|
@ -1705,7 +1705,7 @@ void OPB_StPar0 (OPT_Node *par0, INTEGER fctno)
|
|||
f = x->typ->form;
|
||||
switch (fctno) {
|
||||
case 0:
|
||||
if ((__IN(f, 0x70) && x->class == 7)) {
|
||||
if ((f == 5 && x->class == 7)) {
|
||||
if ((0 <= x->conval->intval && x->conval->intval <= 255)) {
|
||||
OPB_BindNodes(28, OPT_notyp, &x, x);
|
||||
} else {
|
||||
|
|
@ -1778,7 +1778,7 @@ void OPB_StPar0 (OPT_Node *par0, INTEGER fctno)
|
|||
x = OPB_NewIntConst(0);
|
||||
x->typ = OPT_chartyp;
|
||||
break;
|
||||
case 4: case 5: case 6:
|
||||
case 5:
|
||||
x = OPB_NewIntConst(OPM_SignedMinimum(x->typ->size));
|
||||
break;
|
||||
case 9:
|
||||
|
|
@ -1809,7 +1809,7 @@ void OPB_StPar0 (OPT_Node *par0, INTEGER fctno)
|
|||
x = OPB_NewIntConst(255);
|
||||
x->typ = OPT_chartyp;
|
||||
break;
|
||||
case 4: case 5: case 6:
|
||||
case 5:
|
||||
x = OPB_NewIntConst(OPM_SignedMaximum(x->typ->size));
|
||||
break;
|
||||
case 9:
|
||||
|
|
@ -1833,7 +1833,7 @@ void OPB_StPar0 (OPT_Node *par0, INTEGER fctno)
|
|||
case 9:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (__IN(f, 0x71)) {
|
||||
} else if (__IN(f, 0x21)) {
|
||||
OPB_Convert(&x, OPT_chartyp);
|
||||
} else {
|
||||
OPB_err(111);
|
||||
|
|
@ -1843,7 +1843,7 @@ void OPB_StPar0 (OPT_Node *par0, INTEGER fctno)
|
|||
case 10:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (__IN(f, 0x70)) {
|
||||
} else if (f == 5) {
|
||||
typ = OPT_ShorterOrLongerType(x->typ, -1);
|
||||
if (typ == NIL) {
|
||||
OPB_err(111);
|
||||
|
|
@ -1859,7 +1859,7 @@ void OPB_StPar0 (OPT_Node *par0, INTEGER fctno)
|
|||
case 11:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (__IN(f, 0x70)) {
|
||||
} else if (f == 5) {
|
||||
typ = OPT_ShorterOrLongerType(x->typ, 1);
|
||||
if (typ == NIL) {
|
||||
OPB_err(111);
|
||||
|
|
@ -1877,7 +1877,7 @@ void OPB_StPar0 (OPT_Node *par0, INTEGER fctno)
|
|||
case 13: case 14:
|
||||
if (OPB_NotVar(x)) {
|
||||
OPB_err(112);
|
||||
} else if (!__IN(f, 0x70)) {
|
||||
} else if (f != 5) {
|
||||
OPB_err(111);
|
||||
} else if (x->readonly) {
|
||||
OPB_err(76);
|
||||
|
|
@ -1912,7 +1912,7 @@ void OPB_StPar0 (OPT_Node *par0, INTEGER fctno)
|
|||
case 19:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (__IN(f, 0x70)) {
|
||||
} else if (f == 5) {
|
||||
if (x->typ->size != (SYSTEM_INT64)OPM_LIntSize) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
}
|
||||
|
|
@ -1944,22 +1944,22 @@ void OPB_StPar0 (OPT_Node *par0, INTEGER fctno)
|
|||
case 22: case 23:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (!__IN(f, 0x027a)) {
|
||||
} else if (!__IN(f, 0x022a)) {
|
||||
OPB_err(111);
|
||||
}
|
||||
break;
|
||||
case 24: case 25: case 28: case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && __IN(f, 0x70))) && x->typ->size < OPT_linttyp->size)) {
|
||||
} else if ((((x->class == 7 && f == 5)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if (!((__IN(x->typ->form, 0x2070) && x->typ->size == (SYSTEM_INT64)OPM_PointerSize))) {
|
||||
} else if (!((__IN(x->typ->form, 0x2020) && x->typ->size == (SYSTEM_INT64)OPM_PointerSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
}
|
||||
break;
|
||||
case 26: case 27:
|
||||
if ((__IN(f, 0x70) && x->class == 7)) {
|
||||
if ((f == 5 && x->class == 7)) {
|
||||
if (x->conval->intval < 0 || x->conval->intval > -1) {
|
||||
OPB_err(220);
|
||||
}
|
||||
|
|
@ -2037,7 +2037,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, SHORTINT fctno)
|
|||
p->typ = OPT_notyp;
|
||||
} else {
|
||||
if (x->typ != p->typ) {
|
||||
if ((x->class == 7 && __IN(f, 0x70))) {
|
||||
if ((x->class == 7 && f == 5)) {
|
||||
OPB_Convert(&x, p->typ);
|
||||
} else {
|
||||
OPB_err(111);
|
||||
|
|
@ -2050,7 +2050,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, SHORTINT fctno)
|
|||
case 15: case 16:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (__IN(f, 0x70)) {
|
||||
} else if (f == 5) {
|
||||
if ((x->class == 7 && (0 > x->conval->intval || x->conval->intval > (SYSTEM_INT64)OPM_MaxSet))) {
|
||||
OPB_err(202);
|
||||
}
|
||||
|
|
@ -2061,7 +2061,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, SHORTINT fctno)
|
|||
p->typ = OPT_notyp;
|
||||
break;
|
||||
case 17:
|
||||
if (!__IN(f, 0x70) || x->class != 7) {
|
||||
if (!(f == 5) || x->class != 7) {
|
||||
OPB_err(69);
|
||||
} else if (x->typ->size == 1) {
|
||||
L = (SYSTEM_INT32)x->conval->intval;
|
||||
|
|
@ -2110,7 +2110,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, SHORTINT fctno)
|
|||
case 19:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (__IN(f, 0x70)) {
|
||||
} else if (f == 5) {
|
||||
if ((p->class == 7 && x->class == 7)) {
|
||||
if (-OPB_maxExp > x->conval->intval || x->conval->intval > OPB_maxExp) {
|
||||
OPB_err(208);
|
||||
|
|
@ -2138,7 +2138,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, SHORTINT fctno)
|
|||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (p->typ->comp == 3) {
|
||||
if (__IN(f, 0x70)) {
|
||||
if (f == 5) {
|
||||
if ((x->class == 7 && (x->conval->intval <= 0 || x->conval->intval > OPM_MaxIndex))) {
|
||||
OPB_err(63);
|
||||
}
|
||||
|
|
@ -2154,7 +2154,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, SHORTINT fctno)
|
|||
case 22: case 23:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (!__IN(f, 0x70)) {
|
||||
} else if (f != 5) {
|
||||
OPB_err(111);
|
||||
} else {
|
||||
if (fctno == 22) {
|
||||
|
|
@ -2186,7 +2186,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, SHORTINT fctno)
|
|||
case 28:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (__IN(f, 0x70)) {
|
||||
} else if (f == 5) {
|
||||
p = NewOp__53(12, 26, p, x);
|
||||
} else {
|
||||
OPB_err(111);
|
||||
|
|
@ -2210,7 +2210,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, SHORTINT fctno)
|
|||
case 30:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (__IN(f, 0x70)) {
|
||||
} else if (f == 5) {
|
||||
p = NewOp__53(19, 30, p, x);
|
||||
} else {
|
||||
OPB_err(111);
|
||||
|
|
@ -2220,16 +2220,16 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, SHORTINT fctno)
|
|||
case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && __IN(f, 0x70))) && x->typ->size < OPT_linttyp->size)) {
|
||||
} else if ((((x->class == 7 && f == 5)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if (!((__IN(x->typ->form, 0x2070) && x->typ->size == (SYSTEM_INT64)OPM_PointerSize))) {
|
||||
} else if (!((__IN(x->typ->form, 0x2020) && x->typ->size == (SYSTEM_INT64)OPM_PointerSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
}
|
||||
p->link = x;
|
||||
break;
|
||||
case 32:
|
||||
if ((__IN(f, 0x70) && x->class == 7)) {
|
||||
if ((f == 5 && x->class == 7)) {
|
||||
if ((0 <= x->conval->intval && x->conval->intval <= 255)) {
|
||||
OPB_BindNodes(28, OPT_notyp, &x, x);
|
||||
x->conval = OPT_NewConst();
|
||||
|
|
@ -2272,7 +2272,7 @@ void OPB_StParN (OPT_Node *par0, OPT_Node x, INTEGER fctno, INTEGER n)
|
|||
OPB_err(126);
|
||||
} else if (p->typ->comp != 3) {
|
||||
OPB_err(64);
|
||||
} else if (__IN(f, 0x70)) {
|
||||
} else if (f == 5) {
|
||||
if ((x->class == 7 && (x->conval->intval <= 0 || x->conval->intval > OPM_MaxIndex))) {
|
||||
OPB_err(63);
|
||||
}
|
||||
|
|
@ -2288,7 +2288,7 @@ void OPB_StParN (OPT_Node *par0, OPT_Node x, INTEGER fctno, INTEGER n)
|
|||
} else if ((fctno == 31 && n == 2)) {
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (__IN(f, 0x70)) {
|
||||
} else if (f == 5) {
|
||||
node = OPT_NewNode(19);
|
||||
node->subcl = 31;
|
||||
node->right = p;
|
||||
|
|
@ -2376,7 +2376,7 @@ static void OPB_DynArrParCheck (OPT_Struct ftyp, OPT_Struct atyp, BOOLEAN fvarpa
|
|||
ftyp = ftyp->BaseTyp;
|
||||
atyp = atyp->BaseTyp;
|
||||
if ((fvarpar && ftyp == OPT_bytetyp)) {
|
||||
if (!__IN(f, 0x0c) || !((__IN(atyp->form, 0x7e) && atyp->size == 1))) {
|
||||
if (!__IN(f, 0x0c) || !((__IN(atyp->form, 0x2e) && atyp->size == 1))) {
|
||||
if (__IN(18, OPM_opt)) {
|
||||
OPB_err(-301);
|
||||
}
|
||||
|
|
@ -2459,7 +2459,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp)
|
|||
OPB_err(111);
|
||||
}
|
||||
} else if ((fp->typ == OPT_sysptrtyp && ap->typ->form == 13)) {
|
||||
} else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x7e) && ap->typ->size == 1)))))) {
|
||||
} else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x2e) && ap->typ->size == 1)))))) {
|
||||
OPB_err(123);
|
||||
} else if ((fp->typ->form == 13 && ap->class == 5)) {
|
||||
OPB_err(123);
|
||||
|
|
|
|||
|
|
@ -1879,7 +1879,7 @@ void OPC_Case (LONGINT caseVal, INTEGER form)
|
|||
case 3:
|
||||
OPC_CharacterLiteral(caseVal);
|
||||
break;
|
||||
case 4: case 5: case 6:
|
||||
case 5:
|
||||
OPM_WriteInt(caseVal);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -1977,7 +1977,7 @@ void OPC_Constant (OPT_Const con, INTEGER form)
|
|||
case 3:
|
||||
OPC_CharacterLiteral(con->intval);
|
||||
break;
|
||||
case 4: case 5: case 6:
|
||||
case 5:
|
||||
OPM_WriteInt(con->intval);
|
||||
break;
|
||||
case 7:
|
||||
|
|
|
|||
|
|
@ -533,12 +533,12 @@ void OPM_err (INTEGER n)
|
|||
|
||||
void OPM_FPrint (LONGINT *fp, LONGINT val)
|
||||
{
|
||||
*fp = __ROTL((LONGINT)(__VAL(SET, *fp) ^ __VAL(SET, val)), 1, LONGINT);
|
||||
*fp = __ROTL((LONGINT)((SET)*fp ^ (SET)val), 1, LONGINT);
|
||||
}
|
||||
|
||||
void OPM_FPrintSet (LONGINT *fp, SET set)
|
||||
{
|
||||
OPM_FPrint(&*fp, __VAL(LONGINT, set));
|
||||
OPM_FPrint(&*fp, (LONGINT)set);
|
||||
}
|
||||
|
||||
void OPM_FPrintReal (LONGINT *fp, REAL real)
|
||||
|
|
@ -752,7 +752,7 @@ void OPM_SymWInt (LONGINT i)
|
|||
|
||||
void OPM_SymWSet (SET s)
|
||||
{
|
||||
Files_WriteNum(&OPM_newSF, Files_Rider__typ, __VAL(LONGINT, s));
|
||||
Files_WriteNum(&OPM_newSF, Files_Rider__typ, (LONGINT)s);
|
||||
}
|
||||
|
||||
void OPM_SymWReal (REAL r)
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ static void OPP_CheckSysFlag (INTEGER *sysflag, INTEGER default_)
|
|||
OPP_err(135);
|
||||
}
|
||||
OPP_ConstExpression(&x);
|
||||
if (__IN(x->typ->form, 0x70)) {
|
||||
if (x->typ->form == 5) {
|
||||
sf = x->conval->intval;
|
||||
if (sf < 0 || sf > 1) {
|
||||
OPP_err(220);
|
||||
|
|
@ -269,7 +269,7 @@ static void OPP_ArrayType (OPT_Struct *typ, OPT_Struct *banned)
|
|||
*typ = OPT_NewStr(15, 2);
|
||||
(*typ)->sysflag = sysflag;
|
||||
OPP_ConstExpression(&x);
|
||||
if (__IN(x->typ->form, 0x70)) {
|
||||
if (x->typ->form == 5) {
|
||||
n = x->conval->intval;
|
||||
if (n <= 0 || n > OPM_MaxIndex) {
|
||||
OPP_err(63);
|
||||
|
|
@ -626,7 +626,7 @@ static void OPP_StandProcCall (OPT_Node *x)
|
|||
OPT_Node y = NIL;
|
||||
SHORTINT m;
|
||||
INTEGER n;
|
||||
m = (SYSTEM_INT8)(*x)->obj->adr;
|
||||
m = (SYSTEM_INT8)((SYSTEM_INT32)(*x)->obj->adr);
|
||||
n = 0;
|
||||
if (OPP_sym == 30) {
|
||||
OPS_Get(&OPP_sym);
|
||||
|
|
@ -1174,14 +1174,14 @@ static void OPP_CaseLabelList (OPT_Node *lab, OPT_Struct LabelTyp, INTEGER *n, O
|
|||
for (;;) {
|
||||
OPP_ConstExpression(&x);
|
||||
f = x->typ->form;
|
||||
if (__IN(f, 0x78)) {
|
||||
if (__IN(f, 0x28)) {
|
||||
xval = x->conval->intval;
|
||||
} else {
|
||||
OPP_err(61);
|
||||
xval = 1;
|
||||
}
|
||||
if (__IN(f, 0x70)) {
|
||||
if (!__IN(LabelTyp->form, 0x70) || LabelTyp->size < x->typ->size) {
|
||||
if (f == 5) {
|
||||
if (!(LabelTyp->form == 5) || LabelTyp->size < x->typ->size) {
|
||||
OPP_err(60);
|
||||
}
|
||||
} else if (LabelTyp->form != f) {
|
||||
|
|
@ -1191,7 +1191,7 @@ static void OPP_CaseLabelList (OPT_Node *lab, OPT_Struct LabelTyp, INTEGER *n, O
|
|||
OPS_Get(&OPP_sym);
|
||||
OPP_ConstExpression(&y);
|
||||
yval = y->conval->intval;
|
||||
if ((y->typ->form != f && !((__IN(f, 0x70) && __IN(y->typ->form, 0x70))))) {
|
||||
if ((y->typ->form != f && !((f == 5 && y->typ->form == 5)))) {
|
||||
OPP_err(60);
|
||||
}
|
||||
if (yval < xval) {
|
||||
|
|
@ -1254,7 +1254,7 @@ static void CasePart__31 (OPT_Node *x)
|
|||
*StatSeq__30_s->pos = OPM_errpos;
|
||||
if ((*x)->class == 8 || (*x)->class == 9) {
|
||||
OPP_err(126);
|
||||
} else if (!__IN((*x)->typ->form, 0x78)) {
|
||||
} else if (!__IN((*x)->typ->form, 0x38)) {
|
||||
OPP_err(125);
|
||||
}
|
||||
OPP_CheckSym(25);
|
||||
|
|
@ -1440,7 +1440,7 @@ static void OPP_StatSeq (OPT_Node *stat)
|
|||
OPS_Get(&OPP_sym);
|
||||
if (OPP_sym == 38) {
|
||||
OPP_qualident(&id);
|
||||
if (!__IN(id->typ->form, 0x70)) {
|
||||
if (!(id->typ->form == 5)) {
|
||||
OPP_err(68);
|
||||
}
|
||||
OPP_CheckSym(34);
|
||||
|
|
@ -1472,7 +1472,7 @@ static void OPP_StatSeq (OPT_Node *stat)
|
|||
SetPos__35(z);
|
||||
OPB_Link(&*stat, &last, z);
|
||||
y = OPB_NewLeaf(t);
|
||||
} else if (!__IN(y->typ->form, 0x70) || y->typ->size > x->left->typ->size) {
|
||||
} else if (!(y->typ->form == 5) || y->typ->size > x->left->typ->size) {
|
||||
OPP_err(113);
|
||||
}
|
||||
OPB_Link(&*stat, &last, x);
|
||||
|
|
|
|||
|
|
@ -174,7 +174,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;
|
||||
|
|
@ -650,7 +650,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:
|
||||
|
|
@ -851,7 +851,7 @@ static void OPT_InConstant (LONGINT f, OPT_Const conval)
|
|||
OPM_SymRCh(&ch);
|
||||
conval->intval = ch;
|
||||
break;
|
||||
case 4: case 5: case 6:
|
||||
case 5:
|
||||
conval->intval = OPM_SymRInt();
|
||||
break;
|
||||
case 9:
|
||||
|
|
@ -980,7 +980,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 {
|
||||
|
|
@ -1440,7 +1440,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 {
|
||||
|
|
@ -1538,7 +1538,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;
|
||||
|
|
@ -1877,7 +1877,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);
|
||||
|
|
@ -1905,9 +1905,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;
|
||||
|
|
|
|||
|
|
@ -475,7 +475,7 @@ static void OPV_Entier (OPT_Node n, INTEGER prec)
|
|||
|
||||
static void OPV_SizeCast (LONGINT from, LONGINT to)
|
||||
{
|
||||
if ((from != to && (from > 4 || to > 4))) {
|
||||
if ((from != to && (from > 4 || to != 4))) {
|
||||
switch (to) {
|
||||
case 1:
|
||||
OPM_WriteString((CHAR*)"(SYSTEM_INT8)", 14);
|
||||
|
|
@ -507,7 +507,7 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INTEGER prec)
|
|||
OPM_WriteString((CHAR*)"__SETOF(", 9);
|
||||
OPV_Entier(n, -1);
|
||||
OPM_Write(')');
|
||||
} else if (__IN(to, 0x70)) {
|
||||
} else if (to == 5) {
|
||||
if ((newtype->size < n->typ->size && __IN(2, OPM_opt))) {
|
||||
OPM_WriteString((CHAR*)"__SHORT", 8);
|
||||
if (OPV_SideEffects(n)) {
|
||||
|
|
@ -798,10 +798,10 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp)
|
|||
OPM_WriteString((CHAR*)"(void*)", 8);
|
||||
}
|
||||
} else {
|
||||
if ((__IN(form, 0x0180) && __IN(n->typ->form, 0x70))) {
|
||||
if ((__IN(form, 0x0180) && n->typ->form == 5)) {
|
||||
OPM_WriteString((CHAR*)"(double)", 9);
|
||||
prec = 9;
|
||||
} else if (__IN(form, 0x70)) {
|
||||
} else if (form == 5) {
|
||||
OPV_SizeCast(n->typ->size, typ->size);
|
||||
}
|
||||
}
|
||||
|
|
@ -812,7 +812,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp)
|
|||
}
|
||||
if ((((mode == 2 && n->class == 11)) && n->subcl == 29)) {
|
||||
OPV_expr(n->left, prec);
|
||||
} else if ((__IN(form, 0x70) && n->class == 7)) {
|
||||
} else if ((form == 5 && n->class == 7)) {
|
||||
OPV_ParIntLiteral(n->conval->intval, n->typ->size);
|
||||
} else {
|
||||
OPV_expr(n, prec);
|
||||
|
|
@ -966,7 +966,7 @@ static void OPV_expr (OPT_Node n, INTEGER prec)
|
|||
}
|
||||
break;
|
||||
case 29:
|
||||
if (!__IN(l->class, 0x17) || (((__IN(n->typ->form, 0x6240) && __IN(l->typ->form, 0x6240))) && n->typ->size == l->typ->size)) {
|
||||
if (!__IN(l->class, 0x17) || (((__IN(n->typ->form, 0x6220) && __IN(l->typ->form, 0x6220))) && n->typ->size == l->typ->size)) {
|
||||
OPM_Write('(');
|
||||
OPC_Ident(n->typ->strobj);
|
||||
OPM_Write(')');
|
||||
|
|
@ -1116,7 +1116,7 @@ static void OPV_expr (OPT_Node n, INTEGER prec)
|
|||
OPM_WriteString((CHAR*)" ^ ", 4);
|
||||
} else {
|
||||
OPM_WriteString((CHAR*)" / ", 4);
|
||||
if (r->obj == NIL || __IN(r->obj->typ->form, 0x70)) {
|
||||
if (r->obj == NIL || r->obj->typ->form == 5) {
|
||||
OPM_Write('(');
|
||||
OPC_Ident(n->typ->strobj);
|
||||
OPM_Write(')');
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ void Platform_Init (INTEGER argc, LONGINT argvadr)
|
|||
Platform_ArgVecPtr av = NIL;
|
||||
Platform_MainStackFrame = argvadr;
|
||||
Platform_ArgCount = argc;
|
||||
av = __VAL(Platform_ArgVecPtr, argvadr);
|
||||
av = (Platform_ArgVecPtr)(SYSTEM_ADRINT)argvadr;
|
||||
Platform_ArgVector = (*av)[0];
|
||||
Platform_HaltCode = -128;
|
||||
Platform_HeapInitHeap();
|
||||
|
|
@ -263,7 +263,7 @@ void Platform_GetArg (INTEGER n, CHAR *val, LONGINT val__len)
|
|||
{
|
||||
Platform_ArgVec av = NIL;
|
||||
if (n < Platform_ArgCount) {
|
||||
av = __VAL(Platform_ArgVec, Platform_ArgVector);
|
||||
av = (Platform_ArgVec)(SYSTEM_ADRINT)Platform_ArgVector;
|
||||
__COPY(*(*av)[__X(n, 1024)], val, val__len);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue