fix excessive trail trimming in SWI call emulation
This commit is contained in:
parent
ba2c0ca2a0
commit
88e188bece
@ -2108,6 +2108,9 @@ PL_close_foreign_frame(fid_t f)
|
|||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
choiceptr cp_b = (choiceptr)(LCL0-(UInt)f);
|
choiceptr cp_b = (choiceptr)(LCL0-(UInt)f);
|
||||||
LOCAL_CurSlot = IntOfTerm(cp_b->cp_a1);
|
LOCAL_CurSlot = IntOfTerm(cp_b->cp_a1);
|
||||||
|
B = cp_b;
|
||||||
|
HB = B->cp_h;
|
||||||
|
Yap_TrimTrail();
|
||||||
B = cp_b->cp_b;
|
B = cp_b->cp_b;
|
||||||
CP = cp_b->cp_cp;
|
CP = cp_b->cp_cp;
|
||||||
ENV = cp_b->cp_env;
|
ENV = cp_b->cp_env;
|
||||||
@ -2115,7 +2118,6 @@ PL_close_foreign_frame(fid_t f)
|
|||||||
DEPTH = cp_b->cp_depth;
|
DEPTH = cp_b->cp_depth;
|
||||||
#endif /* DEPTH_LIMIT */
|
#endif /* DEPTH_LIMIT */
|
||||||
HB = B->cp_h;
|
HB = B->cp_h;
|
||||||
Yap_TrimTrail();
|
|
||||||
if (LOCAL_CurSlot) {
|
if (LOCAL_CurSlot) {
|
||||||
/* we can assume there was a slot before */
|
/* we can assume there was a slot before */
|
||||||
CELL *old_slot;
|
CELL *old_slot;
|
||||||
|
Reference in New Issue
Block a user