diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2021-11-30 17:37:13 +0000 |
---|---|---|
committer | Paul Evans <leonerd@leonerd.org.uk> | 2021-12-01 22:03:37 +0000 |
commit | 852c1a84672ff049d20d941d4df1decaabf3f3f0 (patch) | |
tree | 5baaf3ce559ae7d06b13b6c740a23bdf0913b267 /pp.c | |
parent | 9ae6f26499e0b2d56c36d730466988a3d5ac8457 (diff) | |
download | perl-852c1a84672ff049d20d941d4df1decaabf3f3f0.tar.gz |
Direct optree implementations of builtin:: functions
Turn builtin::true/false into OP_CONSTs
Add a dedicated OP_ISBOOL, make an efficient op version of builtin::isbool()
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -7212,6 +7212,15 @@ PP(pp_cmpchain_dup) RETURN; } +PP(pp_isbool) +{ + dSP; + SV *arg = POPs; + + PUSHs(boolSV(SvIsBOOL(arg))); + RETURN; +} + /* * ex: set ts=8 sts=4 sw=4 et: */ |