This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add S_process_optree() function to op.c
authorDavid Mitchell <davem@iabyn.com>
Sat, 14 Jan 2017 16:02:46 +0000 (16:02 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 17 Jan 2017 15:32:54 +0000 (15:32 +0000)
commit01f9673fe8388317fdf7fca63774e3bc0dfd58d3
tree2947473322f85d427a6aaba45303fbc8dbad2607
parente770df115e2ad9be7f44f308e5a2be61181c051e
add S_process_optree() function to op.c

Extract into a new static function, S_process_optree(), some of the common
code that calls rpeep(), finalize_optree() etc in the various
newSUB()-style functions.

There should be no functional changes, except that for formats, pad_tidy()
is now called *after* optimisation. This matches what already happens for
normals subs, and can possibly be regarded as a bug fix - although I can't
think of anything it actually fixes.

There are probably more things that could be consolidated into this
function, but because the details vary amongst the various call sites,
I've left them alone for now.
op.c