summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2021-11-30 17:37:13 +0000
committerPaul Evans <leonerd@leonerd.org.uk>2021-12-01 22:03:37 +0000
commit852c1a84672ff049d20d941d4df1decaabf3f3f0 (patch)
tree5baaf3ce559ae7d06b13b6c740a23bdf0913b267 /pp.c
parent9ae6f26499e0b2d56c36d730466988a3d5ac8457 (diff)
downloadperl-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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index e37e3dd6d9..c4b84fe940 100644
--- a/pp.c
+++ b/pp.c
@@ -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:
*/