From 1219fb6b6a1605f283b169abea03051beb547669 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 20 Sep 2016 22:49:16 -0500 Subject: [PATCH] meta-pred support --- C/adtdefs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/C/adtdefs.c b/C/adtdefs.c index f9caf1dda..1b8fb6a0c 100755 --- a/C/adtdefs.c +++ b/C/adtdefs.c @@ -16,7 +16,6 @@ *************************************************************************/ #ifdef SCCS static char SccsId[] = "%W% %G%"; - #endif #define ADTDEFS_C @@ -810,7 +809,8 @@ Prop Yap_NewPredPropByFunctor(FunctorEntry *fe, Term cur_mod) { p->cs.p_code.ExpandCode = EXPAND_OP_CODE; p->TimeStampOfPred = 0L; p->LastCallOfPred = LUCALL_ASSERT; - if (cur_mod == TermProlog) + p->MetaEntryOfPred = NULL; + if (cur_mod == TermProlog) p->ModuleOfPred = 0L; else p->ModuleOfPred = cur_mod; @@ -892,6 +892,7 @@ Prop Yap_NewThreadPred(PredEntry *ap USES_REGS) { #if SIZEOF_INT_P == 4 p->ExtraPredFlags = 0L; #endif + p->MetaEntryOfPred = NULL; p->src.OwnerFile = ap->src.OwnerFile; p->OpcodeOfPred = FAIL_OPCODE; p->CodeOfPred = p->cs.p_code.TrueCodeOfPred = (yamop *)(&(p->OpcodeOfPred)); @@ -946,7 +947,8 @@ Prop Yap_NewPredPropByAtom(AtomEntry *ae, Term cur_mod) { p->OpcodeOfPred = UNDEF_OPCODE; p->cs.p_code.ExpandCode = EXPAND_OP_CODE; p->CodeOfPred = p->cs.p_code.TrueCodeOfPred = (yamop *)(&(p->OpcodeOfPred)); - if (cur_mod == TermProlog) + p->MetaEntryOfPred = NULL; + if (cur_mod == TermProlog) p->ModuleOfPred = 0; else p->ModuleOfPred = cur_mod;