fixes to support threads and assert correctly, even if inefficiently.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2030 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2007-11-26 23:43:10 +00:00
parent 5941606d19
commit 3beda27d14
32 changed files with 813 additions and 860 deletions

View File

@@ -11,8 +11,11 @@
* File: amasm.c *
* comments: abstract machine assembler *
* *
* Last rev: $Date: 2007-11-07 09:25:27 $ *
* Last rev: $Date: 2007-11-26 23:43:07 $ *
* $Log: not supported by cvs2svn $
* Revision 1.97 2007/11/07 09:25:27 vsc
* speedup meta-calls
*
* Revision 1.96 2007/11/06 17:02:09 vsc
* compile ground terms away.
*
@@ -481,6 +484,9 @@ a_cle(op_numbers opcode, yamop *code_p, int pass_no, struct intermediates *cip)
code_p->u.EC.ClENV = 0;
code_p->u.EC.ClRefs = 0;
code_p->u.EC.ClBase = cl;
#if defined(THREADS) || defined(YAPOR)
code_p->u.EC.p = cip->CurrentPred;
#endif
cl->ClExt = code_p;
cl->ClFlags |= LogUpdRuleMask;
}
@@ -2821,16 +2827,6 @@ do_pass(int pass_no, yamop **entry_codep, int assembling, int *clause_has_blobsp
}
code_p = cl_u->lui.ClCode;
*entry_codep = code_p;
#if defined(YAPOR) || defined(THREADS)
if (assembling == ASSEMBLING_INDEX &&
!(cip->CurrentPred->PredFlags & ThreadLocalPredFlag)) {
if (pass_no) {
code_p->opc = opcode(_lock_lu);
code_p->u.p.p = cip->CurrentPred;
}
GONEXT(p);
}
#endif
} else {
if (pass_no) {
cl_u->si.ClSize = size;
@@ -3114,7 +3110,7 @@ do_pass(int pass_no, yamop **entry_codep, int assembling, int *clause_has_blobsp
else
if (cip->CurrentPred->PredFlags & LogUpdatePredFlag &&
!(cip->CurrentPred->PredFlags & ThreadLocalPredFlag))
code_p = a_e(_unlock_lu, code_p, pass_no);
code_p = a_e(_unlock_lu, code_p, pass_no);
#endif
code_p = a_pl(_procceed, cip->CurrentPred, code_p, pass_no);
#ifdef YAPOR