summaryrefslogtreecommitdiff
path: root/opnames.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2017-07-13 09:40:49 +0100
committerDavid Mitchell <davem@iabyn.com>2017-07-27 11:30:23 +0100
commit7b394f128b8d5e84ca0e485c98c8f135baf53b4f (patch)
tree6ec042ce94e3b7cd546fe53ea53394cf5fd010d0 /opnames.h
parenta247dbb235b6ada82425a663c4ebd4f426e4947f (diff)
downloadperl-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 'opnames.h')
0 files changed, 0 insertions, 0 deletions