fix excessive trail trimming in SWI call emulation

This commit is contained in:
Vítor Santos Costa 2013-12-11 09:04:59 +00:00
parent ba2c0ca2a0
commit 88e188bece
1 changed files with 3 additions and 1 deletions

View File

@ -2108,6 +2108,9 @@ PL_close_foreign_frame(fid_t f)
CACHE_REGS
choiceptr cp_b = (choiceptr)(LCL0-(UInt)f);
LOCAL_CurSlot = IntOfTerm(cp_b->cp_a1);
B = cp_b;
HB = B->cp_h;
Yap_TrimTrail();
B = cp_b->cp_b;
CP = cp_b->cp_cp;
ENV = cp_b->cp_env;
@ -2115,7 +2118,6 @@ PL_close_foreign_frame(fid_t f)
DEPTH = cp_b->cp_depth;
#endif /* DEPTH_LIMIT */
HB = B->cp_h;
Yap_TrimTrail();
if (LOCAL_CurSlot) {
/* we can assume there was a slot before */
CELL *old_slot;