Re: fdgrowtable() cleanup

2012-09-20 Thread Konstantin Belousov
On Wed, Sep 19, 2012 at 09:04:30PM +0200, Dag-Erling Sm??rgrav wrote: Konstantin Belousov kostik...@gmail.com writes: Dag-Erling Sm??rgrav d...@des.no writes: I assume you mean assignments, not calculations. I trust the compiler to move them to where they are needed - a trivial

Re: fdgrowtable() cleanup

2012-09-19 Thread Konstantin Belousov
On Tue, Sep 18, 2012 at 05:46:23PM +0200, Dag-Erling Sm??rgrav wrote: The patch below my signature improves the legibility of fdgrowtable(), and adds comments explaining the hairier bits. The only functional change is that the code no longer overwrites the old fileflags array when the old

Re: fdgrowtable() cleanup

2012-09-19 Thread Dag-Erling Smørgrav
Konstantin Belousov kostik...@gmail.com writes: Dag-Erling Smørgrav d...@des.no writes: + otable = fdp-fd_ofiles; + ofileflags = fdp-fd_ofileflags; These two new calculations could be unused if the function return early. I assume you mean assignments, not calculations. I trust the

Re: fdgrowtable() cleanup

2012-09-19 Thread Konstantin Belousov
On Wed, Sep 19, 2012 at 02:58:02PM +0200, Dag-Erling Sm??rgrav wrote: Konstantin Belousov kostik...@gmail.com writes: Dag-Erling Sm??rgrav d...@des.no writes: + otable = fdp-fd_ofiles; + ofileflags = fdp-fd_ofileflags; These two new calculations could be unused if the function return

Re: fdgrowtable() cleanup

2012-09-19 Thread Dag-Erling Smørgrav
Konstantin Belousov kostik...@gmail.com writes: Dag-Erling Smørgrav d...@des.no writes: I assume you mean assignments, not calculations. I trust the compiler to move them to where they are needed - a trivial optimization with SSA. It is a dereference before the assignment, so I perceive it

fdgrowtable() cleanup

2012-09-18 Thread Dag-Erling Smørgrav
The patch below my signature improves the legibility of fdgrowtable(), and adds comments explaining the hairier bits. The only functional change is that the code no longer overwrites the old fileflags array when the old table is placed on the freelist; instead, it uses the space actually set