]> git.ipfire.org Git - thirdparty/glibc.git/commit
regex: Unnest nested functions in regcomp.c
authorFangrui Song <maskray@google.com>
Tue, 2 Nov 2021 17:07:59 +0000 (10:07 -0700)
committerFangrui Song <maskray@google.com>
Tue, 2 Nov 2021 17:07:59 +0000 (10:07 -0700)
commitfdcd177fd36c60ddc9cbc6013831413dbd83c3f9
tree7e2cc87b0532e1e835aa890f01cf2cd9c057f658
parentdb432f033d7714c5885838dae7d7fb3bdaa5a850
regex: Unnest nested functions in regcomp.c

This refactor moves four functions out of a nested scope and converts
them into static always_inline functions. collseqwc, table_size,
symb_table, extra are now initialized to zero because they are passed as
function arguments.

On x86-64, .text is 16 byte larger likely due to the 4 stores.
This is nothing compared to the amount of work that regcomp has to do
looking up the collation weights, or other functions.

If the non-buildable `sysdeps/generic/dl-machine.h` doesn't count,
this patch removes the last `auto inline` usage from glibc.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
posix/regcomp.c