change LOCALS macros.

This commit is contained in:
Joao
2011-05-04 10:11:41 +01:00
parent 18ce4dd78b
commit dc3c54c164
47 changed files with 1448 additions and 1448 deletions

View File

@@ -2196,9 +2196,9 @@ static yamop *
a_gl(op_numbers opcode, yamop *code_p, int pass_no, struct PSEUDO *cpc, struct intermediates *cip USES_REGS)
{
#ifdef YAPOR
return a_try(opcode, cpc->rnd1, IPredArity, cpc->rnd2 >> 1, cpc->rnd2 & 1, code_p, pass_no, cip);
return a_try(opcode, cpc->rnd1, LOCAL_IPredArity, cpc->rnd2 >> 1, cpc->rnd2 & 1, code_p, pass_no, cip);
#else
return a_try(opcode, cpc->rnd1, IPredArity, code_p, pass_no, cip);
return a_try(opcode, cpc->rnd1, LOCAL_IPredArity, code_p, pass_no, cip);
#endif /* YAPOR */
}
@@ -2981,11 +2981,11 @@ a_special_label(yamop *code_p, int pass_no, struct intermediates *cip)
#ifdef YAPOR
#define TRYCODE(G,P) a_try((G), Unsigned(cip->code_addr) + cip->label_offset[cip->cpc->rnd1], IPredArity, cip->cpc->rnd2 >> 1, cip->cpc->rnd2 & 1, code_p, pass_no, cip)
#define TABLE_TRYCODE(G) a_try((G), (CELL)emit_ilabel(cip->cpc->rnd1, cip), IPredArity, cip->cpc->rnd2 >> 1, cip->cpc->rnd2 & 1, code_p, pass_no, cip)
#define TRYCODE(G,P) a_try((G), Unsigned(cip->code_addr) + cip->label_offset[cip->cpc->rnd1], LOCAL_IPredArity, cip->cpc->rnd2 >> 1, cip->cpc->rnd2 & 1, code_p, pass_no, cip)
#define TABLE_TRYCODE(G) a_try((G), (CELL)emit_ilabel(cip->cpc->rnd1, cip), LOCAL_IPredArity, cip->cpc->rnd2 >> 1, cip->cpc->rnd2 & 1, code_p, pass_no, cip)
#else
#define TRYCODE(G,P) a_try((G), Unsigned(cip->code_addr) + cip->label_offset[cip->cpc->rnd1], IPredArity, code_p, pass_no, cip)
#define TABLE_TRYCODE(G) a_try((G), (CELL)emit_ilabel(cip->cpc->rnd1, cip), IPredArity, code_p, pass_no, cip)
#define TRYCODE(G,P) a_try((G), Unsigned(cip->code_addr) + cip->label_offset[cip->cpc->rnd1], LOCAL_IPredArity, code_p, pass_no, cip)
#define TABLE_TRYCODE(G) a_try((G), (CELL)emit_ilabel(cip->cpc->rnd1, cip), LOCAL_IPredArity, code_p, pass_no, cip)
#endif /* YAPOR */
static yamop *
@@ -3093,22 +3093,22 @@ do_pass(int pass_no, yamop **entry_codep, int assembling, int *clause_has_blobsp
}
code_p = cl_u->sc.ClCode;
}
IPredArity = cip->CurrentPred->ArityOfPE; /* number of args */
LOCAL_IPredArity = cip->CurrentPred->ArityOfPE; /* number of args */
*entry_codep = code_p;
if (tabled) {
#if TABLING
#ifdef YAPOR
code_p = a_try(_table_try_single, (CELL)NEXTOP(code_p,Otapl), IPredArity, 1, 0, code_p, pass_no, cip);
code_p = a_try(_table_try_single, (CELL)NEXTOP(code_p,Otapl), LOCAL_IPredArity, 1, 0, code_p, pass_no, cip);
#else
code_p = a_try(_table_try_single, (CELL)NEXTOP(code_p,Otapl), IPredArity, code_p, pass_no, cip);
code_p = a_try(_table_try_single, (CELL)NEXTOP(code_p,Otapl), LOCAL_IPredArity, code_p, pass_no, cip);
#endif
#endif
}
if (dynamic) {
#ifdef YAPOR
code_p = a_try(_try_me, 0, IPredArity, 1, 0, code_p, pass_no, cip);
code_p = a_try(_try_me, 0, LOCAL_IPredArity, 1, 0, code_p, pass_no, cip);
#else
code_p = a_try(_try_me, 0, IPredArity, code_p, pass_no, cip);
code_p = a_try(_try_me, 0, LOCAL_IPredArity, code_p, pass_no, cip);
#endif /* YAPOR */
}
} else {
@@ -3864,16 +3864,16 @@ Yap_assemble(int mode, Term t, PredEntry *ap, int is_fact, struct intermediates
#if USE_SYSTEM_MALLOC
if (!cip->label_offset) {
if (!Yap_LabelFirstArray && max_label <= DEFAULT_NLABELS) {
Yap_LabelFirstArray = (Int *)Yap_AllocCodeSpace(sizeof(Int)*DEFAULT_NLABELS);
Yap_LabelFirstArraySz = DEFAULT_NLABELS;
if (!Yap_LabelFirstArray) {
if (!LOCAL_LabelFirstArray && max_label <= DEFAULT_NLABELS) {
LOCAL_LabelFirstArray = (Int *)Yap_AllocCodeSpace(sizeof(Int)*DEFAULT_NLABELS);
LOCAL_LabelFirstArraySz = DEFAULT_NLABELS;
if (!LOCAL_LabelFirstArray) {
save_machine_regs();
siglongjmp(cip->CompilerBotch, OUT_OF_HEAP_BOTCH);
}
}
if (Yap_LabelFirstArray && max_label <= Yap_LabelFirstArraySz) {
cip->label_offset = Yap_LabelFirstArray;
if (LOCAL_LabelFirstArray && max_label <= LOCAL_LabelFirstArraySz) {
cip->label_offset = LOCAL_LabelFirstArray;
} else {
cip->label_offset = (Int *)Yap_AllocCodeSpace(sizeof(Int)*max_label);
if (!cip->label_offset) {
@@ -3926,7 +3926,7 @@ Yap_assemble(int mode, Term t, PredEntry *ap, int is_fact, struct intermediates
/* make sure we copy after second pass */
cl->usc.ClSource = x;
cl->ClSize = osize;
ProfEnd=code_p;
LOCAL_ProfEnd=code_p;
return entry_code;
} else {
while ((cip->code_addr = (yamop *) Yap_AllocCodeSpace(size)) == NULL) {
@@ -3950,11 +3950,11 @@ Yap_assemble(int mode, Term t, PredEntry *ap, int is_fact, struct intermediates
}
}
code_p = do_pass(1, &entry_code, mode, &clause_has_blobs, &clause_has_dbterm, cip, size PASS_REGS);
ProfEnd=code_p;
LOCAL_ProfEnd=code_p;
#ifdef LOW_PROF
if (ProfilerOn &&
Yap_OffLineProfiler) {
Yap_inform_profiler_of_clause(entry_code, ProfEnd, ap, mode == ASSEMBLING_INDEX);
Yap_inform_profiler_of_clause(entry_code, LOCAL_ProfEnd, ap, mode == ASSEMBLING_INDEX);
}
#endif /* LOW_PROF */
return entry_code;