thread compilation
This commit is contained in:
parent
712d79c7bb
commit
6f1b5fbef9
6
C/args.c
6
C/args.c
@ -44,8 +44,10 @@ Yap_ArgKey(Atom key, const param_t *def, int n)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define failed(e, t, a) failed__(e, t, a PASS_REGS)
|
||||||
|
|
||||||
static xarg *
|
static xarg *
|
||||||
failed( yap_error_number e, Term t, xarg *a)
|
failed__( yap_error_number e, Term t, xarg *a USES_REGS)
|
||||||
{
|
{
|
||||||
free( a );
|
free( a );
|
||||||
LOCAL_Error_TYPE = e;
|
LOCAL_Error_TYPE = e;
|
||||||
@ -70,7 +72,7 @@ Yap_ArgListToVector (Term listl, const param_t *def, int n)
|
|||||||
if (IsAtomTerm(listl) ) {
|
if (IsAtomTerm(listl) ) {
|
||||||
xarg *na = matchKey( AtomOfTerm(listl), a, n, def);
|
xarg *na = matchKey( AtomOfTerm(listl), a, n, def);
|
||||||
if (!na) {
|
if (!na) {
|
||||||
return failed( TYPE_ERROR_LIST, listl, a);
|
return failed( TYPE_ERROR_LIST, listl, a );
|
||||||
}
|
}
|
||||||
} else if (IsApplTerm(listl)) {
|
} else if (IsApplTerm(listl)) {
|
||||||
Functor f = FunctorOfTerm( listl );
|
Functor f = FunctorOfTerm( listl );
|
||||||
|
@ -2686,6 +2686,7 @@ static PredEntry *new_lu_int_key(Int key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static PredEntry *new_lu_entry(Term t) {
|
static PredEntry *new_lu_entry(Term t) {
|
||||||
|
CACHE_REGS
|
||||||
Prop p0;
|
Prop p0;
|
||||||
PredEntry *pe;
|
PredEntry *pe;
|
||||||
|
|
||||||
|
14
C/modules.c
14
C/modules.c
@ -26,7 +26,7 @@ static Int current_module(USES_REGS1);
|
|||||||
static Int current_module1(USES_REGS1);
|
static Int current_module1(USES_REGS1);
|
||||||
static ModEntry *LookupModule(Term a);
|
static ModEntry *LookupModule(Term a);
|
||||||
static ModEntry *LookupSystemModule(Term a);
|
static ModEntry *LookupSystemModule(Term a);
|
||||||
static ModEntry *GetModuleEntry(Atom at);
|
static ModEntry *GetModuleEntry(Atom at USES_REGS);
|
||||||
static ModEntry *FetchModuleEntry(Atom at);
|
static ModEntry *FetchModuleEntry(Atom at);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,7 +67,7 @@ initMod( AtomEntry *toname, AtomEntry *ae) {
|
|||||||
*
|
*
|
||||||
* @return module descriptorxs
|
* @return module descriptorxs
|
||||||
*/
|
*/
|
||||||
static ModEntry *GetModuleEntry(Atom at)
|
static ModEntry *GetModuleEntry(Atom at USES_REGS)
|
||||||
{
|
{
|
||||||
Prop p0;
|
Prop p0;
|
||||||
AtomEntry *ae = RepAtom(at);
|
AtomEntry *ae = RepAtom(at);
|
||||||
@ -126,8 +126,9 @@ bool Yap_getUnknown ( Term mod) {
|
|||||||
|
|
||||||
|
|
||||||
bool Yap_CharacterEscapes(Term mt) {
|
bool Yap_CharacterEscapes(Term mt) {
|
||||||
|
CACHE_REGS
|
||||||
if (mt == PROLOG_MODULE) mt = TermProlog;
|
if (mt == PROLOG_MODULE) mt = TermProlog;
|
||||||
return GetModuleEntry(AtomOfTerm(mt))->flags & M_CHARESCAPE;
|
return GetModuleEntry(AtomOfTerm(mt) PASS_REGS)->flags & M_CHARESCAPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -163,7 +164,7 @@ static ModEntry *LookupSystemModule(Term a) {
|
|||||||
a = TermProlog;
|
a = TermProlog;
|
||||||
}
|
}
|
||||||
at = AtomOfTerm(a);
|
at = AtomOfTerm(a);
|
||||||
me = GetModuleEntry(at);
|
me = GetModuleEntry(at PASS_REGS);
|
||||||
if (!me)
|
if (!me)
|
||||||
return NULL;
|
return NULL;
|
||||||
me->flags |= M_SYSTEM;
|
me->flags |= M_SYSTEM;
|
||||||
@ -173,15 +174,16 @@ static ModEntry *LookupSystemModule(Term a) {
|
|||||||
|
|
||||||
|
|
||||||
static ModEntry *LookupModule(Term a) {
|
static ModEntry *LookupModule(Term a) {
|
||||||
|
CACHE_REGS
|
||||||
Atom at;
|
Atom at;
|
||||||
ModEntry *me;
|
ModEntry *me;
|
||||||
|
|
||||||
/* prolog module */
|
/* prolog module */
|
||||||
if (a == 0) {
|
if (a == 0) {
|
||||||
return GetModuleEntry(AtomProlog);
|
return GetModuleEntry(AtomProlog PASS_REGS);
|
||||||
}
|
}
|
||||||
at = AtomOfTerm(a);
|
at = AtomOfTerm(a);
|
||||||
me = GetModuleEntry(at);
|
me = GetModuleEntry(at PASS_REGS);
|
||||||
return me;
|
return me;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -563,7 +563,8 @@ typedef struct scanner_extra_alloc {
|
|||||||
void *filler;
|
void *filler;
|
||||||
} ScannerExtraBlock;
|
} ScannerExtraBlock;
|
||||||
|
|
||||||
static TokEntry *CodeSpaceError(TokEntry *t, TokEntry *p, TokEntry *l) {
|
#define CodeSpaceError(t, p, l) CodeSpaceError__(t, p, l PASS_REGS)
|
||||||
|
static TokEntry *CodeSpaceError__(TokEntry *t, TokEntry *p, TokEntry *l USES_REGS) {
|
||||||
LOCAL_Error_TYPE = RESOURCE_ERROR_HEAP;
|
LOCAL_Error_TYPE = RESOURCE_ERROR_HEAP;
|
||||||
LOCAL_ErrorMessage = "Code Space Overflow";
|
LOCAL_ErrorMessage = "Code Space Overflow";
|
||||||
if (t) {
|
if (t) {
|
||||||
@ -574,7 +575,8 @@ static TokEntry *CodeSpaceError(TokEntry *t, TokEntry *p, TokEntry *l) {
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
static TokEntry *TrailSpaceError(TokEntry *t, TokEntry *l) {
|
#define TrailSpaceError(t, l) TrailSpaceError__(t, l PASS_REGS)
|
||||||
|
static TokEntry *TrailSpaceError__(TokEntry *t, TokEntry *l USES_REGS) {
|
||||||
LOCAL_ErrorMessage = "Trail Overflow";
|
LOCAL_ErrorMessage = "Trail Overflow";
|
||||||
LOCAL_Error_TYPE = RESOURCE_ERROR_TRAIL;
|
LOCAL_Error_TYPE = RESOURCE_ERROR_TRAIL;
|
||||||
if (t) {
|
if (t) {
|
||||||
@ -584,7 +586,8 @@ static TokEntry *TrailSpaceError(TokEntry *t, TokEntry *l) {
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
static TokEntry *AuxSpaceError(TokEntry *p, TokEntry *l, const char *msg) {
|
#define AuxSpaceError(p, l, msg) AuxSpaceError__(p, l, msg PASS_REGS)
|
||||||
|
static TokEntry *AuxSpaceError__(TokEntry *p, TokEntry *l, const char *msg USES_REGS) {
|
||||||
/* huge atom or variable, we are in trouble */
|
/* huge atom or variable, we are in trouble */
|
||||||
LOCAL_ErrorMessage = (char *)msg;
|
LOCAL_ErrorMessage = (char *)msg;
|
||||||
LOCAL_Error_TYPE = RESOURCE_ERROR_AUXILIARY_STACK;
|
LOCAL_Error_TYPE = RESOURCE_ERROR_AUXILIARY_STACK;
|
||||||
|
@ -353,7 +353,7 @@ void Yap_InitQLYR(void);
|
|||||||
void Yap_InitRange(void);
|
void Yap_InitRange(void);
|
||||||
|
|
||||||
/* save.c */
|
/* save.c */
|
||||||
int Yap_SavedInfo(char *, char *, CELL *, CELL *, CELL *);
|
int Yap_SavedInfo(const char *, char *, CELL *, CELL *, CELL *);
|
||||||
int Yap_SavedStateRestore(char *, char *);
|
int Yap_SavedStateRestore(char *, char *);
|
||||||
FILE *Yap_OpenRestore(const char *, char *);
|
FILE *Yap_OpenRestore(const char *, char *);
|
||||||
void Yap_InitSavePreds(void);
|
void Yap_InitSavePreds(void);
|
||||||
|
@ -259,6 +259,7 @@ Yap_GetCharForSIGINT(void)
|
|||||||
|
|
||||||
|
|
||||||
void Yap_InitConsole(void) {
|
void Yap_InitConsole(void) {
|
||||||
|
CACHE_REGS
|
||||||
LOCAL_newline = true;
|
LOCAL_newline = true;
|
||||||
Yap_InitCPred ("prompt", 1, prompt1, SafePredFlag|SyncPredFlag);
|
Yap_InitCPred ("prompt", 1, prompt1, SafePredFlag|SyncPredFlag);
|
||||||
Yap_InitCPred ("prompt1", 1, prompt1, SafePredFlag|SyncPredFlag);
|
Yap_InitCPred ("prompt1", 1, prompt1, SafePredFlag|SyncPredFlag);
|
||||||
|
@ -114,6 +114,7 @@ FILE *Yap_stdout;
|
|||||||
FILE *Yap_stderr;
|
FILE *Yap_stderr;
|
||||||
|
|
||||||
static Term gethdir(Term t) {
|
static Term gethdir(Term t) {
|
||||||
|
CACHE_REGS
|
||||||
Atom aref = AtomOfTerm(t);
|
Atom aref = AtomOfTerm(t);
|
||||||
char *s = RepAtom(aref)->StrOfAE;
|
char *s = RepAtom(aref)->StrOfAE;
|
||||||
size_t nsz;
|
size_t nsz;
|
||||||
@ -189,6 +190,7 @@ static bool is_file_errors(Term t) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Yap_DefaultStreamOps(StreamDesc *st) {
|
void Yap_DefaultStreamOps(StreamDesc *st) {
|
||||||
|
CACHE_REGS
|
||||||
st->stream_wputc = put_wchar;
|
st->stream_wputc = put_wchar;
|
||||||
st->stream_wgetc = get_wchar;
|
st->stream_wgetc = get_wchar;
|
||||||
if (st->status & (Promptable_Stream_f)) {
|
if (st->status & (Promptable_Stream_f)) {
|
||||||
@ -266,6 +268,7 @@ static void unix_upd_stream_info(StreamDesc *s) {
|
|||||||
|
|
||||||
|
|
||||||
static void InitFileIO(StreamDesc *s) {
|
static void InitFileIO(StreamDesc *s) {
|
||||||
|
CACHE_REGS
|
||||||
if (s->status & Socket_Stream_f) {
|
if (s->status & Socket_Stream_f) {
|
||||||
/* Console is a socket and socket will prompt */
|
/* Console is a socket and socket will prompt */
|
||||||
Yap_ConsoleSocketOps(s);
|
Yap_ConsoleSocketOps(s);
|
||||||
|
@ -267,6 +267,7 @@ static bool getLine(int inp, int out) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int ReadlinePutc(int sno, int ch) {
|
static int ReadlinePutc(int sno, int ch) {
|
||||||
|
CACHE_REGS
|
||||||
StreamDesc *s = &GLOBAL_Stream[sno];
|
StreamDesc *s = &GLOBAL_Stream[sno];
|
||||||
#if MAC || _MSC_VER || defined(__MINGW32__)
|
#if MAC || _MSC_VER || defined(__MINGW32__)
|
||||||
if (ch == 10) {
|
if (ch == 10) {
|
||||||
|
@ -216,7 +216,7 @@ static const param_t read_defs[] = {READ_DEFS()};
|
|||||||
* +
|
* +
|
||||||
*/
|
*/
|
||||||
Term Yap_syntax_error(TokEntry *errtok, int sno) {
|
Term Yap_syntax_error(TokEntry *errtok, int sno) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
Term info;
|
Term info;
|
||||||
Term startline, errline, endline;
|
Term startline, errline, endline;
|
||||||
Term tf[4];
|
Term tf[4];
|
||||||
@ -395,7 +395,7 @@ typedef struct renv {
|
|||||||
static xarg *setClauseReadEnv(Term opts, FEnv *fe, struct renv *re,
|
static xarg *setClauseReadEnv(Term opts, FEnv *fe, struct renv *re,
|
||||||
int inp_stream);
|
int inp_stream);
|
||||||
static xarg *setReadEnv(Term opts, FEnv *fe, struct renv *re, int inp_stream) {
|
static xarg *setReadEnv(Term opts, FEnv *fe, struct renv *re, int inp_stream) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
LOCAL_VarTable = NULL;
|
LOCAL_VarTable = NULL;
|
||||||
LOCAL_AnonVarTable = NULL;
|
LOCAL_AnonVarTable = NULL;
|
||||||
fe->cmod = CurrentModule;
|
fe->cmod = CurrentModule;
|
||||||
@ -488,7 +488,7 @@ typedef enum {
|
|||||||
} parser_state_t;
|
} parser_state_t;
|
||||||
|
|
||||||
Int Yap_FirstLineInParse(void) {
|
Int Yap_FirstLineInParse(void) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
return LOCAL_StartLineCount;
|
return LOCAL_StartLineCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,7 +496,7 @@ Int Yap_FirstLineInParse(void) {
|
|||||||
#define POPFET(X) fe->X = *--HR
|
#define POPFET(X) fe->X = *--HR
|
||||||
|
|
||||||
static void reset_regs(TokEntry *tokstart, FEnv *fe) {
|
static void reset_regs(TokEntry *tokstart, FEnv *fe) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
|
|
||||||
restore_machine_regs();
|
restore_machine_regs();
|
||||||
|
|
||||||
@ -524,6 +524,7 @@ static void reset_regs(TokEntry *tokstart, FEnv *fe) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Term get_variables(FEnv *fe, TokEntry *tokstart) {
|
static Term get_variables(FEnv *fe, TokEntry *tokstart) {
|
||||||
|
CACHE_REGS
|
||||||
Term v;
|
Term v;
|
||||||
if (fe->vp) {
|
if (fe->vp) {
|
||||||
while (true) {
|
while (true) {
|
||||||
@ -543,6 +544,7 @@ static Term get_variables(FEnv *fe, TokEntry *tokstart) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Term get_varnames(FEnv *fe, TokEntry *tokstart) {
|
static Term get_varnames(FEnv *fe, TokEntry *tokstart) {
|
||||||
|
CACHE_REGS
|
||||||
Term v;
|
Term v;
|
||||||
if (fe->np) {
|
if (fe->np) {
|
||||||
while (true) {
|
while (true) {
|
||||||
@ -562,6 +564,7 @@ static Term get_varnames(FEnv *fe, TokEntry *tokstart) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Term get_singletons(FEnv *fe, TokEntry *tokstart) {
|
static Term get_singletons(FEnv *fe, TokEntry *tokstart) {
|
||||||
|
CACHE_REGS
|
||||||
Term v;
|
Term v;
|
||||||
if (fe->sp) {
|
if (fe->sp) {
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
@ -579,6 +582,7 @@ static Term get_singletons(FEnv *fe, TokEntry *tokstart) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void warn_singletons(FEnv *fe, TokEntry *tokstart) {
|
static void warn_singletons(FEnv *fe, TokEntry *tokstart) {
|
||||||
|
CACHE_REGS
|
||||||
Term v;
|
Term v;
|
||||||
fe->sp = TermNil;
|
fe->sp = TermNil;
|
||||||
v = get_singletons(fe, tokstart);
|
v = get_singletons(fe, tokstart);
|
||||||
@ -600,7 +604,8 @@ static void warn_singletons(FEnv *fe, TokEntry *tokstart) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Term get_stream_position(FEnv *fe, TokEntry *tokstart) {
|
static Term get_stream_position(FEnv *fe, TokEntry *tokstart) {
|
||||||
Term v;
|
CACHE_REGS
|
||||||
|
Term v;
|
||||||
if (fe->tp) {
|
if (fe->tp) {
|
||||||
while (true) {
|
while (true) {
|
||||||
fe->old_H = HR;
|
fe->old_H = HR;
|
||||||
@ -617,7 +622,7 @@ static Term get_stream_position(FEnv *fe, TokEntry *tokstart) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool complete_processing(FEnv *fe, TokEntry *tokstart) {
|
static bool complete_processing(FEnv *fe, TokEntry *tokstart) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
Term v1, v2, v3, vc, tp;
|
Term v1, v2, v3, vc, tp;
|
||||||
|
|
||||||
CurrentModule = fe->cmod;
|
CurrentModule = fe->cmod;
|
||||||
@ -655,7 +660,7 @@ static bool complete_processing(FEnv *fe, TokEntry *tokstart) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool complete_clause_processing(FEnv *fe, TokEntry *tokstart) {
|
static bool complete_clause_processing(FEnv *fe, TokEntry *tokstart) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
Term v_vp, v_vnames, v_comments, v_pos;
|
Term v_vp, v_vnames, v_comments, v_pos;
|
||||||
|
|
||||||
CurrentModule = fe->cmod;
|
CurrentModule = fe->cmod;
|
||||||
@ -704,7 +709,7 @@ static parser_state_t scanEOF(FEnv *fe, int inp_stream);
|
|||||||
static parser_state_t scan(REnv *re, FEnv *fe, int inp_stream);
|
static parser_state_t scan(REnv *re, FEnv *fe, int inp_stream);
|
||||||
|
|
||||||
static parser_state_t scanEOF(FEnv *fe, int inp_stream) {
|
static parser_state_t scanEOF(FEnv *fe, int inp_stream) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
// bool store_comments = false;
|
// bool store_comments = false;
|
||||||
TokEntry *tokstart = LOCAL_tokptr;
|
TokEntry *tokstart = LOCAL_tokptr;
|
||||||
// check for an user abort
|
// check for an user abort
|
||||||
@ -745,7 +750,7 @@ static parser_state_t scanEOF(FEnv *fe, int inp_stream) {
|
|||||||
|
|
||||||
static parser_state_t initParser(Term opts, FEnv *fe, REnv *re, int inp_stream,
|
static parser_state_t initParser(Term opts, FEnv *fe, REnv *re, int inp_stream,
|
||||||
int nargs) {
|
int nargs) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
LOCAL_ErrorMessage = NULL;
|
LOCAL_ErrorMessage = NULL;
|
||||||
fe->old_TR = TR;
|
fe->old_TR = TR;
|
||||||
LOCAL_Error_TYPE = YAP_NO_ERROR;
|
LOCAL_Error_TYPE = YAP_NO_ERROR;
|
||||||
@ -782,7 +787,7 @@ static parser_state_t initParser(Term opts, FEnv *fe, REnv *re, int inp_stream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static parser_state_t scan(REnv *re, FEnv *fe, int inp_stream) {
|
static parser_state_t scan(REnv *re, FEnv *fe, int inp_stream) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
/* preserve value of H after scanning: otherwise we may lose strings
|
/* preserve value of H after scanning: otherwise we may lose strings
|
||||||
and floats */
|
and floats */
|
||||||
LOCAL_tokptr = LOCAL_toktide =
|
LOCAL_tokptr = LOCAL_toktide =
|
||||||
@ -806,7 +811,7 @@ static parser_state_t scan(REnv *re, FEnv *fe, int inp_stream) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static parser_state_t scanError(REnv *re, FEnv *fe, int inp_stream) {
|
static parser_state_t scanError(REnv *re, FEnv *fe, int inp_stream) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
fe->t = 0;
|
fe->t = 0;
|
||||||
// running out of memory
|
// running out of memory
|
||||||
if (LOCAL_Error_TYPE == RESOURCE_ERROR_TRAIL) {
|
if (LOCAL_Error_TYPE == RESOURCE_ERROR_TRAIL) {
|
||||||
@ -846,7 +851,7 @@ static parser_state_t scanError(REnv *re, FEnv *fe, int inp_stream) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static parser_state_t parseError(REnv *re, FEnv *fe, int inp_stream) {
|
static parser_state_t parseError(REnv *re, FEnv *fe, int inp_stream) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
fe->t = 0;
|
fe->t = 0;
|
||||||
if (LOCAL_Error_TYPE == RESOURCE_ERROR_TRAIL ||
|
if (LOCAL_Error_TYPE == RESOURCE_ERROR_TRAIL ||
|
||||||
LOCAL_Error_TYPE == RESOURCE_ERROR_AUXILIARY_STACK ||
|
LOCAL_Error_TYPE == RESOURCE_ERROR_AUXILIARY_STACK ||
|
||||||
@ -877,7 +882,7 @@ static parser_state_t parseError(REnv *re, FEnv *fe, int inp_stream) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static parser_state_t parse(REnv *re, FEnv *fe, int inp_stream) {
|
static parser_state_t parse(REnv *re, FEnv *fe, int inp_stream) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
TokEntry *tokstart = LOCAL_tokptr;
|
TokEntry *tokstart = LOCAL_tokptr;
|
||||||
encoding_t e = LOCAL_encoding;
|
encoding_t e = LOCAL_encoding;
|
||||||
LOCAL_encoding = fe->enc;
|
LOCAL_encoding = fe->enc;
|
||||||
@ -937,7 +942,7 @@ Term Yap_read_term(int inp_stream, Term opts, int nargs) {
|
|||||||
state = parseError(&re, &fe, inp_stream);
|
state = parseError(&re, &fe, inp_stream);
|
||||||
break;
|
break;
|
||||||
case YAP_PARSING_FINISHED: {
|
case YAP_PARSING_FINISHED: {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
bool done;
|
bool done;
|
||||||
if (fe.reading_clause)
|
if (fe.reading_clause)
|
||||||
done = complete_clause_processing(&fe, LOCAL_tokptr);
|
done = complete_clause_processing(&fe, LOCAL_tokptr);
|
||||||
@ -1011,7 +1016,7 @@ static const param_t read_clause_defs[] = {READ_CLAUSE_DEFS()};
|
|||||||
|
|
||||||
static xarg *setClauseReadEnv(Term opts, FEnv *fe, struct renv *re,
|
static xarg *setClauseReadEnv(Term opts, FEnv *fe, struct renv *re,
|
||||||
int inp_stream) {
|
int inp_stream) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
|
|
||||||
xarg *args = Yap_ArgListToVector(opts, read_clause_defs, READ_END);
|
xarg *args = Yap_ArgListToVector(opts, read_clause_defs, READ_END);
|
||||||
if (args == NULL) {
|
if (args == NULL) {
|
||||||
@ -1255,7 +1260,7 @@ static Int style_checker(USES_REGS1) {
|
|||||||
|
|
||||||
Term Yap_StringToTerm(const char *s, size_t len, encoding_t *encp, int prio,
|
Term Yap_StringToTerm(const char *s, size_t len, encoding_t *encp, int prio,
|
||||||
Term *bindings) {
|
Term *bindings) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
Term bvar = MkVarTerm(), ctl;
|
Term bvar = MkVarTerm(), ctl;
|
||||||
yhandle_t sl;
|
yhandle_t sl;
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ void exit(int);
|
|||||||
static void
|
static void
|
||||||
freeBuffer( const void *ptr )
|
freeBuffer( const void *ptr )
|
||||||
{
|
{
|
||||||
|
CACHE_REGS
|
||||||
if (ptr == NULL ||
|
if (ptr == NULL ||
|
||||||
ptr == LOCAL_FileNameBuf || ptr == LOCAL_FileNameBuf2)
|
ptr == LOCAL_FileNameBuf || ptr == LOCAL_FileNameBuf2)
|
||||||
return;
|
return;
|
||||||
@ -297,6 +298,7 @@ Yap_IsAbsolutePath(const char *p0)
|
|||||||
static const char *
|
static const char *
|
||||||
PlExpandVars (const char *source, const char *root, char *result)
|
PlExpandVars (const char *source, const char *root, char *result)
|
||||||
{
|
{
|
||||||
|
CACHE_REGS
|
||||||
const char *src = source;
|
const char *src = source;
|
||||||
if (!result)
|
if (!result)
|
||||||
result = malloc(YAP_FILENAME_MAX+1);
|
result = malloc(YAP_FILENAME_MAX+1);
|
||||||
@ -600,6 +602,7 @@ static const char *myrealpath( const char *path)
|
|||||||
static const char *
|
static const char *
|
||||||
expandVars(const char *spec)
|
expandVars(const char *spec)
|
||||||
{
|
{
|
||||||
|
CACHE_REGS
|
||||||
#if _WIN32 || defined(__MINGW32__)
|
#if _WIN32 || defined(__MINGW32__)
|
||||||
char u[YAP_FILENAME_MAX+1];
|
char u[YAP_FILENAME_MAX+1];
|
||||||
|
|
||||||
@ -658,7 +661,7 @@ Yap_AbsoluteFile(const char *spec, bool ok)
|
|||||||
const char *
|
const char *
|
||||||
Yap_AbsoluteFileInBuffer(const char *spec, char *out, size_t sz, bool ok)
|
Yap_AbsoluteFileInBuffer(const char *spec, char *out, size_t sz, bool ok)
|
||||||
{
|
{
|
||||||
|
CACHE_REGS
|
||||||
const char*p;
|
const char*p;
|
||||||
const char*rc;
|
const char*rc;
|
||||||
if (ok) {
|
if (ok) {
|
||||||
@ -689,6 +692,8 @@ static Term
|
|||||||
/* Expand the string for the program to run. */
|
/* Expand the string for the program to run. */
|
||||||
do_glob(const char *spec, bool glob_vs_wordexp)
|
do_glob(const char *spec, bool glob_vs_wordexp)
|
||||||
{
|
{
|
||||||
|
CACHE_REGS
|
||||||
|
char u[YAP_FILENAME_MAX+1];
|
||||||
if (spec == NULL) {
|
if (spec == NULL) {
|
||||||
return TermNil;
|
return TermNil;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user