Since 5.14, the single-char folds have been calculated at compile time,
either by doing it there, or for properties, setting the swash name to
include a foleded or non-folded version of the property. Thus this
patch could have been done much earlier.
Now, most of the properties are actually computed at compile time by
previous patches, but that isn't relevant to this one.
Thus there really doesn't need to be runtime folding for things that
aren't in the bitmap, except for those things under /d that match only
if the string is in UTF8.
/* Folding in the bitmap is taken care of above, but not for locale (for
* which we have to wait to see what folding is in effect at runtime), and
- * for things not in the bitmap. Set run-time fold flag for these */
- if (FOLD && (LOC || nonbitmap || unicode_alternate)) {
+ * for some things not in the bitmap (only the upper latin folds in this
+ * case, as all other single-char folding has been set above). Set
+ * run-time fold flag for these */
+ if (FOLD && (LOC
+ || (DEPENDS_SEMANTICS
+ && nonbitmap
+ && ! (ANYOF_FLAGS(ret) & ANYOF_NONBITMAP_NON_UTF8))
+ || unicode_alternate))
+ {
ANYOF_FLAGS(ret) |= ANYOF_LOC_NONBITMAP_FOLD;
}