compile =/2 to use an extra temporary, and not ARG1.

This commit is contained in:
Vitor Santos Costa 2009-02-09 22:29:44 +00:00
parent 89635fb1f6
commit bde2b57f07
1 changed files with 4 additions and 3 deletions

View File

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