win32 patches

This commit is contained in:
U-w7\vsc
2013-11-15 18:25:33 +00:00
parent bb650629d9
commit 9c5d7af938
12 changed files with 233 additions and 231 deletions

View File

@@ -2015,7 +2015,7 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose
#endif /* TABLING */
if (very_verbose) {
PredEntry *pe = Yap_PredForChoicePt(gc_B);
#if defined(ANALYST) || defined(DEBUG)
#if defined(ANALYST) || DEBUG
if (pe == NULL) {
fprintf(GLOBAL_stderr,"%% marked " UInt_FORMAT " (%s)\n", LOCAL_total_marked, Yap_op_names[opnum]);
} else if (pe->ArityOfPE) {

View File

@@ -483,7 +483,7 @@ static char SccsId[] = "%W% %G%";
#include "absmi.h"
#include "compile.h"
#include "index.h"
#ifdef DEBUG
#if DEBUG
#include "yapio.h"
#endif
#ifndef NULL
@@ -2846,7 +2846,7 @@ Yap_PredIsIndexable(PredEntry *ap, UInt NSlots, yamop *next_pc)
CleanCls(&cint);
return FAILCODE;
}
#ifdef DEBUG
#if DEBUG
if (GLOBAL_Option['i' - 'a' + 1]) {
Yap_ShowCode(&cint);
}
@@ -3263,7 +3263,7 @@ index_jmp(ClausePointer cur, ClausePointer parent, yamop *ipc, int is_lu, yamop
/* maybe I am a new group */
ncur = ClauseCodeToLogUpdIndex(ipc);
if (ncur->ParentIndex != lcur) {
#ifdef DEBUG
#if DEBUG
fprintf(stderr,"OOPS, bad parent in lu index\n");
#endif
cur.lui = NULL;
@@ -3990,7 +3990,7 @@ ExpandIndex(PredEntry *ap, int ExtraArgs, yamop *nextop USES_REGS) {
} else {
expand_clauses = NULL;
}
#ifdef DEBUG
#if DEBUG
if (GLOBAL_Option['i' - 'a' + 1]) {
Term tmod = ap->ModuleOfPred;
if (!tmod) tmod = TermProlog;
@@ -4052,7 +4052,7 @@ ExpandIndex(PredEntry *ap, int ExtraArgs, yamop *nextop USES_REGS) {
CleanCls(&cint);
return FAILCODE;
}
#ifdef DEBUG
#if DEBUG
if (GLOBAL_Option['i' - 'a' + 1]) {
Yap_ShowCode(&cint);
}
@@ -4522,7 +4522,7 @@ remove_clause_from_index(yamop *header, LogUpdClause *cl)
ocurp->u.OtILl.block = curp->u.OtILl.block;
}
header->u.Illss.e--;
#ifdef DEBUG
#if DEBUG
Yap_DirtyCps--;
Yap_FreedCps++;
#endif
@@ -4549,7 +4549,7 @@ remove_dirty_clauses_from_index(yamop *header)
yamop *ocurp = curp;
header->u.Illss.e--;
#ifdef DEBUG
#if DEBUG
Yap_DirtyCps--;
Yap_FreedCps++;
#endif
@@ -4586,7 +4586,7 @@ remove_dirty_clauses_from_index(yamop *header)
yamop *ocurp = curp;
header->u.Illss.e--;
#ifdef DEBUG
#if DEBUG
Yap_DirtyCps--;
Yap_FreedCps++;
#endif
@@ -4956,7 +4956,7 @@ add_try(PredEntry *ap, ClauseDef *cls, yamop *next, struct intermediates *cint)
siglongjmp(cint->CompilerBotch,2);
}
Yap_LUIndexSpace_CP += size;
#ifdef DEBUG
#if DEBUG
Yap_NewCps++;
Yap_LiveCps++;
#endif
@@ -4982,7 +4982,7 @@ add_trust(LogUpdIndex *icl, ClauseDef *cls, struct intermediates *cint)
siglongjmp(cint->CompilerBotch,2);
}
Yap_LUIndexSpace_CP += size;
#ifdef DEBUG
#if DEBUG
Yap_NewCps++;
Yap_LiveCps++;
#endif
@@ -5477,7 +5477,7 @@ Yap_AddClauseToIndex(PredEntry *ap, yamop *beg, int first) {
}
LOCAL_Error_Size = 0;
LOCAL_ErrorMessage = NULL;
#ifdef DEBUG
#if DEBUG
if (GLOBAL_Option['i' - 'a' + 1]) {
Term tmod = ap->ModuleOfPred;
if (!tmod) tmod = TermProlog;
@@ -5637,7 +5637,7 @@ remove_from_index(PredEntry *ap, path_stack_entry *sp, ClauseDef *cls, yamop *bg
case _enter_lu_pred:
ipc->u.Illss.s--;
ipc->u.Illss.e++;
#ifdef DEBUG
#if DEBUG
Yap_DirtyCps++;
Yap_LiveCps--;
#endif
@@ -5956,7 +5956,7 @@ Yap_RemoveClauseFromIndex(PredEntry *ap, yamop *beg) {
}
return;
}
#ifdef DEBUG
#if DEBUG
if (GLOBAL_Option['i' - 'a' + 1]) {
Term tmod = ap->ModuleOfPred;

View File

@@ -56,7 +56,7 @@ static char SccsId[] = "%W% %G%";
#include <string.h>
#endif
#ifdef DEBUG
#if DEBUG
#define LOGFILE "logfile"
@@ -204,7 +204,7 @@ Yap_OpDec(int p, char *type, Atom a, Term m)
static void
SetOp(int p, int type, char *at, Term m)
{
#ifdef DEBUG
#if DEBUG
if (GLOBAL_Option[5])
fprintf(stderr,"[setop %d %s %s]\n", p, optypes[type], at);
#endif
@@ -334,7 +334,7 @@ InitOps(void)
SetOp(Ops[i].opPrio, Ops[i].opType, Ops[i].opName, PROLOG_MODULE);
}
#ifdef DEBUG
#if DEBUG
#ifdef HAVE_ISATTY
#include <unistd.h>
#endif
@@ -344,7 +344,7 @@ static void
InitDebug(void)
{
Atom At;
#ifdef DEBUG
#if DEBUG
int i;
for (i = 1; i < 20; ++i)

View File

@@ -1559,7 +1559,7 @@ ShiftPtr(CELL t, char *base)
}
static Atom
AddAtom(Atom t, char *buf)
addAtom(Atom t, char *buf)
{
char *s = buf+(UInt)t;
@@ -1581,7 +1581,7 @@ FetchFunctor(CELL *pt, char *buf)
// and then an atom
ptr = AdjustSize(ptr, buf);
name = (Atom)((char *)ptr-buf);
at = AddAtom(name, buf);
at = addAtom(name, buf);
*pt = (CELL)Yap_MkFunctor(at, arity);
return arity;
}
@@ -1597,7 +1597,7 @@ import_arg(CELL *hp, char *abase, char *buf, CELL *amax)
if (IsVarTerm(t)) {
hp[0] = (CELL)ShiftPtr(t, abase);
} else if (IsAtomTerm(t)) {
hp[0] = MkAtomTerm(AddAtom(AtomOfTerm(t), buf));
hp[0] = MkAtomTerm(addAtom(AtomOfTerm(t), buf));
} else if (IsPairTerm(t)) {
CELL *newp = ShiftPtr((CELL)RepPair(t), abase);
hp[0] = AbsPair(newp);
@@ -1649,7 +1649,7 @@ Yap_ImportTerm(char * buf) {
else if (IsIntTerm(tinp))
return tinp;
else if (IsAtomTerm(tinp)) {
tret = MkAtomTerm(AddAtom(NULL,(char *)(bc+3)));
tret = MkAtomTerm(addAtom(NULL,(char *)(bc+3)));
return tret;
}
if (H + sz > ASP)
@@ -3710,7 +3710,7 @@ MurmurHashNeutral2 ( const void * key, int len, unsigned int seed )
}
static CELL *
AddAtomToHash(CELL *st, Atom at)
addAtomToHash(CELL *st, Atom at)
{
unsigned int len;
@@ -3778,14 +3778,14 @@ hash_complex_term(register CELL *pt0,
if (IsAtomOrIntTerm(d0)) {
if (d0 != TermFoundVar) {
if (IsAtomTerm(d0)) {
st = AddAtomToHash(st, AtomOfTerm(d0));
st = addAtomToHash(st, AtomOfTerm(d0));
} else {
*st++ = IntOfTerm(d0);
}
}
continue;
} else if (IsPairTerm(d0)) {
st = AddAtomToHash(st, AtomDot);
st = addAtomToHash(st, AtomDot);
if (depth == 1)
continue;
if (to_visit + 256 >= (visited_t *)AuxSp) {
@@ -3848,7 +3848,7 @@ hash_complex_term(register CELL *pt0,
}
continue;
}
st = AddAtomToHash(st, NameOfFunctor(f));
st = addAtomToHash(st, NameOfFunctor(f));
if (depth == 1)
continue;
if (to_visit + 1024 >= (visited_t *)AuxSp) {