summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-12 16:06:20 +0100
committerNicholas Clark <nick@ccl4.org>2009-10-12 16:06:20 +0100
commita2a5de9516c1b256b060768ac6dad252a3aa3be7 (patch)
treeaeb1473ea930984671f646814f6a7a7802164960 /doop.c
parent5f5991a0d6d8ef99d2643b88a7d9285e35277331 (diff)
downloadperl-a2a5de9516c1b256b060768ac6dad252a3aa3be7.tar.gz
Add Perl_ck_warner(), which combines Perl_ckwarn() and Perl_warner().
Replace ckWARN{,2,3,4}() && Perl_warner() with it, which trades reduced code size (about 0.2%), for 1 more function call if warnings are not enabled. However, if we're now in the L1 or L2 cache when we weren't previously, that's still going to be a speed win.
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/doop.c b/doop.c
index 5cce7edeb9..d3c49b5d46 100644
--- a/doop.c
+++ b/doop.c
@@ -807,9 +807,8 @@ Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size)
}
#ifdef UV_IS_QUAD
else if (size == 64) {
- if (ckWARN(WARN_PORTABLE))
- Perl_warner(aTHX_ packWARN(WARN_PORTABLE),
- "Bit vector size > 32 non-portable");
+ Perl_ck_warner(aTHX_ packWARN(WARN_PORTABLE),
+ "Bit vector size > 32 non-portable");
if (uoffset >= srclen)
retnum = 0;
else if (uoffset + 1 >= srclen)
@@ -875,9 +874,8 @@ Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size)
s[uoffset + 3];
#ifdef UV_IS_QUAD
else if (size == 64) {
- if (ckWARN(WARN_PORTABLE))
- Perl_warner(aTHX_ packWARN(WARN_PORTABLE),
- "Bit vector size > 32 non-portable");
+ Perl_ck_warner(aTHX_ packWARN(WARN_PORTABLE),
+ "Bit vector size > 32 non-portable");
retnum =
((UV) s[uoffset ] << 56) +
((UV) s[uoffset + 1] << 48) +
@@ -968,9 +966,8 @@ Perl_do_vecset(pTHX_ SV *sv)
}
#ifdef UV_IS_QUAD
else if (size == 64) {
- if (ckWARN(WARN_PORTABLE))
- Perl_warner(aTHX_ packWARN(WARN_PORTABLE),
- "Bit vector size > 32 non-portable");
+ Perl_ck_warner(aTHX_ packWARN(WARN_PORTABLE),
+ "Bit vector size > 32 non-portable");
s[offset ] = (U8)((lval >> 56) & 0xff);
s[offset+1] = (U8)((lval >> 48) & 0xff);
s[offset+2] = (U8)((lval >> 40) & 0xff);