In perl.git, the branch smoke-me/davem/more_op_sibling has been created
<http://perl5.git.perl.org/perl.git/commitdiff/634cd7469a2a06de5c201cf08139046af75753e8?hp=0000000000000000000000000000000000000000>
at 634cd7469a2a06de5c201cf08139046af75753e8 (commit)
- Log -----------------------------------------------------------------
commit 634cd7469a2a06de5c201cf08139046af75753e8
Author: David Mitchell <[email protected]>
Date: Fri Apr 17 23:59:46 2015 +0100
add Op(MORE|LAST|MAYBE)SIB_set; rm OpSIBLING_set
the OpSIBLING_set() macro just set the op_sibling/op_sibparent field,
and didn't update op_moresib.
Remove this macro, and replace it with the three macros
OpMORESIB_set
OpLASTSIB_set
OpMAYBESIB_set
which also set op_moresib appropriately. These were suggested by Zefram.
Then in the remaining areas in op.c where low-level op_sibling/op_moresib
tweaking is done, use the new macros instead (so if nothing else, they get
used and tested.)
M op.c
M op.h
commit f51257060f14f66b05963b48c8bebc119c67ec28
Author: David Mitchell <[email protected]>
Date: Fri Apr 17 20:38:49 2015 +0100
op_parent(): only exist under -DPERL_OP_PARENT
Make the function Perl_op_parent() only be present in perls built with
-DPERL_OP_PARENT. Previously the function was present in all builds, but
always returned NULL on non PERL_OP_PARENT builds.
M embed.fnc
M embed.h
M ext/B/B.xs
M ext/B/t/b.t
M op.c
M proto.h
commit 5609068d5808fe0a3a1300480ba9c36a0df30b5b
Author: David Mitchell <[email protected]>
Date: Fri Apr 17 20:12:54 2015 +0100
rpeep(): use op_sibling_splice()
There is an optimisation in rpeep() to convert the optree produced
by 'my $x; my $x' into the optree that would have been produced by
'my ($x, $y)', which allows a padrange optimisation to kick in a bit
later.
Currently the optree is morphed at this point by directly using
OpSIBLING_set() etc. This commit makes it use op_sibling_splice() instead.
We can do this following on from the previous commit, which allows
op_sibling_splice() to be used when we don't know the parent, as long as
we are only splicing in the middle of the children, not at either end.
As well as being cleaner, it also serves as a test for the new feature
of op_sibling_splice().
M op.c
commit e7beb4f9aa2f3ac0cbb0e2cd598c07192bd9dc43
Author: David Mitchell <[email protected]>
Date: Fri Apr 17 17:50:36 2015 +0100
op_sibling_splice(): allow NULL parent arg
If the splicing doesn't affect the first or last sibling of an op_sibling
chain, then we don't need access to the parent op of the siblings (to
access/update op_first, op_last, OPf_KIDS etc). So allow an NULL parent
arg in that case.
M embed.fnc
M op.c
M proto.h
commit aef558325605c8435266072812490e933f3aea15
Author: David Mitchell <[email protected]>
Date: Fri Apr 17 16:52:20 2015 +0100
rename op_lastsib to op_moresib, and invert logic
Rather than having a flag which indicates that there are no more siblings,
have a flag which indicates that there are more siblings. This flag was
only introduced during the current blead cycle, so no production releases
know about it.
M dump.c
M ext/B/B.pm
M ext/B/B.xs
M ext/B/t/b.t
M ext/Devel-Peek/t/Peek.t
M op.c
M op.h
M pod/perlguts.pod
commit 8849a7a561cac84a9ea1f7db2cfcfb6764837f96
Author: David Mitchell <[email protected]>
Date: Fri Apr 17 15:15:57 2015 +0100
op_sibling => op_sibparent under PERL_OP_PARENT
On perls built under -DPERL_OP_PARENT, rename the op_sibling OP field
to op_sibparent, since it can now contain either a pointer to the next
sibling if not the last sibling, or back to the parent if it is.
Code written to work under PERL_OP_PARENT should be using macros like
OpSIBLING() rather than accessing op_sibling directly, so this should
be a transparent change. It will also make code naughtily accessing this
field directly give a compile error.
M ext/XS-APItest/APItest.xs
M op.c
M op.h
M pod/perlguts.pod
M pod/perlhacktips.pod
commit 4855299032d5c1defc2dd5a6413683ebfdfdebd2
Author: David Mitchell <[email protected]>
Date: Wed Apr 15 16:05:05 2015 +0100
skip some asserts on non-PERL_OP_PARENT builds
Some asserts I added for for the op_lastsib stuff, while correct
on non-PERL_OP_PARENT builds, aren't necessary, and just increase the
risk of breakage of some hypothetical CPAN module that is doing strange
things.
M op.c
-----------------------------------------------------------------------
--
Perl5 Master Repository