[m-rev.] refactor nondet stack traversal code
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Nov 11 16:55:40 AEDT 2003
On 11-Nov-2003, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 08-Nov-2003, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > static const char *
> > -MR_step_over_nondet_frame(FILE *fp, int level_number, MR_Word *fr)
> > +MR_step_over_nondet_frame(MR_Traverse_Nondet_Frame_Func *func,
> > + void *func_data, FILE *dump_fp, int level_number, MR_Word *fr)
>
> For the agc version, you wouldn't want to pass in a FILE *.
For the agc version, the code passes in NULL.
Note that this function with a FILE * parameter is static; the collector
doesn't call this function directly,l it calls an exported (extern
linkage) function in this file which does not have a FILE * parameter,
and that function calls this one passing NULL. So the use of a FILE *
parameter here is an implementation detail that is internal to this
source file.
> I don't see any reason why I/O should happen in MR_step_over_nondet_frame
> instead of in func.
The reason for that is that when we're stepping over the "terminal top
frame of a nondet side branch", I/O happens, but func doesn't get called.
(That's not a bug, is it? That is, is it right to not traverse the
variables in such a frame?)
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list