fix compilation of NewX = f instructions.

This commit is contained in:
Vítor Santos Costa 2008-12-13 21:22:07 +00:00
parent 875a4553d5
commit 14a162dc6a
1 changed files with 14 additions and 9 deletions

View File

@ -872,19 +872,24 @@ c_eq(Term t1, Term t2, compiler_struct *cglobs)
}
/* first argument is an unbound var */
if (IsNewVar(t1)) {
c_var(t1, 0, 0, 0, cglobs);
if (IsVarTerm(t2)) {
c_var(t2, 1, 0, 0, cglobs);
} else {
c_arg(1, t2, 0, 0, cglobs);
}
cglobs->onhead = TRUE;
c_var(t1, 1, 0, 0, cglobs);
cglobs->onhead = FALSE;
} else {
c_var(t1, 0, 0, 0, cglobs);
cglobs->onhead = TRUE;
if (IsVarTerm(t2)) {
c_var(t2, 0, 0, 0, cglobs);
} else {
c_arg(0, t2, 0, 0, cglobs);
}
cglobs->onhead = FALSE;
}
if (IsVarTerm(t2)) {
cglobs->onhead = TRUE;
c_var(t2, 0, 0, 0, cglobs);
} else {
cglobs->onhead = TRUE;
c_arg(0, t2, 0, 0, cglobs);
}
cglobs->onhead = FALSE;
}
static void