[m-dev.] for review: implementation of --no-allow-hijacks

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu Jul 30 10:44:09 AEST 1998


> > When execution
> > backtracks to that stack frame, it will remove the frame, and backtrack
> > to the one below. Therefore there are no roots reachable from a frame
> > with a do_fail redoip that are not reachable from the frames below it,
> > which means that such frames can be ignored by the garbage collector.
> 
> This conclusion does not hold in the example above.  `X' may be the
> only reference to a live data structure.  The caller may look like
> 
> 	r :-
> 		A = [42],
> 		p(A, L),
> 		s(L).
> 
> `A' is not live after the call to `p', so there will be no reference
> to the term `[42]' in the stack frame for `r'.  At the call to `q',
> the only reference to this term will be the one that holds `X'
> in the stack frame for `p'.

My discussion in my previous mail was addressing your query about
frames with do_fail redoip slots. They were discussing the part of the
usefulness logic that regards reachability via failure; I am sorry if that
was not clear.

In the case above, the scan of the garbage collector of the nondet stack
along the failure path *can and should* ignore the frame of p, due to the
presence of do_fail in its redoip slot. The fact that [42] is live will
be discovered by the interleaved scan of the two stacks following saved
succips.

Zoltan.



More information about the developers mailing list