make YAP compile with --enable-or-parallelism
This commit is contained in:
parent
80b97aafaa
commit
f877e78785
@ -2238,7 +2238,7 @@ addclause(Term t, yamop *cp, int mode, Term mod, Term *t4ref)
|
||||
}
|
||||
UNLOCK(p->PELock);
|
||||
if (pflags & LogUpdatePredFlag) {
|
||||
LogUpdClause *cl = (DBRef)ClauseCodeToLogUpdClause(cp);
|
||||
LogUpdClause *cl = (LogUpdClause *)ClauseCodeToLogUpdClause(cp);
|
||||
tf = MkDBRefTerm((DBRef)cl);
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
TRAIL_CLREF(cl); /* So that fail will erase it */
|
||||
|
@ -1,5 +1,9 @@
|
||||
#include "Yap.h"
|
||||
#include "clause.h"
|
||||
#include "tracer.h"
|
||||
#ifdef YAPOR
|
||||
#include "or.macros.h"
|
||||
#endif /* YAPOR */
|
||||
#include "clause_list.h"
|
||||
|
||||
/* need to fix overflow handling */
|
||||
|
25
C/index.c
25
C/index.c
@ -995,16 +995,12 @@ has_cut(yamop *pc)
|
||||
break;
|
||||
case _execute:
|
||||
case _dexecute:
|
||||
case _p_execute_cpred:
|
||||
case _execute_cpred:
|
||||
pc = NEXTOP(pc,pp);
|
||||
break;
|
||||
case _native_me:
|
||||
pc = NEXTOP(pc,aFlp);
|
||||
break;
|
||||
case _dexecute:
|
||||
case _p_execute_cpred:
|
||||
pc = NEXTOP(pc,pp);
|
||||
break;
|
||||
/* instructions type l */
|
||||
case _enter_profiling:
|
||||
case _count_call:
|
||||
@ -1056,8 +1052,6 @@ has_cut(yamop *pc)
|
||||
case _p_equal:
|
||||
case _p_functor:
|
||||
case _p_execute_tail:
|
||||
case _enter_a_profiling:
|
||||
case _count_a_call:
|
||||
case _index_dbref:
|
||||
case _index_blob:
|
||||
case _index_long:
|
||||
@ -1171,12 +1165,14 @@ has_cut(yamop *pc)
|
||||
break;
|
||||
/* instructions type sbpp */
|
||||
case _p_execute:
|
||||
pc = NEXTOP(pc,Osbmp);
|
||||
break;
|
||||
case _p_execute2:
|
||||
case _fcall:
|
||||
case _call:
|
||||
case _call_cpred:
|
||||
case _call_usercpred:
|
||||
pc = NEXTOP(pc,sbpp);
|
||||
pc = NEXTOP(pc,Osbpp);
|
||||
break;
|
||||
/* instructions type sblp */
|
||||
#ifdef YAPOR
|
||||
@ -1184,7 +1180,7 @@ has_cut(yamop *pc)
|
||||
#endif /* YAPOR */
|
||||
case _either:
|
||||
case _or_else:
|
||||
pc = NEXTOP(pc,sblp);
|
||||
pc = NEXTOP(pc,Osblp);
|
||||
break;
|
||||
/* instructions type xx */
|
||||
case _get_x_var:
|
||||
@ -1387,7 +1383,7 @@ has_cut(yamop *pc)
|
||||
/* instructions type f */
|
||||
case _write_struct:
|
||||
case _write_l_struc:
|
||||
pc = NEXTOP(pc,f);
|
||||
pc = NEXTOP(pc,fa);
|
||||
break;
|
||||
/* instructions type slp */
|
||||
case _call_c_wfail:
|
||||
@ -1396,7 +1392,7 @@ has_cut(yamop *pc)
|
||||
/* instructions type lds */
|
||||
case _try_c:
|
||||
case _try_userc:
|
||||
pc = NEXTOP(pc,lds);
|
||||
pc = NEXTOP(pc,OtapFs);
|
||||
break;
|
||||
/* instructions type OtaLl,OtILl */
|
||||
case _try_logical:
|
||||
@ -1412,7 +1408,7 @@ has_cut(yamop *pc)
|
||||
break;
|
||||
case _retry_c:
|
||||
case _retry_userc:
|
||||
pc = NEXTOP(pc,lds);
|
||||
pc = NEXTOP(pc,OtapFs);
|
||||
break;
|
||||
/* instructions type llll */
|
||||
case _switch_on_type:
|
||||
@ -1492,6 +1488,11 @@ has_cut(yamop *pc)
|
||||
pc = NEXTOP(pc,yxx);
|
||||
break;
|
||||
/* instructions type yyx */
|
||||
case _get_yy_var:
|
||||
case _put_y_vals:
|
||||
pc = NEXTOP(pc,yyxx);
|
||||
break;
|
||||
/* instructions type yyx */
|
||||
case _p_func2f_yy:
|
||||
pc = NEXTOP(pc,yyx);
|
||||
break;
|
||||
|
@ -673,7 +673,7 @@
|
||||
/* this instruction is hardwired */
|
||||
case _or_last:
|
||||
#ifdef YAPOR
|
||||
pp = pc->u.Osblp.p;
|
||||
pp = pc->u.Osblp.p0;
|
||||
if (pp->PredFlags & MegaClausePredFlag)
|
||||
return found_mega_clause(pp, startp, endp);
|
||||
clause_code = TRUE;
|
||||
|
@ -368,7 +368,7 @@ Int p_parallel_new_answer(void) {
|
||||
|
||||
length_answer = 0;
|
||||
ALLOC_QG_ANSWER_FRAME(actual_answer);
|
||||
Yap_plwrite(ARG1, parallel_new_answer_putchar, 4);
|
||||
Yap_plwrite(ARG1, parallel_new_answer_putchar, 4, 1200);
|
||||
AnsFr_answer(actual_answer)[length_answer] = 0;
|
||||
AnsFr_next(actual_answer) = NULL;
|
||||
leftmost_or_fr = CUT_leftmost_or_frame();
|
||||
|
@ -674,7 +674,7 @@ footer_walk_clause(W) :-
|
||||
format(W,' /* this instruction is hardwired */~n',[]),
|
||||
dump_ops(W,["or_last"]),
|
||||
format(W,'#ifdef YAPOR~n',[]),
|
||||
add_pp(W,"Osblp","p"),
|
||||
add_pp(W,"Osblp","p0"),
|
||||
format(W,'#else~n',[]),
|
||||
add_pp(W,"p","p"),
|
||||
format(W,'#endif~n',[]),
|
||||
|
Reference in New Issue
Block a user