summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-11-11 10:06:11 -0700
committerKarl Williamson <public@khwilliamson.com>2011-11-11 13:30:59 -0700
commitcbcd5ab57a4aefcf531cdd93217554a9b21babab (patch)
tree5b3bc790c2c5b216dbdc98b9d24cf8e3f82d4b0f /pp.c
parent732fbc05bbf5ec0f88eda6450a31c2e7c2b4748d (diff)
downloadperl-cbcd5ab57a4aefcf531cdd93217554a9b21babab.tar.gz
pp.c: Call subroutine instead of repeat code
Now that toLOWER_utf8() has the intelligence to skip going out to swashes for Latin1 code points, it's not so critical to bypass calling it for these (for speed). It simplifies things not to have the intelligence repeated. There is the additional overhead of two function calls (minus the branches saved), but these could be avoided if it comes down to it by making them in-line.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/pp.c b/pp.c
index 5d5b6aee58..5ce73ee1fc 100644
--- a/pp.c
+++ b/pp.c
@@ -4111,24 +4111,6 @@ PP(pp_lc)
U8 tmpbuf[UTF8_MAXBYTES_CASE+1];
while (s < send) {
- if (UTF8_IS_INVARIANT(*s)) {
-
- /* Invariant characters use the standard mappings compiled in.
- */
- *d++ = toLOWER(*s);
- s++;
- }
- else if (UTF8_IS_DOWNGRADEABLE_START(*s)) {
-
- /* As do the ones in the Latin1 range */
- U8 lower = toLOWER_LATIN1(TWO_BYTE_UTF8_TO_UNI(*s, *(s+1)));
- CAT_UNI_TO_UTF8_TWO_BYTE(d, lower);
- s += 2;
- }
- else {
- /* Here, is utf8 not in Latin-1 range, have to go out and get
- * the mappings from the tables. */
-
const STRLEN u = UTF8SKIP(s);
STRLEN ulen;
@@ -4159,7 +4141,6 @@ PP(pp_lc)
Copy(tmpbuf, d, ulen, U8);
d += ulen;
s += u;
- }
} /* End of looping through the source string */
SvUTF8_on(dest);
*d = '\0';