iimprove SWI compat

This commit is contained in:
Vítor Santos Costa
2011-03-15 23:49:28 +00:00
parent 8421af32e8
commit 36a0023fbf
22 changed files with 80 additions and 3139 deletions

View File

@@ -5,7 +5,6 @@
:- module(system, [concat_atom/2,
concat_atom/3,
setenv/2,
read_clause/1,
string/1,
chdir/1,
@@ -154,8 +153,6 @@ concat_atom(List, New) :-
atomic_concat(List, New).
setenv(X,Y) :- unix(putenv(X,Y)).
read_clause(X,Y) :-
read_term(X,Y,[singetons(warning)]).

View File

@@ -2621,25 +2621,15 @@ PL_eval_expression_to_int64_ex(term_t t, int64_t *val)
}
foreign_t
_PL_retry(intptr_t n)
_PL_retry(intptr_t v)
{
CACHE_REGS
/* first we need to get the pointer to the predicate */
PredEntry *pe = B->cp_ap->u.OtapFs.p;
struct foreign_context *ctx = (struct foreign_context *)(&EXTRA_CBACK_ARG(pe->ArityOfPE,1));
ctx->context = n;
return LCL0-(CELL *)ctx;
return (((uintptr_t)(v)<<FRG_REDO_BITS)|REDO_INT);
}
foreign_t
_PL_retry_address(void *addr)
{
CACHE_REGS
/* first we need to get the pointer to the predicate */
PredEntry *pe = B->cp_ap->u.OtapFs.p;
struct foreign_context *ctx = (struct foreign_context *)(&EXTRA_CBACK_ARG(pe->ArityOfPE,1));
ctx->context = (intptr_t)addr;
return LCL0-(CELL *)ctx;
return (((uintptr_t)(addr))|REDO_PTR);
}