my $ri = $perl->add_match_table('_X_RI', Perl_Extension => 1,
Fate => $INTERNAL_ONLY);
- $ri += $gcb->table('RI') if $v_version ge v6.2;
+ if ($v_version ge v6.2) {
+ $ri += $gcb->table('RI');
+ }
+ else {
+ push @tables_that_may_be_empty, $ri->full_name;
+ }
my $specials_begin = $perl->add_match_table('_X_Special_Begin',
Perl_Extension => 1,
It turns out that 98.4% of all Unicode code points match
Regular_Begin. Doing it this way eliminates a table match in
- the previouls implementation for almost all Unicode code points.
+ the previous implementation for almost all Unicode code points.
There is a subtlety with Prepend* which showed up in testing.
Note that the Begin, and only the Begin is required in:
* matched, as it is guaranteed to match the begin */
if (previous_prepend
&& (locinput >= PL_regeol
- || ! swash_fetch(PL_utf8_X_regular_begin,
+ || (! swash_fetch(PL_utf8_X_regular_begin,
+ (U8*)locinput, utf8_target)
+ && ! swash_fetch(PL_utf8_X_special_begin,
(U8*)locinput, utf8_target)))
+ )
{
locinput = previous_prepend;
}