diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-04 14:21:05 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-04 14:21:05 +0000 |
commit | 0e4a84deaa95967a479c4ba292f52f944552cb1f (patch) | |
tree | 856ecfb27fbd4b2733a7fab88e32f7d0f26b0ca5 /ext/B/B.pm | |
parent | 713ca5fadd44860c83993b586ad6ee925fb00c2d (diff) | |
download | perl-0e4a84deaa95967a479c4ba292f52f944552cb1f.tar.gz |
Create &B::{IV,PV}::as_string using typeglob assignment rather than goto &
Typeglob assignment avoids compiler work creating the optree for a second
subroutine, and runtime work executing that optree.
Diffstat (limited to 'ext/B/B.pm')
-rw-r--r-- | ext/B/B.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/B/B.pm b/ext/B/B.pm index 4cd55459e1..587b809583 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -105,8 +105,8 @@ sub B::IV::int_value { } sub B::NULL::as_string() {""} -sub B::IV::as_string() {goto &B::IV::int_value} -sub B::PV::as_string() {goto &B::PV::PV} +*B::IV::as_string = \&B::IV::int_value; +*B::PV::as_string = \&B::PV::PV; my $debug; my $op_count = 0; |