fix *-> (thanks to ulrich).

This commit is contained in:
Vitor Santos Costa 2012-06-21 15:41:35 +01:00
parent 7b6239c73f
commit 71eeda081c
2 changed files with 15 additions and 7 deletions

View File

@ -77,6 +77,11 @@ do_not_compile_expressions :- set_value('$c_arith',[]).
'$clean_cuts'(NG0, NG),
'$do_c_built_in'(A,M,NA),
'$do_c_built_in'(B,M,NB).
'$do_c_built_in'((G*->A;B), M, (yap_hacks:current_choicepoint(DCP),NG,yap_hacks:cut_at(DCP),NA; NB)) :- !,
'$do_c_built_in'(G,M,NG0),
'$clean_cuts'(NG0, NG),
'$do_c_built_in'(A,M,NA),
'$do_c_built_in'(B,M,NB).
'$do_c_built_in'((G*->A), M, (NG,NA)) :- !,
'$do_c_built_in'(G,M,NG0),
'$clean_cuts'(NG0, NG),

View File

@ -505,15 +505,18 @@ true :- true.
'$add_env_and_fail' :- fail.
%
% *-> at this point would require compiler support, which does not exist.
%
'$delayed_goals'(G, V, NV, LGs, NCP) :-
(
yap_hacks:current_choice_point(NCP1),
if(
(yap_hacks:current_choice_point(NCP1),
'$attributes':delayed_goals(G, V, NV, LGs),
yap_hacks:current_choice_point(NCP2)
*->
NCP is NCP2-NCP1
;
copy_term_nat(V, NV), LGs = [], NCP = 0
yap_hacks:current_choice_point(NCP2))
,
(NCP is NCP2-NCP1)
,
(copy_term_nat(V, NV), LGs = [], NCP = 0)
).
'$out_neg_answer' :-