patch for OPTYap from João Silva
This commit is contained in:
parent
ce6bc98f30
commit
6c7e5e3cd2
@ -1091,7 +1091,7 @@ interrupt_dexecute( USES_REGS1 )
|
||||
{
|
||||
choiceptr top_b = PROTECT_FROZEN_B(B);
|
||||
#ifdef YAPOR_SBA
|
||||
if (YENV > (CELL *) top_b || YENV < H) YENV = (CELL *) top_b;
|
||||
if (YENV > (CELL *) top_b || YENV < HR) YENV = (CELL *) top_b;
|
||||
#else
|
||||
if (YENV > (CELL *) top_b) YENV = (CELL *) top_b;
|
||||
#endif /* YAPOR_SBA */
|
||||
@ -1295,7 +1295,7 @@ Yap_absmi(int inp)
|
||||
ops_done++;
|
||||
/* if (B->cp_b > 0x103fff90)
|
||||
fprintf(stderr,"(%ld) doing %s, done %s, B is %p, HB is %p, H is %p\n",
|
||||
ops_done,Yap_op_names[opcode],Yap_op_names[old_op],B,B->cp_h,H);*/
|
||||
ops_done,Yap_op_names[opcode],Yap_op_names[old_op],B,B->cp_h,HR);*/
|
||||
#endif
|
||||
#endif /* ANALYST */
|
||||
|
||||
|
@ -1233,7 +1233,9 @@ p_close_static_array( USES_REGS1 )
|
||||
if (val) {
|
||||
#endif
|
||||
return(val);
|
||||
#if USE_SYSTEM_MALLOC
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Yap_FreeAtomSpace((char *)(ptr->ValueOfVE.ints));
|
||||
ptr->ValueOfVE.ints = NULL;
|
||||
|
@ -128,7 +128,7 @@
|
||||
} else if (IsPairTerm(d1)) {
|
||||
CELL *pt = RepPair(d1);
|
||||
|
||||
if (IN_BETWEEN(H0,pt,H) && IsAttVar(pt)) {
|
||||
if (IN_BETWEEN(H0,pt,HR) && IsAttVar(pt)) {
|
||||
CELL val = Deref(*pt);
|
||||
if (IsVarTerm(val)) {
|
||||
Bind(VarOfTerm(val), MkAtomTerm(AtomCut));
|
||||
|
@ -58,7 +58,7 @@ static void share_private_nodes(int worker_q);
|
||||
#else
|
||||
#define COMPUTE_SEGMENTS_TO_COPY_TO(Q) \
|
||||
REMOTE_start_global_copy(Q) = (CELL) (H0); \
|
||||
REMOTE_end_global_copy(Q) = (CELL) (H); \
|
||||
REMOTE_end_global_copy(Q) = (CELL) (HR); \
|
||||
REMOTE_start_local_copy(Q) = (CELL) (B); \
|
||||
REMOTE_end_local_copy(Q) = (CELL) (GLOBAL_root_cp); \
|
||||
REMOTE_start_trail_copy(Q) = (CELL) (GLOBAL_root_cp->cp_tr); \
|
||||
@ -311,7 +311,7 @@ sync_with_p:
|
||||
/* install fase --> TR and LOCAL_top_cp->cp_tr are equal */
|
||||
aux_tr = ((choiceptr) LOCAL_start_local_copy)->cp_tr;
|
||||
TR = ((choiceptr) LOCAL_end_local_copy)->cp_tr;
|
||||
Yap_NEW_MAHASH((ma_h_inner_struct *)H);
|
||||
Yap_NEW_MAHASH((ma_h_inner_struct *)HR);
|
||||
while (TR != aux_tr) {
|
||||
aux_cell = TrailTerm(--aux_tr);
|
||||
if (IsVarTerm(aux_cell)) {
|
||||
|
@ -158,7 +158,7 @@ static inline qg_sol_fr_ptr CUT_prune_solution_frames(qg_sol_fr_ptr, int);
|
||||
SCH_check_share_request()
|
||||
|
||||
#define SCH_last_alternative(curpc, CP_PTR) \
|
||||
H = HBREG = PROTECT_FROZEN_H(CP_PTR); \
|
||||
HR = HBREG = PROTECT_FROZEN_H(CP_PTR); \
|
||||
CPREG = CP_PTR->cp_cp; \
|
||||
ENV = CP_PTR->cp_env; \
|
||||
SCH_new_alternative(curpc, NULL)
|
||||
|
@ -183,7 +183,7 @@ int q_share_work(int worker_p) {
|
||||
/* install fase --> TR and LOCAL_top_cp->cp_tr are equal */
|
||||
TR = ((choiceptr)LOCAL_end_local_copy)->cp_tr;
|
||||
aux_tr = ((choiceptr) LOCAL_start_local_copy)->cp_tr;
|
||||
NEW_MAHASH((ma_h_inner_struct *)H);
|
||||
NEW_MAHASH((ma_h_inner_struct *)HR);
|
||||
while (TR != aux_tr) {
|
||||
aux_cell = TrailTerm(--aux_tr);
|
||||
if (IsVarTerm(aux_cell)) {
|
||||
|
Reference in New Issue
Block a user