[dmd-internals] dmd commit, revision 821

Brad Roberts braddr at puremagic.com
Mon Dec 27 00:01:31 PST 2010


Would this alternative be better (totally untested)?

// Each pass through the loop can reduce only one level of comma expression. 
// The infinite loop check needs to take this into account. 
int iterationLimit = 200; 
for (b = startblock; b; b = b->Bnext) 
{ 
    if (!b->Belem) 
        continue; 
    int d = el_countCommas(b->Belem); 
    iterationLimit += d; 
} 

The justification being that each comma operator really ought to have a chance
to be reduced, not just the first max number of commas in a single block.

On Mon, 27 Dec 2010, dsource.org wrote:

> Date: Mon, 27 Dec 2010 02:46:28 -0500
> From: dsource.org <noreply at dsource.org>
> Reply-To: Discuss the internals of DMD <dmd-internals at puremagic.com>
> To: dmd-internals at puremagic.com
> Subject: [dmd-internals] dmd commit, revision 821
> 
> dmd commit, revision 821
> 
> 
> user: walter
> 
> msg:
> bugzilla 3681 ICE(go.c): when function takes too long to optimize, only with -O.
> 
> http://www.dsource.org/projects/dmd/changeset/821
> 
> paths changed:
> U   branches/dmd-1.x/src/backend/cdef.h
> U   branches/dmd-1.x/src/backend/el.c
> U   branches/dmd-1.x/src/backend/el.h
> U   branches/dmd-1.x/src/backend/go.c
> U   trunk/src/backend/cdef.h
> U   trunk/src/backend/el.c
> U   trunk/src/backend/el.h
> U   trunk/src/backend/go.c
> 
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
> 


More information about the dmd-internals mailing list