From 59e0f71a7dbd2a04d7c075602b2fbea99df85d7f Mon Sep 17 00:00:00 2001 From: Costa Vitor Date: Fri, 24 Jul 2009 15:07:39 -0500 Subject: [PATCH 1/2] trust_fail needs not to mark environments, but in contrast termination needs. --- C/heapgc.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/C/heapgc.c b/C/heapgc.c index 551fa2e2f..8ed8d0b49 100644 --- a/C/heapgc.c +++ b/C/heapgc.c @@ -1971,13 +1971,10 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose) mark_environments((CELL_PTR) gc_B->cp_env, EnvSizeInCells, NULL); - else -#ifdef TABLING - if (opnum != _table_completion) -#endif /* TABLING */ - mark_environments((CELL_PTR) gc_B->cp_env, - EnvSize((yamop *) (gc_B->cp_cp)), - EnvBMap((yamop *) (gc_B->cp_cp))); + else if (opnum != _trust_fail) + mark_environments((CELL_PTR) gc_B->cp_env, + EnvSize((yamop *) (gc_B->cp_cp)), + EnvBMap((yamop *) (gc_B->cp_cp))); /* extended choice point */ restart_cp: switch (opnum) { @@ -2854,9 +2851,6 @@ sweep_choicepoints(choiceptr gc_B) } else return; case _trust_fail: - sweep_environments(gc_B->cp_env, - EnvSizeInCells, - NULL); break; case _or_else: case _or_last: From 93c6e65b7ede473df93889a41edad72adb840571 Mon Sep 17 00:00:00 2001 From: Costa Vitor Date: Fri, 24 Jul 2009 15:08:07 -0500 Subject: [PATCH 2/2] tabling would set ap=NULL on producers and SLD nodes. Set SLD trusted nodes to TRUST_FAIL. --- H/absmi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/H/absmi.h b/H/absmi.h index 3a1bbb1a9..8acd482d7 100644 --- a/H/absmi.h +++ b/H/absmi.h @@ -881,7 +881,7 @@ Macros to check the limits of stacks #endif #ifdef TABLING -#define TABLING_close_alt(CPTR) (CPTR)->cp_ap = NULL +#define TABLING_close_alt(CPTR) (CPTR)->cp_ap = TRUSTFAILCODE #else #define TABLING_close_alt(CPTR) #endif /* TABLING */