improve code for disjunctions by trying to avoid permanent variables.
This commit is contained in:
18
C/compiler.c
18
C/compiler.c
@@ -1383,18 +1383,6 @@ IsTrueGoal(Term t) {
|
||||
return(t == MkAtomTerm(AtomTrue));
|
||||
}
|
||||
|
||||
static void
|
||||
c_p_put(Term Goal, op_numbers op_var, op_numbers op_val, compiler_struct * cglobs)
|
||||
{
|
||||
Term t = Deref(ArgOfTerm(2, Goal));
|
||||
int new = check_var(t, 1, 0, cglobs);
|
||||
t = Deref(t);
|
||||
Yap_emit((new ?
|
||||
(++cglobs->nvars,op_var) : op_val), t, IntegerOfTerm(ArgOfTerm(1, Goal)), &cglobs->cint);
|
||||
tag_var(t, new, cglobs);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
emit_special_label(Term Goal, compiler_struct *cglobs)
|
||||
{
|
||||
@@ -1814,6 +1802,12 @@ c_goal(Term Goal, int mod, compiler_struct *cglobs)
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (f == FunctorSafe) {
|
||||
Ventry *v = (Ventry *)ArgOfTerm(1, Goal);
|
||||
/* This variable must be known before */
|
||||
v->FlagsOfVE |= SafeVar;
|
||||
return;
|
||||
}
|
||||
else if (p->PredFlags & AsmPredFlag) {
|
||||
int op = p->PredFlags & 0x7f;
|
||||
|
||||
|
Reference in New Issue
Block a user