fix longmp in trow not to recover trail. This way we do not need to do
copy_term/2 and we avoid losing the attributed variable stack.
This commit is contained in:
parent
87987d0b85
commit
7207c18e65
2
C/exec.c
2
C/exec.c
@ -1925,6 +1925,8 @@ JumpToEnv(Term t) {
|
||||
B->cp_env = (CELL *)env[E_E];
|
||||
/* cannot recover Heap because of copy term :-( */
|
||||
B->cp_h = H;
|
||||
/* nor can I recover terms */
|
||||
B->cp_tr = TR;
|
||||
/* I could backtrack here, but it is easier to leave the unwinding
|
||||
to the emulator */
|
||||
B->cp_a3 = t;
|
||||
|
@ -723,7 +723,7 @@ CopyTermToArena(Term t, Term arena, int share, UInt arity, Term *newarena, Term
|
||||
CELL *oldH = H;
|
||||
CELL *oldHB = HB;
|
||||
CELL *oldASP = ASP;
|
||||
int res;
|
||||
int res = 0;
|
||||
#if COROUTINING
|
||||
Term old_delay_arena;
|
||||
#endif
|
||||
|
6
C/grow.c
6
C/grow.c
@ -856,9 +856,9 @@ static_growglobal(long size, CELL **ptr, CELL *hsplit)
|
||||
fprintf(Yap_stderr, "%% %cO Total of %g sec expanding stacks \n", vb_msg1, (double)total_delay_overflow_time/1000);
|
||||
}
|
||||
LeaveGrowMode(GrowStackMode);
|
||||
if (hsplit)
|
||||
return GDiff-GDiff0;
|
||||
else
|
||||
if (hsplit) {
|
||||
return size0;
|
||||
} else
|
||||
return GDiff-DelayDiff;
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ send_tracer_message(char *start, char *name, Int arity, char *mname, CELL *args)
|
||||
if (i > 0) fprintf(Yap_stderr, ",");
|
||||
#if DEBUG
|
||||
#if COROUTINING
|
||||
Yap_Portray_delays = FALSE;
|
||||
Yap_Portray_delays = TRUE;
|
||||
#endif
|
||||
#endif
|
||||
omax_depth = max_depth;
|
||||
|
@ -149,7 +149,7 @@ inline EXTERN CELL DelayAdjust (CELL);
|
||||
inline EXTERN CELL
|
||||
DelayAdjust (CELL val)
|
||||
{
|
||||
return (CELL) ((val + DelayDiff));
|
||||
return (CELL) (val + DelayDiff);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1138,10 +1138,8 @@ catch(G, C, A) :-
|
||||
% throw has to be *exactly* after system catch!
|
||||
%
|
||||
throw(Ball) :-
|
||||
% get this off the unwound computation.
|
||||
duplicate_term(Ball,NewBall),
|
||||
% get current jump point
|
||||
'$jump_env_and_store_ball'(NewBall).
|
||||
'$jump_env_and_store_ball'(Ball).
|
||||
|
||||
|
||||
% just create a choice-point
|
||||
|
Reference in New Issue
Block a user