[cfe-dev] WIP initialization rewrite

Steve Naroff snaroff at apple.com
Mon Jan 21 10:28:48 PST 2008


On Jan 19, 2008, at 8:56 AM, Eli Friedman wrote:

> I figured I should get this out into the open, since my holding onto
> it isn't very useful.  It's essentially a patch replacing the whole of
> initialization-list processing sema with a version written from
> scratch.
>
> I'm not really asking for review of this, because it has quite a few  
> weaknesses.
>
> 1. It rewrites the whole thing from scratch, which is probably not the
> best idea, even if it is only a few hundred lines.
> 2. I'm not really satisfied with the way this patch is written; it has
> a lot of code duplication. Some of the logic is a bit tricky, and both
> the duplicate loops both within the method and the inablility to reuse
> the logic for codegen/analysis are serious issues.
> 3. It's not complete: I haven't gone over any of the logic required  
> for vectors.
>
> That said, the code does work, and I believe it implements C99 rules
> correctly, so it might be useful source of ideas for Steve or whoever
> else touches this code.

Eli,

When I integrate your patch, I get a significant number of failures.

Since you said the code works, I was surprised by the scope of the  
breakage...

Did you ever run these tests?

Curious,

snaroff

[snaroff:tools/clang/test] snarofflocal% grep FAILED LOG
******************** TEST 'CodeGen/global-with-initialiser.c' FAILED!  
********************
******************** TEST 'CodeGen/globalinit.c' FAILED!  
********************
******************** TEST 'CodeGen/ocu-vector.c' FAILED!  
********************
******************** TEST 'CodeGen/shared-string-literals.c' FAILED!  
********************
******************** TEST 'CodeGen/staticinit.c' FAILED!  
********************
******************** TEST 'CodeGen/string-literal.c' FAILED!  
********************
******************** TEST 'Parser/compound_literal.c' FAILED!  
********************
******************** TEST 'Parser/ocu_vector_components.c' FAILED!  
********************
******************** TEST 'Sema/array-constraint.c' FAILED!  
********************
******************** TEST 'Sema/array-init.c' FAILED!  
********************
******************** TEST 'Sema/carbon.c' FAILED! ********************
******************** TEST 'Sema/cocoa.m' FAILED! ********************

>
>
> -Eli
> <rewritewipdiff.txt>




More information about the cfe-dev mailing list