fix ! in debugger in source mode.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@240 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
bdbcb1e005
commit
e34262878d
28
C/exec.c
28
C/exec.c
@ -301,6 +301,11 @@ p_execute_within(void)
|
|||||||
Prop pe;
|
Prop pe;
|
||||||
Atom a;
|
Atom a;
|
||||||
SMALLUNSGN mod = LookupModule(tmod);
|
SMALLUNSGN mod = LookupModule(tmod);
|
||||||
|
#ifdef SBA
|
||||||
|
choiceptr cut_pt = (choiceptr)IntegerOfTerm(Deref(ARG2));
|
||||||
|
#else
|
||||||
|
choiceptr cut_pt = (choiceptr)(LCL0-IntegerOfTerm(Deref(ARG2)));
|
||||||
|
#endif
|
||||||
|
|
||||||
restart_exec:
|
restart_exec:
|
||||||
if (yap_flags[SPY_CREEP_FLAG]) {
|
if (yap_flags[SPY_CREEP_FLAG]) {
|
||||||
@ -355,7 +360,7 @@ p_execute_within(void)
|
|||||||
XREGS[i] = *pt++;
|
XREGS[i] = *pt++;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return (CallPredicate(pen, B));
|
return (CallPredicate(pen, cut_pt));
|
||||||
}
|
}
|
||||||
} else if (IsAtomOrIntTerm(t)) {
|
} else if (IsAtomOrIntTerm(t)) {
|
||||||
if (IsIntTerm(t)) {
|
if (IsIntTerm(t)) {
|
||||||
@ -365,24 +370,19 @@ p_execute_within(void)
|
|||||||
if (a == AtomTrue || a == AtomOtherwise)
|
if (a == AtomTrue || a == AtomOtherwise)
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
else if (a == AtomCut) {
|
else if (a == AtomCut) {
|
||||||
#ifdef SBA
|
if (TopB != NULL && YOUNGER_CP(TopB,cut_pt)) {
|
||||||
choiceptr pt0 = (choiceptr)IntegerOfTerm(Deref(ARG2));
|
cut_pt = TopB;
|
||||||
#else
|
if (DelayedB == NULL || YOUNGER_CP(cut_pt,DelayedB))
|
||||||
choiceptr pt0 = (choiceptr)(LCL0-IntegerOfTerm(Deref(ARG2)));
|
DelayedB = cut_pt;
|
||||||
#endif
|
|
||||||
if (TopB != NULL && YOUNGER_CP(TopB,pt0)) {
|
|
||||||
pt0 = TopB;
|
|
||||||
if (DelayedB == NULL || YOUNGER_CP(pt0,DelayedB))
|
|
||||||
DelayedB = pt0;
|
|
||||||
}
|
}
|
||||||
/* find where to cut to */
|
/* find where to cut to */
|
||||||
if (SHOULD_CUT_UP_TO(B,pt0)) {
|
if (SHOULD_CUT_UP_TO(B,cut_pt)) {
|
||||||
#ifdef YAPOR
|
#ifdef YAPOR
|
||||||
/* Wow, we're gonna cut!!! */
|
/* Wow, we're gonna cut!!! */
|
||||||
CUT_prune_to(pt0);
|
CUT_prune_to(cut_pt);
|
||||||
#else
|
#else
|
||||||
/* Wow, we're gonna cut!!! */
|
/* Wow, we're gonna cut!!! */
|
||||||
B = pt0;
|
B = cut_pt;
|
||||||
#endif /* YAPOR */
|
#endif /* YAPOR */
|
||||||
HB = PROTECT_FROZEN_H(B);
|
HB = PROTECT_FROZEN_H(B);
|
||||||
}
|
}
|
||||||
@ -392,7 +392,7 @@ p_execute_within(void)
|
|||||||
} else {
|
} else {
|
||||||
/* call may not define new system predicates!! */
|
/* call may not define new system predicates!! */
|
||||||
pe = PredPropByAtom(a, mod);
|
pe = PredPropByAtom(a, mod);
|
||||||
return (CallPredicate(RepPredProp(pe), B));
|
return (CallPredicate(RepPredProp(pe), cut_pt));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Is Pair Term */
|
/* Is Pair Term */
|
||||||
|
Reference in New Issue
Block a user