diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-13 13:01:52 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-13 13:01:52 +0100 |
commit | 98fe6610b077571e54be1d655e66e1ad657a8910 (patch) | |
tree | 532bceb1ec03d62f050fe0aaa10aae2addb9f312 /warnings.h | |
parent | 26c7b074d5d3f0a79fab5f1c4eb28f38e81b88d2 (diff) | |
download | perl-98fe6610b077571e54be1d655e66e1ad657a8910.tar.gz |
Change S_ckwarn_common() to looping over the packed warning value.
The core never uses WARN3() or WARN4(), and rarely uses WARN2(), so the
previous code, effectively an unwrapped loop, wasn't a speed up. Functionally
equivalent smaller code fits better into CPU caches.
Diffstat (limited to 'warnings.h')
-rw-r--r-- | warnings.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/warnings.h b/warnings.h index 8f891a7511..56b307912d 100644 --- a/warnings.h +++ b/warnings.h @@ -105,6 +105,8 @@ #define ckWARN3_d(w1,w2,w3) Perl_ckwarn_d(aTHX_ packWARN3(w1,w2,w3)) #define ckWARN4_d(w1,w2,w3,w4) Perl_ckwarn_d(aTHX_ packWARN4(w1,w2,w3,w4)) +#define WARNshift 8 + #define packWARN(a) (a ) #define packWARN2(a,b) ((a) | ((b)<<8) ) #define packWARN3(a,b,c) ((a) | ((b)<<8) | ((c)<<16) ) |