make sure to recover stack before copying exception term.

This commit is contained in:
Vitor Santos Costa 2009-06-14 11:17:12 -05:00
parent 3ae6f583ec
commit b4ff9b492a

View File

@ -1620,10 +1620,12 @@ JumpToEnv(Term t) {
B->cp_env = (CELL *)env[E_E]; B->cp_env = (CELL *)env[E_E];
B->cp_ap = NEXTOP(PredHandleThrow->CodeOfPred,l); B->cp_ap = NEXTOP(PredHandleThrow->CodeOfPred,l);
/* can recover Heap thanks to copy term :-( */ /* can recover Heap thanks to copy term :-( */
B->cp_h = H; /* B->cp_h = H; */
/* I could backtrack here, but it is easier to leave the unwinding /* I could backtrack here, but it is easier to leave the unwinding
to the emulator */ to the emulator */
P = (yamop *)FAILCODE; P = (yamop *)FAILCODE;
/* try to recover space */
H = B->cp_h;
t = clean_trail(t, dbt, B->cp_a1); t = clean_trail(t, dbt, B->cp_a1);
B->cp_a3 = t; B->cp_a3 = t;
if (first_func != NULL) { if (first_func != NULL) {