[m-rev.] for review: flatten nested blocks in the mlds

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Feb 29 14:52:51 AEDT 2004


On 27-Feb-2004, Peter Ross <pro at missioncriticalit.com> wrote:
> Estimated hours taken: 1
> Branches: main
> 
> Remove any unnecessary nesting of blocks in the mlds.  This allows us
> to avoid a fixed limit of nesting in the MS Visual C compiler when
> compiling xml.parse.chars.m.
> 
> compiler/ml_optimize.m:
> 	If a list of statements contains a block with no local
> 	variables, then bring the block up one level.

This is not really a complete work-around for the problem, since
ml_optimize.m is not called at all optimization levels.  In particular
it is not called at optimization level -1.  So it might have been better
to fix this in mlds_to_c.m instead.  But I suppose this will do.

> +% If the list of statements contains a block with no local variables,
> +% then bring the block up one level.  This optimization is needed to avoid
> +% a compiler limit in the Microsoft C compiler for too deeply nested blocks.

Please document which version(s) of Microsoft C exhibit the problem.

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