From ac19e411a222aeb63990e31381d9b91205cf53f9 Mon Sep 17 00:00:00 2001 From: vsc Date: Mon, 15 Sep 2003 17:56:27 +0000 Subject: [PATCH] more fixes git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@869 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/dbase.c | 2 +- C/index.c | 19 ++++++++----------- C/tracer.c | 5 ++++- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/C/dbase.c b/C/dbase.c index 8868451f1..8a0c839dd 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -1766,7 +1766,7 @@ record_lu(PredEntry *pe, Term t, int position) cl->Id = FunctorDBRef; cl->ClFlags = LogUpdMask; cl->ClSource = x; - cl->Owner = Yap_ConsultingFile(); + cl->Owner = AtomUser; cl->ClRefCount = 0; cl->ClPred = pe; cl->ClExt = NULL; diff --git a/C/index.c b/C/index.c index 4ae291b2a..8e71b12f7 100644 --- a/C/index.c +++ b/C/index.c @@ -4883,8 +4883,8 @@ inserta_in_lu_block(LogUpdIndex *blk, PredEntry *ap, yamop *code) } /* ok, we are in a sequence of try-retry-trust instructions, or something similar */ - here = next = NEXTOP(blk->ClCode, Ill); - start = blk->ClCode->u.Ill.l1; + here = next = blk->ClCode->u.Ill.l1; + start = NEXTOP(blk->ClCode,Ill); here = PREVOP(here, ld); /* follow profiling and counting instructions */ if (ap->PredFlags & ProfiledPredFlag) { @@ -4897,19 +4897,16 @@ inserta_in_lu_block(LogUpdIndex *blk, PredEntry *ap, yamop *code) } if (here >= start) { /* we got space to put something in */ - op_numbers sop = Yap_op_from_opcode(start->opc); + op_numbers sop = Yap_op_from_opcode(next->opc); if (sop != _retry_killed) { next->opc = Yap_opcode(_retry); } - start->u.Ill.l1 = here; - start->u.Ill.s++; - if (sop == _retry_killed) - here->opc = Yap_opcode(_try_clause); - else - here->opc = Yap_opcode(sop); + blk->ClCode->u.Ill.l1 = here; + blk->ClCode->u.Ill.s++; + here->opc = Yap_opcode(_try_clause); here->u.ld.s = next->u.ld.s; here->u.ld.p = ap; - here->u.ld.d = next->u.ld.d; + here->u.ld.d = code; #ifdef YAPOR /* FIX ME */ here->u.ld.or_arg = next->u.ld.or_arg; @@ -4927,7 +4924,7 @@ inserta_in_lu_block(LogUpdIndex *blk, PredEntry *ap, yamop *code) here->opc = Yap_opcode(_retry_profiled); here->u.p.p = ap; } - return start; + return blk->ClCode; } else { return replace_lu_block(blk, RECORDA, ap, code, has_cut(code)); } diff --git a/C/tracer.c b/C/tracer.c index b235cc702..62064db07 100644 --- a/C/tracer.c +++ b/C/tracer.c @@ -113,8 +113,11 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args) /* extern int gc_calls; */ vsc_count++; - return; #ifdef COMMENTED + if (vsc_count < 123536430LL) { + if (vsc_count == 123536441LL) vsc_xstop = 1; + return; + } if (vsc_count < 5530257LL) { return; }