vm improvements

parent 9b4b75df
......@@ -95,8 +95,8 @@ compile_goal(!,Tail,V,[L,LL]) :- !,
check_tail(Tail),
get_C(V,[[[P0,TagC2],_]|_]),
set_P(V,P0),
(Tail==#t -> L=[[cut,P0,TagC2],[cc,TagC2]|LL] ; L=[[cut,P0,TagC2]|LL])
.
(Tail==#t -> L=[[cut,P0,TagC2],[cc,TagC2]|LL] ; L=[[cut,P0,TagC2]|LL]).
compile_goal(softie(A),Tail,V,[L,LLL]) :- !,
check_tail(Tail),
tail(Tail,V,LL,LLL),
......@@ -176,6 +176,7 @@ compile_goal((Args <= Goal),Tail,V,L) :- !,
compile_goal((begin_att,Impr,pop(3),end_att),Tail,V,L3).
compile_goal((F(|ASrgs) :- Goal),Tail,V,L) :- !,
write(woooooooooooooooooooow),nl,
rev(ASrgs,Args),
(listp(Args) -> true ; throw(not_proper_head(F(|Args)))),
reverse(Args,AArgs),
......
......@@ -19,19 +19,26 @@
(compile-prolog-string
"
-trace.
'handle-spcc'(C,I,I,L,LL) :-
NCUT is C,
NCC is C + 1,
NP is C + 2,
NS is C + 3,
NVEC is C + 4,
write(1),
id(cut,var(ICUT)),
id(cc,var(cc)),
write(2),
id(cc,var(ICC)),
write(1),
generate('scm-ref/immediate'(NVEC,ICUT,NCUT),L,L1),
generate('scm-ref/immediate'(NVEC,ICC,NCC),L1,L2),
write(2),
gset(p,svar(NP),I,L2,L3),
gset(s,svar(NS),I,L3,L4),
write(3),
gset(vec,svar(NVEC),I,L4,L5),
write(4),
gset(const,vconst,I,L5,LL).
'push-3'(P,C,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