summaryrefslogtreecommitdiff
path: root/pp_hot.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 /pp_hot.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 'pp_hot.c')
-rw-r--r--pp_hot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 61d8b4371f..16992d47b7 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1675,11 +1675,11 @@ Perl_do_readline(pTHX)
(void)do_close(PL_last_in_gv, FALSE);
}
else if (type == OP_GLOB) {
- if (!do_close(PL_last_in_gv, FALSE) && ckWARN(WARN_GLOB)) {
- Perl_warner(aTHX_ packWARN(WARN_GLOB),
- "glob failed (child exited with status %d%s)",
- (int)(STATUS_CURRENT >> 8),
- (STATUS_CURRENT & 0x80) ? ", core dumped" : "");
+ if (!do_close(PL_last_in_gv, FALSE)) {
+ Perl_ck_warner(aTHX_ packWARN(WARN_GLOB),
+ "glob failed (child exited with status %d%s)",
+ (int)(STATUS_CURRENT >> 8),
+ (STATUS_CURRENT & 0x80) ? ", core dumped" : "");
}
}
if (gimme == G_SCALAR) {