summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin.c12
-rw-r--r--ext/Opcode/Opcode.pm6
-rw-r--r--lib/B/Deparse.pm6
-rw-r--r--lib/B/Deparse.t4
-rw-r--r--lib/B/Op_private.pm8
-rw-r--r--lib/builtin.pm32
-rw-r--r--lib/builtin.t36
-rw-r--r--opcode.h26
-rw-r--r--opnames.h4
-rw-r--r--pp.c4
-rw-r--r--pp_proto.h4
-rw-r--r--regen/opcodes4
-rw-r--r--t/lib/warnings/builtin44
-rw-r--r--t/perf/opcount.t18
14 files changed, 107 insertions, 101 deletions
diff --git a/builtin.c b/builtin.c
index 81e351164b..95ecc48cbb 100644
--- a/builtin.c
+++ b/builtin.c
@@ -97,12 +97,12 @@ XS(XS_builtin_func1_scalar)
croak_xs_usage(cv, "arg");
switch(ix) {
- case OP_ISBOOL:
- Perl_pp_isbool(aTHX);
+ case OP_IS_BOOL:
+ Perl_pp_is_bool(aTHX);
break;
- case OP_ISWEAK:
- Perl_pp_isweak(aTHX);
+ case OP_IS_WEAK:
+ Perl_pp_is_weak(aTHX);
break;
case OP_BLESSED:
@@ -205,10 +205,10 @@ static const struct BuiltinFuncDescriptor builtins[] = {
{ "builtin::false", &XS_builtin_false, &ck_builtin_const, BUILTIN_CONST_FALSE },
/* unary functions */
- { "builtin::isbool", &XS_builtin_func1_scalar, &ck_builtin_func1, OP_ISBOOL },
+ { "builtin::is_bool", &XS_builtin_func1_scalar, &ck_builtin_func1, OP_IS_BOOL },
{ "builtin::weaken", &XS_builtin_func1_void, &ck_builtin_func1, OP_WEAKEN },
{ "builtin::unweaken", &XS_builtin_func1_void, &ck_builtin_func1, OP_UNWEAKEN },
- { "builtin::isweak", &XS_builtin_func1_scalar, &ck_builtin_func1, OP_ISWEAK },
+ { "builtin::is_weak", &XS_builtin_func1_scalar, &ck_builtin_func1, OP_IS_WEAK },
{ "builtin::blessed", &XS_builtin_func1_scalar, &ck_builtin_func1, OP_BLESSED },
{ "builtin::refaddr", &XS_builtin_func1_scalar, &ck_builtin_func1, OP_REFADDR },
{ "builtin::reftype", &XS_builtin_func1_scalar, &ck_builtin_func1, OP_REFTYPE },
diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm
index 377659d2f4..051fad7891 100644
--- a/ext/Opcode/Opcode.pm
+++ b/ext/Opcode/Opcode.pm
@@ -6,7 +6,7 @@ use strict;
our($VERSION, @ISA, @EXPORT_OK);
-$VERSION = "1.56";
+$VERSION = "1.57";
use Carp;
use Exporter 'import';
@@ -353,8 +353,8 @@ invert_opset function.
cmpchain_and cmpchain_dup
- isbool
- isweak weaken unweaken
+ is_bool
+ is_weak weaken unweaken
leaveeval -- needed for Safe to operate, is safe
without entereval
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
index b01acda4c4..58d761da4a 100644
--- a/lib/B/Deparse.pm
+++ b/lib/B/Deparse.pm
@@ -53,7 +53,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring
MDEREF_SHIFT
);
-our $VERSION = '1.62';
+our $VERSION = '1.63';
our $AUTOLOAD;
use warnings ();
require feature;
@@ -6631,8 +6631,8 @@ sub builtin1 {
return "builtin::$name($arg)";
}
-sub pp_isbool { $_[0]->maybe_targmy(@_[1,2], \&builtin1, "isbool"); }
-sub pp_isweak { $_[0]->maybe_targmy(@_[1,2], \&builtin1, "isweak"); }
+sub pp_is_bool { $_[0]->maybe_targmy(@_[1,2], \&builtin1, "is_bool"); }
+sub pp_is_weak { $_[0]->maybe_targmy(@_[1,2], \&builtin1, "is_weak"); }
sub pp_weaken { builtin1(@_, "weaken"); }
sub pp_unweaken { builtin1(@_, "unweaken"); }
sub pp_blessed { builtin1(@_, "blessed"); }
diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t
index 2c26c57486..f7420ae338 100644
--- a/lib/B/Deparse.t
+++ b/lib/B/Deparse.t
@@ -3212,8 +3212,8 @@ defer {
# builtin:: functions
# CONTEXT no warnings 'experimental::builtin';
my $x;
-$x = builtin::isbool(undef);
-$x = builtin::isweak(undef);
+$x = builtin::is_bool(undef);
+$x = builtin::is_weak(undef);
builtin::weaken($x);
builtin::unweaken($x);
$x = builtin::blessed(undef);
diff --git a/lib/B/Op_private.pm b/lib/B/Op_private.pm
index 4ef96e93b2..c03cea5375 100644
--- a/lib/B/Op_private.pm
+++ b/lib/B/Op_private.pm
@@ -149,7 +149,7 @@ $bits{$_}{6} = 'OPpPAD_STATE' for qw(lvavref lvref padav padhv padsv pushmark re
$bits{$_}{7} = 'OPpPV_IS_UTF8' for qw(dump goto last next redo);
$bits{$_}{6} = 'OPpREFCOUNTED' for qw(leave leaveeval leavesub leavesublv leavewrite);
$bits{$_}{2} = 'OPpSLICEWARNING' for qw(aslice hslice padav padhv rv2av rv2hv);
-$bits{$_}{4} = 'OPpTARGET_MY' for qw(abs add atan2 ceil chdir chmod chomp chown chr chroot concat cos crypt divide exec exp flock floor getpgrp getppid getpriority hex i_add i_divide i_modulo i_multiply i_subtract index int isbool isweak kill left_shift length link log mkdir modulo multiconcat multiply nbit_and nbit_or nbit_xor ncomplement oct ord pow push rand refaddr reftype rename right_shift rindex rmdir schomp scomplement setpgrp setpriority sin sleep sqrt srand stringify subtract symlink system time unlink unshift utime wait waitpid);
+$bits{$_}{4} = 'OPpTARGET_MY' for qw(abs add atan2 ceil chdir chmod chomp chown chr chroot concat cos crypt divide exec exp flock floor getpgrp getppid getpriority hex i_add i_divide i_modulo i_multiply i_subtract index int is_bool is_weak kill left_shift length link log mkdir modulo multiconcat multiply nbit_and nbit_or nbit_xor ncomplement oct ord pow push rand refaddr reftype rename right_shift rindex rmdir schomp scomplement setpgrp setpriority sin sleep sqrt srand stringify subtract symlink system time unlink unshift utime wait waitpid);
$bits{$_}{0} = 'OPpTRANS_CAN_FORCE_UTF8' for qw(trans transr);
$bits{$_}{5} = 'OPpTRANS_COMPLEMENT' for qw(trans transr);
$bits{$_}{7} = 'OPpTRANS_DELETE' for qw(trans transr);
@@ -403,9 +403,9 @@ $bits{i_preinc}{0} = $bf[0];
@{$bits{index}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]);
$bits{int}{0} = $bf[0];
@{$bits{ioctl}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]);
+$bits{is_bool}{0} = $bf[0];
+$bits{is_weak}{0} = $bf[0];
@{$bits{isa}}{1,0} = ($bf[1], $bf[1]);
-$bits{isbool}{0} = $bf[0];
-$bits{isweak}{0} = $bf[0];
@{$bits{join}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]);
$bits{keys}{0} = $bf[0];
@{$bits{kill}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]);
@@ -849,7 +849,7 @@ our %ops_using = (
OPpSORT_DESCEND => [qw(sort)],
OPpSPLIT_ASSIGN => [qw(split)],
OPpSUBSTR_REPL_FIRST => [qw(substr)],
- OPpTARGET_MY => [qw(abs add atan2 ceil chdir chmod chomp chown chr chroot concat cos crypt divide exec exp flock floor getpgrp getppid getpriority hex i_add i_divide i_modulo i_multiply i_subtract index int isbool isweak kill left_shift length link log mkdir modulo multiconcat multiply nbit_and nbit_or nbit_xor ncomplement oct ord pow push rand refaddr reftype rename right_shift rindex rmdir schomp scomplement setpgrp setpriority sin sleep sqrt srand stringify subtract symlink system time unlink unshift utime wait waitpid)],
+ OPpTARGET_MY => [qw(abs add atan2 ceil chdir chmod chomp chown chr chroot concat cos crypt divide exec exp flock floor getpgrp getppid getpriority hex i_add i_divide i_modulo i_multiply i_subtract index int is_bool is_weak kill left_shift length link log mkdir modulo multiconcat multiply nbit_and nbit_or nbit_xor ncomplement oct ord pow push rand refaddr reftype rename right_shift rindex rmdir schomp scomplement setpgrp setpriority sin sleep sqrt srand stringify subtract symlink system time unlink unshift utime wait waitpid)],
OPpTRANS_CAN_FORCE_UTF8 => [qw(trans transr)],
OPpTRUEBOOL => [qw(blessed grepwhile index length padav padhv pos ref rindex rv2av rv2hv subst)],
OPpUSEINT => [qw(bit_and bit_or bit_xor complement left_shift nbit_and nbit_or nbit_xor ncomplement right_shift sbit_and sbit_or sbit_xor)],
diff --git a/lib/builtin.pm b/lib/builtin.pm
index 29a87d0467..d734b472b7 100644
--- a/lib/builtin.pm
+++ b/lib/builtin.pm
@@ -17,8 +17,8 @@ builtin - Perl pragma to import built-in utility functions
=head1 SYNOPSIS
use builtin qw(
- true false isbool
- weaken unweaken isweak
+ true false is_bool
+ weaken unweaken is_weak
blessed refaddr reftype
ceil floor
);
@@ -48,12 +48,12 @@ pragmas such as L<strict> and L<feature>.
{
my $val = shift;
- use builtin 'isbool';
- return isbool($val) ? "boolean" : "not a boolean";
+ use builtin 'is_bool';
+ return is_bool($val) ? "boolean" : "not a boolean";
}
- # the isbool() function is no longer visible here
- # but may still be called by builtin::isbool()
+ # the is_bool() function is no longer visible here
+ # but may still be called by builtin::is_bool()
Because these functions are imported lexically, rather than by package
symbols, the user does not need to take any special measures to ensure they
@@ -78,7 +78,7 @@ don't accidentally appear as object methods from a class.
Returns the boolean truth value. While any scalar value can be tested for
truth and most defined, non-empty and non-zero values are considered "true"
-by perl, this one is special in that L</isbool> considers it to be a
+by perl, this one is special in that L</is_bool> considers it to be a
distinguished boolean value.
This gives an equivalent value to expressions like C<!!1> or C<!0>.
@@ -88,21 +88,24 @@ This gives an equivalent value to expressions like C<!!1> or C<!0>.
$val = false;
Returns the boolean fiction value. While any non-true scalar value is
-considered "false" by perl, this one is special in that L</isbool> considers
+considered "false" by perl, this one is special in that L</is_bool> considers
it to be a distinguished boolean value.
This gives an equivalent value to expressions like C<!!0> or C<!1>.
-=head2 isbool
+=head2 is_bool
- $bool = isbool($val);
+ $bool = is_bool($val);
Returns true when given a distinguished boolean value, or false if not. A
distinguished boolean value is the result of any boolean-returning builtin
-function (such as C<true> or C<isbool> itself), boolean-returning operator
+function (such as C<true> or C<is_bool> itself), boolean-returning operator
(such as the C<eq> or C<==> comparison tests or the C<!> negation operator),
or any variable containing one of these results.
+This function used to be named C<isbool>. A compatibility alias is provided
+currently but will be removed in a later version.
+
=head2 weaken
weaken($ref);
@@ -118,13 +121,16 @@ value set to C<undef>.
Strengthens a reference, undoing the effects of a previous call to L</weaken>.
-=head2 isweak
+=head2 is_weak
- $bool = isweak($ref);
+ $bool = is_weak($ref);
Returns true when given a weakened reference, or false if not a reference or
not weak.
+This function used to be named C<isweak>. A compatibility alias is provided
+currently but will be removed in a later version.
+
=head2 blessed
$str = blessed($ref);
diff --git a/lib/builtin.t b/lib/builtin.t
index f86553785e..b56e9b7516 100644
--- a/lib/builtin.t
+++ b/lib/builtin.t
@@ -19,51 +19,51 @@ package FetchStoreCounter {
# booleans
{
- use builtin qw( true false isbool );
+ use builtin qw( true false is_bool );
ok(true, 'true is true');
ok(!false, 'false is false');
- ok(isbool(true), 'true is bool');
- ok(isbool(false), 'false is bool');
- ok(!isbool(undef), 'undef is not bool');
- ok(!isbool(1), '1 is not bool');
- ok(!isbool(""), 'empty is not bool');
+ ok(is_bool(true), 'true is bool');
+ ok(is_bool(false), 'false is bool');
+ ok(!is_bool(undef), 'undef is not bool');
+ ok(!is_bool(1), '1 is not bool');
+ ok(!is_bool(""), 'empty is not bool');
my $truevar = (5 == 5);
my $falsevar = (5 == 6);
- ok(isbool($truevar), '$truevar is bool');
- ok(isbool($falsevar), '$falsevar is bool');
+ ok(is_bool($truevar), '$truevar is bool');
+ ok(is_bool($falsevar), '$falsevar is bool');
- ok(isbool(isbool(true)), 'isbool true is bool');
- ok(isbool(isbool(123)), 'isbool false is bool');
+ ok(is_bool(is_bool(true)), 'is_bool true is bool');
+ ok(is_bool(is_bool(123)), 'is_bool false is bool');
# Invokes magic
tie my $tied, FetchStoreCounter => (\my $fetchcount, \my $storecount);
- my $_dummy = isbool($tied);
- is($fetchcount, 1, 'isbool() invokes FETCH magic');
+ my $_dummy = is_bool($tied);
+ is($fetchcount, 1, 'is_bool() invokes FETCH magic');
- $tied = isbool(false);
- is($storecount, 1, 'isbool() TARG invokes STORE magic');
+ $tied = is_bool(false);
+ is($storecount, 1, 'is_bool() TARG invokes STORE magic');
}
# weakrefs
{
- use builtin qw( isweak weaken unweaken );
+ use builtin qw( is_weak weaken unweaken );
my $arr = [];
my $ref = $arr;
- ok(!isweak($ref), 'ref is not weak initially');
+ ok(!is_weak($ref), 'ref is not weak initially');
weaken($ref);
- ok(isweak($ref), 'ref is weak after weaken()');
+ ok(is_weak($ref), 'ref is weak after weaken()');
unweaken($ref);
- ok(!isweak($ref), 'ref is not weak after unweaken()');
+ ok(!is_weak($ref), 'ref is not weak after unweaken()');
weaken($ref);
undef $arr;
diff --git a/opcode.h b/opcode.h
index decd14710c..838b2560ce 100644
--- a/opcode.h
+++ b/opcode.h
@@ -554,8 +554,8 @@ EXTCONST char* const PL_op_name[] = {
"poptry",
"catch",
"pushdefer",
- "isbool",
- "isweak",
+ "is_bool",
+ "is_weak",
"weaken",
"unweaken",
"blessed",
@@ -1401,8 +1401,8 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
Perl_pp_poptry,
Perl_pp_catch,
Perl_pp_pushdefer,
- Perl_pp_isbool,
- Perl_pp_isweak,
+ Perl_pp_is_bool,
+ Perl_pp_is_weak,
Perl_pp_weaken,
Perl_pp_unweaken,
Perl_pp_blessed,
@@ -1822,8 +1822,8 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */
Perl_ck_null, /* poptry */
Perl_ck_null, /* catch */
Perl_ck_null, /* pushdefer */
- Perl_ck_null, /* isbool */
- Perl_ck_null, /* isweak */
+ Perl_ck_null, /* is_bool */
+ Perl_ck_null, /* is_weak */
Perl_ck_null, /* weaken */
Perl_ck_null, /* unweaken */
Perl_ck_null, /* blessed */
@@ -2244,8 +2244,8 @@ EXTCONST U32 PL_opargs[] = {
0x00000400, /* poptry */
0x00000300, /* catch */
0x00000300, /* pushdefer */
- 0x0000011e, /* isbool */
- 0x0000011e, /* isweak */
+ 0x0000011e, /* is_bool */
+ 0x0000011e, /* is_weak */
0x00000100, /* weaken */
0x00000100, /* unweaken */
0x00000106, /* blessed */
@@ -2925,8 +2925,8 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = {
-1, /* poptry */
0, /* catch */
238, /* pushdefer */
- 75, /* isbool */
- 75, /* isweak */
+ 75, /* is_bool */
+ 75, /* is_weak */
0, /* weaken */
0, /* unweaken */
49, /* blessed */
@@ -2973,7 +2973,7 @@ EXTCONST U16 PL_op_private_bitdefs[] = {
0x117c, 0x22b8, 0x09b4, 0x40ec, 0x2648, 0x4864, 0x07c1, /* trans, transr */
0x0fbc, 0x04d8, 0x0067, /* sassign */
0x0c78, 0x0b74, 0x0a70, 0x31cc, 0x05a8, 0x0067, /* aassign */
- 0x4630, 0x0003, /* chomp, schomp, scomplement, sin, cos, exp, log, sqrt, int, hex, oct, abs, ord, chr, chroot, rmdir, isbool, isweak, refaddr, reftype, ceil, floor */
+ 0x4630, 0x0003, /* chomp, schomp, scomplement, sin, cos, exp, log, sqrt, int, hex, oct, abs, ord, chr, chroot, rmdir, is_bool, is_weak, refaddr, reftype, ceil, floor */
0x05b4, 0x31cc, 0x0003, /* pos */
0x4630, 0x0067, /* pow, multiply, i_multiply, divide, i_divide, modulo, i_modulo, add, i_add, subtract, i_subtract */
0x1538, 0x0067, /* repeat */
@@ -3438,8 +3438,8 @@ EXTCONST U8 PL_op_private_valid[] = {
/* POPTRY */ (0),
/* CATCH */ (OPpARG1_MASK),
/* PUSHDEFER */ (OPpARG1_MASK|OPpDEFER_FINALLY),
- /* ISBOOL */ (OPpARG1_MASK|OPpTARGET_MY),
- /* ISWEAK */ (OPpARG1_MASK|OPpTARGET_MY),
+ /* IS_BOOL */ (OPpARG1_MASK|OPpTARGET_MY),
+ /* IS_WEAK */ (OPpARG1_MASK|OPpTARGET_MY),
/* WEAKEN */ (OPpARG1_MASK),
/* UNWEAKEN */ (OPpARG1_MASK),
/* BLESSED */ (OPpARG1_MASK|OPpMAYBE_TRUEBOOL|OPpTRUEBOOL),
diff --git a/opnames.h b/opnames.h
index f03ba7f6ba..5bf8f4903f 100644
--- a/opnames.h
+++ b/opnames.h
@@ -419,8 +419,8 @@ typedef enum opcode {
OP_POPTRY = 402,
OP_CATCH = 403,
OP_PUSHDEFER = 404,
- OP_ISBOOL = 405,
- OP_ISWEAK = 406,
+ OP_IS_BOOL = 405,
+ OP_IS_WEAK = 406,
OP_WEAKEN = 407,
OP_UNWEAKEN = 408,
OP_BLESSED = 409,
diff --git a/pp.c b/pp.c
index b0c6e42031..571b6363f2 100644
--- a/pp.c
+++ b/pp.c
@@ -7212,7 +7212,7 @@ PP(pp_cmpchain_dup)
RETURN;
}
-PP(pp_isbool)
+PP(pp_is_bool)
{
dSP;
dTARGET;
@@ -7225,7 +7225,7 @@ PP(pp_isbool)
RETURN;
}
-PP(pp_isweak)
+PP(pp_is_weak)
{
dSP;
dTARGET;
diff --git a/pp_proto.h b/pp_proto.h
index ed80604737..2490968086 100644
--- a/pp_proto.h
+++ b/pp_proto.h
@@ -133,9 +133,9 @@ PERL_CALLCONV OP *Perl_pp_index(pTHX);
PERL_CALLCONV OP *Perl_pp_int(pTHX);
PERL_CALLCONV OP *Perl_pp_introcv(pTHX);
PERL_CALLCONV OP *Perl_pp_ioctl(pTHX);
+PERL_CALLCONV OP *Perl_pp_is_bool(pTHX);
+PERL_CALLCONV OP *Perl_pp_is_weak(pTHX);
PERL_CALLCONV OP *Perl_pp_isa(pTHX);
-PERL_CALLCONV OP *Perl_pp_isbool(pTHX);
-PERL_CALLCONV OP *Perl_pp_isweak(pTHX);
PERL_CALLCONV OP *Perl_pp_iter(pTHX);
PERL_CALLCONV OP *Perl_pp_join(pTHX);
PERL_CALLCONV OP *Perl_pp_kvaslice(pTHX);
diff --git a/regen/opcodes b/regen/opcodes
index 45391a2c98..7b0316f7ac 100644
--- a/regen/opcodes
+++ b/regen/opcodes
@@ -584,8 +584,8 @@ poptry pop try ck_null @
catch catch {} block ck_null |
pushdefer push defer {} block ck_null |
-isbool boolean type test ck_null fsT1
-isweak weakref type test ck_null fsT1
+is_bool boolean type test ck_null fsT1
+is_weak weakref type test ck_null fsT1
weaken reference weaken ck_null 1
unweaken reference unweaken ck_null 1
blessed blessed ck_null fs1
diff --git a/t/lib/warnings/builtin b/t/lib/warnings/builtin
index 693bfd0d15..0341360ca5 100644
--- a/t/lib/warnings/builtin
+++ b/t/lib/warnings/builtin
@@ -4,73 +4,73 @@ __END__
# builtin.c - booleans
use strict;
use warnings qw(all -void);
-use builtin qw(isbool true false);
-my ($isbool, $true, $false) = (\&isbool, \&true, \&false);
-isbool(0);
+use builtin qw(is_bool true false);
+my ($is_bool, $true, $false) = (\&is_bool, \&true, \&false);
+is_bool(0);
true;
false;
-&isbool(0);
+&is_bool(0);
&true;
&false;
-$isbool->(0);
+$is_bool->(0);
$true->();
$false->();
no warnings 'experimental::builtin';
-isbool(0);
+is_bool(0);
true;
false;
-&isbool(0);
+&is_bool(0);
&true;
&false;
-$isbool->(0);
+$is_bool->(0);
$true->();
$false->();
EXPECT
-Built-in function 'builtin::isbool' is experimental at - line 6.
+Built-in function 'builtin::is_bool' is experimental at - line 6.
Built-in function 'builtin::true' is experimental at - line 7.
Built-in function 'builtin::false' is experimental at - line 8.
-Built-in function 'builtin::isbool' is experimental at - line 9.
+Built-in function 'builtin::is_bool' is experimental at - line 9.
Built-in function 'builtin::true' is experimental at - line 10.
Built-in function 'builtin::false' is experimental at - line 11.
-Built-in function 'builtin::isbool' is experimental at - line 12.
+Built-in function 'builtin::is_bool' is experimental at - line 12.
Built-in function 'builtin::true' is experimental at - line 13.
Built-in function 'builtin::false' is experimental at - line 14.
########
# builtin.c - weakrefs
use strict;
use warnings qw(all -void);
-use builtin qw(weaken unweaken isweak);
-my ($isweak, $weaken, $unweaken) = (\&weaken, \&unweaken, \&isweak);
+use builtin qw(weaken unweaken is_weak);
+my ($is_weak, $weaken, $unweaken) = (\&weaken, \&unweaken, \&is_weak);
my $ref = [];
-isweak($ref);
+is_weak($ref);
weaken($ref);
unweaken($ref);
-&isweak($ref);
+&is_weak($ref);
&weaken($ref);
&unweaken($ref);
-$isweak->($ref);
+$is_weak->($ref);
$weaken->($ref);
$unweaken->($ref);
no warnings 'experimental::builtin';
-isweak($ref);
+is_weak($ref);
weaken($ref);
unweaken($ref);
-&isweak($ref);
+&is_weak($ref);
&weaken($ref);
&unweaken($ref);
-$isweak->($ref);
+$is_weak->($ref);
$weaken->($ref);
$unweaken->($ref);
EXPECT
-Built-in function 'builtin::isweak' is experimental at - line 7.
+Built-in function 'builtin::is_weak' is experimental at - line 7.
Built-in function 'builtin::weaken' is experimental at - line 8.
Built-in function 'builtin::unweaken' is experimental at - line 9.
-Built-in function 'builtin::isweak' is experimental at - line 10.
+Built-in function 'builtin::is_weak' is experimental at - line 10.
Built-in function 'builtin::weaken' is experimental at - line 11.
Built-in function 'builtin::unweaken' is experimental at - line 12.
Built-in function 'builtin::weaken' is experimental at - line 13.
Built-in function 'builtin::unweaken' is experimental at - line 14.
-Built-in function 'builtin::isweak' is experimental at - line 15.
+Built-in function 'builtin::is_weak' is experimental at - line 15.
########
# builtin.c - blessed refs
use strict;
diff --git a/t/perf/opcount.t b/t/perf/opcount.t
index 68e0f2892f..ad58203a98 100644
--- a/t/perf/opcount.t
+++ b/t/perf/opcount.t
@@ -707,20 +707,20 @@ test_opcount(0, "builtin::true/false are replaced with constants",
const => 2,
});
-test_opcount(0, "builtin::isbool is replaced with direct opcode",
- sub { my $x; my $y; $y = builtin::isbool($x); },
+test_opcount(0, "builtin::is_bool is replaced with direct opcode",
+ sub { my $x; my $y; $y = builtin::is_bool($x); },
{
entersub => 0,
- isbool => 1,
+ is_bool => 1,
padsv => 3, # OA_TARGLEX applies so only 3, not 4
sassign => 0,
});
-test_opcount(0, "builtin::isbool gets constant-folded",
- sub { builtin::isbool(123); },
+test_opcount(0, "builtin::is_bool gets constant-folded",
+ sub { builtin::is_bool(123); },
{
entersub => 0,
- isbool => 0,
+ is_bool => 0,
const => 1,
});
@@ -738,11 +738,11 @@ test_opcount(0, "builtin::unweaken is replaced with direct opcode",
unweaken => 1,
});
-test_opcount(0, "builtin::isweak is replaced with direct opcode",
- sub { builtin::isweak([]); },
+test_opcount(0, "builtin::is_weak is replaced with direct opcode",
+ sub { builtin::is_weak([]); },
{
entersub => 0,
- isweak => 1,
+ is_weak => 1,
});
test_opcount(0, "builtin::blessed is replaced with direct opcode",