[WIP] Remove nested function in elf/dl-lookup.c? (Nested functions considered harmful?)

Ondřej Bílka neleai@seznam.cz
Sat Dec 14 23:10:00 GMT 2013


On Sat, Dec 14, 2013 at 10:58:46AM -0500, Carlos O'Donell wrote:
> Is it me or does reading do_lookup_x get very very complicated
> with the nested function check_match which has access to all
> sorts of function local variables?
> 
> I'm always suspicious of nested functions like this as bad
> programming form since it complicates reading the function.
> 
> Is anyone opposed to rewriting this with a non-nested function
> that clearly shows which arguments are constant, and which are
> modified?
> 
I am for that. Could you show that in this is only refactoring, when
do_lookup_x is always_inlined then both binaries should be same.



More information about the Libc-alpha mailing list