[PATCH] Sign extension elimination, new implementation, part 1/N

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Mon Aug 22 07:43:00 GMT 2005


>>And instead of
>>
>>
>>>  /** Data structure IV related functions.  **/
>>
>>write
>>
>>  /* Helper functions for struct see_pre_extension_expr */
> 
> Since every data structure has a specific and different purpose, I thought 
> that it would be best to split the declaration and later the related functions 
> according to it.

The idea is that one can regex-search for "^struct 
see_pre_extension_expr" and get to the right point of the source code; 
there's no need for other information like the fact that a struct is 
"Data structure IV".

> In other words, I tried to split the code by its functionality instead of 
> grouping all the structures together and all the var declaration together.

It's fine if you do it the other way round.  That's the way it is done 
in most of GCC's source code.

I think the idea is that, at a superficial stage of code reading, you do 
not need variable names, and the declarations would only crowd the 
reader's mind.

> Do you think that this concept is wrong, or just the way I expressed 
> myself and all I should do is to rephrase some sentences?

I was not commenting on the concepts.

Thanks,

Paolo



More information about the Gcc-patches mailing list