fix compilation of NewX = f instructions.
This commit is contained in:
parent
875a4553d5
commit
14a162dc6a
13
C/compiler.c
13
C/compiler.c
@ -872,20 +872,25 @@ 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)) {
|
||||
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
|
||||
c_test(Int Op, Term t1, compiler_struct *cglobs) {
|
||||
|
Reference in New Issue
Block a user