meta-calls

moduls vs python
This commit is contained in:
Vitor Santos Costa 2018-02-08 09:56:01 +00:00
parent eee6760f96
commit 0b742f3ae3
3 changed files with 7 additions and 4 deletions

View File

@ -440,10 +440,10 @@ restart_exec:
pen = RepPredProp(PredPropByFunc(f, mod));
/* You thought we would be over by now */
/* but no meta calls require special preprocessing */
if (pen->PredFlags & (MetaPredFlag | UndefPredFlag)) {
// if (pen->PredFlags & (MetaPredFlag | UndefPredFlag)) {
// Term t = copy_execn_to_heap(f, pt, n, arity, mod PASS_REGS);
return (CallMetaCall(t0, mod0 PASS_REGS));
}
//return (CallMetaCall(t0, mod0 PASS_REGS));
//}
/* now let us do what we wanted to do from the beginning !! */
/* I cannot use the standard macro here because
otherwise I would dereference the argument and

View File

@ -1414,7 +1414,6 @@ initialization(_G,_OPT).
OPT, initialization(G0,OPT)),
'$yap_strip_module'(G0,M,G1),
'$expand_term'((M:G1), G),
writeln(G),
(
OPT == now
->

View File

@ -306,6 +306,10 @@ meta_predicate declaration
('$current_choice_point'(CP),AO,'$$cut_by'(CP)),HM,SM,BM,HVars) :- !,
'$expand_goals'(A,A1,AO0,HM,SM,BM,HVars),
'$clean_cuts'(AO0, CP, AO).
'$expand_goals'((:-A),(:-A1),
(:-AO),HM,SM,BM,HVars) :- !,
'$expand_goals'(A,A1,AO0,HM,SM,BM,HVars),
'$clean_cuts'(AO0, CP, AO).
'$expand_goals'(ignore(A),ignore(A1),
('$current_choice_point'(CP),AO,'$$cut_by'(CP)-> true ; true),HM,SM,BM,HVars) :- !,
'$expand_goals'(A,A1,AO0,HM,SM,BM,HVars),