make sure the swi handle to cacheregs is ok when you move around.

small speedup.
This commit is contained in:
Vítor Santos Costa 2015-02-03 02:34:01 +00:00
parent 4526350113
commit 65bcdc541c

View File

@ -214,6 +214,7 @@ restore_absmi_regs(REGSTORE * old_regs)
#else #else
Yap_regp = old_regs; Yap_regp = old_regs;
#endif #endif
LOCAL_PL_local_data_p->reg_cache = old_regs;
} }
#endif /* PUSH_REGS */ #endif /* PUSH_REGS */
@ -2143,9 +2144,8 @@ Yap_regtoregno(wamreg reg)
#endif #endif
static inline void static inline void
prune(choiceptr cp) prune(choiceptr cp USES_REGS)
{ {
CACHE_REGS
#ifdef YAPOR #ifdef YAPOR
CUT_prune_to(cp); CUT_prune_to(cp);
#endif /* YAPOR */ #endif /* YAPOR */