[m-rev.] for review: il as a foreign language

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Jul 13 01:31:18 AEST 2001


On 13-Jul-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> 
> --- ws3/compiler/il_peephole.m	Thu Jul 12 16:16:12 2001
> +++ ws4/compiler/il_peephole.m	Thu Jul 12 16:24:23 2001
> +	% Succeeds if there is no handwritten code within the current block.
> +:- pred no_handwritten_code(instrs::in, int::in) is semidet.
> +
> +no_handwritten_code([], _).
> +no_handwritten_code([Instr | Instrs], Id) :-
> +	( Instr = il_asm_code(_, _) ->
> +		fail
> +	; Instr = end_block(_, Id) ->
> +		true
> +	; Instr = start_block(_, SkipId) ->
> +		InstrsAfterBlock = skip_over_block(Instrs, SkipId),
> +		no_handwritten_code(InstrsAfterBlock, Id)
> +	; 
> +		no_handwritten_code(Instrs, Id)
> +	).

The comment here doesn't match the code.  I suggest you add
"(excluding sub-blocks)" to the comment.

Otherwise that looks fine.

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