add PMf_CODELIST_PRIVATE flag
authorDavid Mitchell <davem@iabyn.com>
Tue, 1 Nov 2011 16:50:16 +0000 (16:50 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Jun 2012 12:25:51 +0000 (13:25 +0100)
commit867940b89f1d3f001a6df1d888925b9ca246fe96
tree991a8c53521998798452aa071aa5e20523bb6a6d
parent188c19101137d65e1d1aa0bc4df26a0e6287f97d
add PMf_CODELIST_PRIVATE flag

This indicates that the op_code_list field in a PMOP is "private";
that is, it points to a list of DO blocks that we don't own, and
shouldn't free, and whose pad may not match ours.

This will allow us to use the op_code_list field in the runtime case of
literal code, e.g. /$runtime(?{...})/ and qr/$runtime(?{...})/. Here, at
compile-time, we need to make the pre-compiled (?{..}) blocks available to
pp_regcomp, but the list containing those blocks is also the list that is
executed in the lead-up to executing pp_regcomp (while skipping the DO
blocks), so the code is already embedded, and doesn't need freeing.
Furthermore, in the qr// case, the code blocks are actually within a
different sub (an anon one) than the PMOP, so the pads won't match.
dump.c
op.c
op.h