fix overflow fixes

This commit is contained in:
Vítor Santos de Costa 2008-10-08 13:15:09 +01:00
parent 444fc8fb7f
commit aef5725901
2 changed files with 8 additions and 9 deletions

View File

@ -714,7 +714,7 @@ Yap_NewThreadPred(PredEntry *ap)
PredEntry *p = (PredEntry *) Yap_AllocAtomSpace(sizeof(*p));
if (p == NULL) {
return NULL;
return NIL;
}
INIT_LOCK(p->PELock);
p->KindOfPE = PEProp;
@ -762,11 +762,13 @@ Yap_NewPredPropByAtom(AtomEntry *ae, Term cur_mod)
{
Prop p0;
PredEntry *p = (PredEntry *) Yap_AllocAtomSpace(sizeof(*p));
if (!p)
return NIL;
/* Printf("entering %s:%s/0\n", RepAtom(AtomOfTerm(cur_mod))->StrOfAE, ae->StrOfAE); */
if (p == NULL) {
WRITE_UNLOCK(ae->ARWLock);
return NIL;
}
INIT_LOCK(p->PELock);
p->KindOfPE = PEProp;
p->ArityOfPE = 0;

View File

@ -1344,18 +1344,16 @@ a_p(op_numbers opcode, clause_info *clinfo, yamop *code_p, int pass_no, struct i
GONEXT(Osbpp);
}
else if (opcode == _execute ||
opcode == _dexecute) {
opcode == _dexecute) {
if (pass_no) {
if (opcode == _execute &&
(RepPredProp(fe)->PredFlags & CPredFlag)) {
if (Flags & CPredFlag) {
code_p->opc = emit_op(_execute_cpred);
}
code_p->u.pp.p = RepPredProp(fe);
code_p->u.pp.p0 = clinfo->CurrentPred;
}
GONEXT(pp);
}
else {
} else {
if (pass_no)
code_p->u.p.p = RepPredProp(fe);
GONEXT(p);
@ -2900,7 +2898,6 @@ do_pass(int pass_no, yamop **entry_codep, int assembling, int *clause_has_blobsp
}
}
while (cip->cpc) {
switch ((int) cip->cpc->op) {
#ifdef YAPOR
case sync_op: