Change to simpler Eval mechanism

- avoid duplicate code
- implement different optimised code.
This commit is contained in:
Vítor Santos Costa
2008-12-04 23:33:32 +00:00
parent 13dd600f88
commit e737599dc4
14 changed files with 2563 additions and 5521 deletions

View File

@@ -2996,10 +2996,10 @@ p_flags(void)
UNLOCK(pe->PELock);
return (TRUE);
} else if (!IsIntegerTerm(ARG4)) {
union arith_ret v;
Term te = Yap_Eval(ARG4);
if (Yap_Eval(ARG4, &v) == long_int_e) {
newFl = v.Int;
if (IsIntegerTerm(te)) {
newFl = IntegerOfTerm(te);
} else {
UNLOCK(pe->PELock);
Yap_Error(TYPE_ERROR_INTEGER, ARG4, "flags");