[m-rev.] for review: reassign.m

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Mar 11 23:55:01 AEDT 2002


On 08-Mar-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> +		Uinstr0 = fork(_, _, _),
> +		RevInstrs1 = [Instr0 | RevInstrs0],
> +			% We keep KnownContentsMap. The spawned thread may
> +			% modify some stack variables, but these will include
> +			% only those belonging to the local variables and to
> +			% the output variables of the spawned goal, and these
> +			% are guaranteed to be distinct from all the stack
> +			% variables accessed by the current thread.

This comment is misleading.  An LLDS `fork' instruction is an
unconditional branch (its arguments include two labels, one for the parent
and one for the child), so it doesn't matter what you put here, but for
consistency it should be handled the same as the `goto' instruction.

> +		Uinstr0 = join_and_terminate(_),
> +		RevInstrs1 = [Instr0 | RevInstrs0],
> +			% Other threads may modify any lval.
> +		KnownContentsMap = map__init,
> +		DepLvalMap = map__init

Likewise here, the comment is potentially a bit misleading.
It doesn't matter what you put here, since a `join_and_terminate'
instruction never falls through -- it always terminates the
execution of that Mercury thread.

-- 
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