pre post unify fixes

parent f5084947
......@@ -82,7 +82,7 @@
dup(I,II,L,LL) :-
movex(I,I-1,L,L),
II is I + 1.
set_p(P,I,I,L,LL) :-
P=ground(X) ->
gset(p,l(X),I,L,LL);
......
......@@ -22,24 +22,20 @@
scmcall('gp-set',[V,sp(-1),s],I,I1,L,L1),
reset(I,L1,LL).
-trace.
'pre-unify'(V,I,I,L,LL) :-
gset('call?',c(0),I,L,L1),
gset(V,c(delayers),I,L1,LL).
generate('pre-unify'(base+I),L,L1),
gset(V,sp(I),I,L1,LL).
'post-unify'(V,Nsloc,I,I,L,LL) :-
gref(V,I,L,L2),
generate('post-unify'(base+I),L2,LL).
gref(V,sp(I),L,L1),
generate('post-unify'(base+I,E),L1,L2),
generate('recap'(base+I),L2,L3),
label(E,L3,LL).
'post-unify-tail'(V,I,0,L,LL) :-
gref(V,I,L,L1),
II is I + 1,
gref(c(delayers),II,L1,L4),
generate(eq(I,II),L4,L5),
generate(je(E),L5,L6),
III is II + 1,
scmtailcall2('delay-call',[cc],III,_,L6,L7),
label(E,L8,L9),
'cc-call'(I,_,L9,LL).
gref(V,sp(I),L,L1),
generate('post-unify-tail'(base+I),L1,LL).
-trace.
unify(Code,V,I,II,L,LL) :-
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment