summaryrefslogtreecommitdiff
path: root/ext/B/B.xs
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-11-01 09:56:59 +0000
committerNicholas Clark <nick@ccl4.org>2010-11-01 09:56:59 +0000
commita4aabc83671e88f2620edff3736b7472cc0523d3 (patch)
tree889536831a9ba3e9cef965f4f65fa298be069fe8 /ext/B/B.xs
parent9c09e8a776ed0d07848cea533d48c644a74b4890 (diff)
downloadperl-a4aabc83671e88f2620edff3736b7472cc0523d3.tar.gz
Merge the implementation of B::sv_{undef,no,yes} using ALIAS.
On this platform, this reduces the object code size by around .75K.
Diffstat (limited to 'ext/B/B.xs')
-rw-r--r--ext/B/B.xs22
1 files changed, 10 insertions, 12 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs
index 51ad9a9fb6..3ab820e94e 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -622,9 +622,6 @@ BOOT:
#define B_defstash() PL_defstash
#define B_curstash() PL_curstash
#define B_comppadlist() (PL_main_cv ? CvPADLIST(PL_main_cv) : CvPADLIST(PL_compcv))
-#define B_sv_undef() &PL_sv_undef
-#define B_sv_yes() &PL_sv_yes
-#define B_sv_no() &PL_sv_no
#define B_formfeed() PL_formfeed
#ifdef USE_ITHREADS
#define B_regex_padav() PL_regex_padav
@@ -668,15 +665,6 @@ B_amagic_generation()
B::AV
B_comppadlist()
-B::SV
-B_sv_undef()
-
-B::SV
-B_sv_yes()
-
-B::SV
-B_sv_no()
-
B::HV
B_curstash()
@@ -698,6 +686,16 @@ B_diehook()
MODULE = B PACKAGE = B
+B::SV
+sv_undef()
+ ALIAS:
+ sv_no = 1
+ sv_yes = 2
+ CODE:
+ RETVAL = ix > 1 ? &PL_sv_yes : ix < 1 ? &PL_sv_undef : &PL_sv_no;
+ OUTPUT:
+ RETVAL
+
B::OP
main_root()
ALIAS: