make arg/3 compatible with SWI for atomic argument (fail silently).
This commit is contained in:
parent
6183ff0282
commit
834e3ed5d0
38
C/absmi.c
38
C/absmi.c
@ -7553,7 +7553,7 @@ Yap_absmi(int inp)
|
|||||||
FAIL();
|
FAIL();
|
||||||
}
|
}
|
||||||
/* in case we call Execute */
|
/* in case we call Execute */
|
||||||
YREG = ENV;
|
YREG = YENV = ENV;
|
||||||
JMPNext();
|
JMPNext();
|
||||||
ENDBOp();
|
ENDBOp();
|
||||||
|
|
||||||
@ -12155,9 +12155,12 @@ Yap_absmi(int inp)
|
|||||||
ENDP(pt0);
|
ENDP(pt0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
saveregs();
|
/*
|
||||||
Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3");
|
don't complain here for SWI Prolog compatibility
|
||||||
setregs();
|
saveregs();
|
||||||
|
Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3");
|
||||||
|
setregs();
|
||||||
|
*/
|
||||||
FAIL();
|
FAIL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12243,9 +12246,12 @@ Yap_absmi(int inp)
|
|||||||
ENDP(pt0);
|
ENDP(pt0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
saveregs();
|
/*
|
||||||
Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3");
|
keep SWI Prolog compatibility, just fail on trying to obtain an argument of a compound term.
|
||||||
setregs();
|
saveregs();
|
||||||
|
Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3");
|
||||||
|
setregs();
|
||||||
|
*/
|
||||||
FAIL();
|
FAIL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12350,9 +12356,12 @@ Yap_absmi(int inp)
|
|||||||
ENDP(pt0);
|
ENDP(pt0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
saveregs();
|
/*
|
||||||
Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3");
|
don't complain here for SWI Prolog compatibility
|
||||||
setregs();
|
saveregs();
|
||||||
|
Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3");
|
||||||
|
setregs();
|
||||||
|
*/
|
||||||
FAIL();
|
FAIL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12453,9 +12462,12 @@ Yap_absmi(int inp)
|
|||||||
ENDP(pt0);
|
ENDP(pt0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
saveregs();
|
/*
|
||||||
Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3");
|
don't complain here for SWI Prolog compatibility
|
||||||
setregs();
|
saveregs();
|
||||||
|
Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3");
|
||||||
|
setregs();
|
||||||
|
*/
|
||||||
FAIL();
|
FAIL();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user