diff options
author | David Mitchell <davem@iabyn.com> | 2017-07-13 09:40:49 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-07-27 11:30:23 +0100 |
commit | 7b394f128b8d5e84ca0e485c98c8f135baf53b4f (patch) | |
tree | 6ec042ce94e3b7cd546fe53ea53394cf5fd010d0 /regen/opcodes | |
parent | a247dbb235b6ada82425a663c4ebd4f426e4947f (diff) | |
download | perl-7b394f128b8d5e84ca0e485c98c8f135baf53b4f.tar.gz |
add boolean context support to several ops
For some ops which return integer values and which have a reasonable
likelihood of being used in a boolean context, set the OPpTRUEBOOL
flag on the op as appropriate, and at runtime return &PL_sv_yes /
&PL_sv_zero rather than an integer value.
This is especially beneficial where the op doesn't have a targ, so has
to create a mortal SV to return the integer value.
Similarly, its a win where it may be expensive to calculate an integer
return value, such as pos() or length() converting between byte and char
offset.
Ops done:
OP_SUBST
OP_AASSIGN
OP_POS
OP_LENGTH
OP_GREPWHILE
Diffstat (limited to 'regen/opcodes')
0 files changed, 0 insertions, 0 deletions