UM #303: integer handling

This commit is contained in:
Vítor Santos Costa 2015-02-09 10:15:11 +00:00
parent 88e3d637ec
commit 8dcdb6ce09
2 changed files with 69 additions and 62 deletions

View File

@ -126,9 +126,10 @@ p_integer( USES_REGS1 )
switch ((CELL)f0) {
case (CELL)FunctorBigInt:
{ CELL *pt = RepAppl(d0);
if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) {
if ( pt[1] != BIG_INT ) {
return FALSE;
}
return TRUE;
}
case (CELL)FunctorLongInt:
return(TRUE);
@ -174,6 +175,7 @@ p_number( USES_REGS1 )
if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) {
return FALSE;
}
return(TRUE);
}
case (CELL)FunctorLongInt:
case (CELL)FunctorDouble:

View File

@ -114,11 +114,13 @@
switch ((CELL)f0) {
case (CELL)FunctorBigInt:
{ CELL *pt = RepAppl(d0);
if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) {
if ( pt[1] != BIG_INT ) {
PREG = PREG->y_u.xl.F;
GONext();
}
}
PREG = NEXTOP(PREG, xl);
GONext();
break;
case (CELL)FunctorLongInt:
PREG = NEXTOP(PREG, xl);
@ -159,14 +161,18 @@
switch ((CELL)f0) {
case (CELL)FunctorBigInt:
{ CELL *pt = RepAppl(d0);
if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) {
if ( pt[1] != BIG_INT ) {
PREG = PREG->y_u.yl.F;
GONext();
}
}
PREG = NEXTOP(PREG, yl);
GONext();
break;
case (CELL)FunctorLongInt:
PREG = NEXTOP(PREG, yl);
GONext();
break;
default:
PREG = PREG->y_u.yl.F;
GONext();
@ -543,4 +549,3 @@
ENDP(pt0);
ENDD(d0);
ENDOp();