>Code should be initialised in recordp and record_stat_p
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@770 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
b37ee94fe9
commit
4d4516f848
@ -1631,7 +1631,7 @@ record(int Flag, Term key, Term t_data, Term t_code)
|
||||
x->Prev = p->Last;
|
||||
p->Last = x;
|
||||
}
|
||||
if (Flag & WithRef) {
|
||||
if (Flag & MkCode) {
|
||||
x->Code = (yamop *) IntegerOfTerm(t_code);
|
||||
}
|
||||
WRITE_UNLOCK(p->DBRWLock);
|
||||
@ -3804,7 +3804,8 @@ PrepareToEraseClause(Clause *clau, DBRef dbr)
|
||||
WRITE_LOCK(pred->PRWLock);
|
||||
/* got my pred entry, let's have some fun! */
|
||||
clau_code = clau->ClCode;
|
||||
if (pred->cs.p_code.FirstClause == pred->cs.p_code.LastClause) {
|
||||
if (pred->cs.p_code.FirstClause == pred->cs.p_code.LastClause &&
|
||||
pred->cs.p_code.FirstClause != NULL) {
|
||||
#ifdef DEBUG
|
||||
if (pred->cs.p_code.FirstClause != clau_code) {
|
||||
/* sanity check */
|
||||
@ -3819,7 +3820,7 @@ PrepareToEraseClause(Clause *clau, DBRef dbr)
|
||||
#endif
|
||||
/* nothing left here, let's clean the shop */
|
||||
Yap_FreeCodeSpace(((char *) ClauseCodeToClause(pred->CodeOfPred)));
|
||||
pred->cs.p_code.LastClause = pred->cs.p_code.FirstClause = NIL;
|
||||
pred->cs.p_code.LastClause = pred->cs.p_code.FirstClause = NULL;
|
||||
pred->OpcodeOfPred = FAIL_OPCODE;
|
||||
pred->cs.p_code.TrueCodeOfPred = pred->CodeOfPred =
|
||||
(yamop *)(&(pred->OpcodeOfPred));
|
||||
|
@ -113,8 +113,8 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
|
||||
vsc_count++;
|
||||
/* return;*/
|
||||
#ifdef COMMENTED
|
||||
if (vsc_count < 414040LL) return;
|
||||
if (vsc_count == 414140LL) {
|
||||
if (vsc_count < 124840LL) return;
|
||||
if (vsc_count == 124881LL) {
|
||||
printf("Here I go\n");
|
||||
}
|
||||
if (vsc_count > 500000) exit(0);
|
||||
|
Reference in New Issue
Block a user