In perl.git, the branch sprout/rstack has been updated <http://perl5.git.perl.org/perl.git/commitdiff/8471533d46bf609a526e53df6b909049111be86e?hp=429208cbe23c613d43399d533b2e110cf399396e>
discards 429208cbe23c613d43399d533b2e110cf399396e (commit) discards c026846da0ece6f763df62e7692aaa7c6ada2b8a (commit) discards 3b5539564f621321763e11584450cc42a5d8aa09 (commit) discards fc113f972b0a66112cf51db925e20e0ede152b05 (commit) discards 7b4d1203e99155e03127dbd540337211efd53907 (commit) discards d90d52d3314bb0a647ec7fb97bb08f5185a2f65e (commit) discards 2f26dbf226c8b0a1897a3d0d09bbe76ab09c749b (commit) discards a6759e62be4708ab099118fbb95348644e2305c8 (commit) discards 4a5c81bbe79253a4985cb24de375b29350be3f33 (commit) discards b9b2b1370927b593770a49c7b0b9f718e2861f7e (commit) discards 15488f3ca0023897bce345cb60b89c04b44cf13c (commit) - Log ----------------------------------------------------------------- commit 8471533d46bf609a526e53df6b909049111be86e Author: Father Chrysostomos <spr...@cpan.org> Date: Mon Jul 25 23:24:49 2016 -0700 Make core use rstack; copy stack for xsubs UNFINISHED!!! The G_STACK flag will need to be documented in a subsequent commit. M cop.h M embed.fnc M embed.h M perl.c M perl.h M pp.h M pp_hot.c M scope.c commit 2a8e0661a57aa08bea585044fce6cebb7bc447bc Author: Father Chrysostomos <spr...@cpan.org> Date: Mon Aug 29 22:14:00 2016 -0700 av.c:av_store: Handle rstack I do believe this code is unreachable and paranoid, but call me paranoid. M av.c commit 5747d176a9b7ececff89e31ed8caf8bf35f63261 Author: Father Chrysostomos <spr...@cpan.org> Date: Sun Aug 28 23:56:17 2016 -0700 av.c:av_extend: Handle rstack M av.c commit 9dcdac8ab2413f0bfef4e427ce480abe4b1b5126 Author: Father Chrysostomos <spr...@cpan.org> Date: Thu Aug 25 22:15:34 2016 -0700 cop.h: Add G_RSTACK flag This will be implicitly passed to call_sv and call_whatever based on the value of the PERL_STACK_LOCALLY_REFCOUNTED #define. M cop.h commit 028e9429205ef80a90da7f4c6407214416b74fbb Author: Father Chrysostomos <spr...@cpan.org> Date: Mon Aug 8 22:18:44 2016 -0700 Adjust mark macros to handle both stacks Leave the refcounted-stack code disarmed for now, to keep things compilable. M inline.h M pp.h commit 098fc52000c5b4471432b4a6b56d9366b9cf360a Author: Father Chrysostomos <spr...@cpan.org> Date: Wed Aug 10 23:03:43 2016 -0700 perl.c: Inline CALL_LIST_BODY into the only spot that calls it. This just makes the code at that point clearer and easier to edit. M perl.c commit 990e26bd498625e7ae90aa61e0cacd718e61024c Author: Father Chrysostomos <spr...@cpan.org> Date: Mon Aug 8 22:31:46 2016 -0700 sv.c: Clone new refcounted stacks M sv.c commit 9bc2df7ca4774be32d90d94f4adf47b9673da418 Author: Father Chrysostomos <spr...@cpan.org> Date: Sun Jul 31 18:31:32 2016 -0700 New rmarkstack_grow func for rc stack You canât read the new body of the function without seeing stars. M embed.fnc M embed.h M proto.h M scope.c commit dc74df58a5b29c5591a98738a7e219310fac1313 Author: Father Chrysostomos <spr...@cpan.org> Date: Tue Jul 26 22:32:45 2016 -0700 Add rstack_grow function to grow refcounted stack M embed.fnc M embed.h M proto.h M scope.c commit a03882e33024c87b23c467bc041cce3c892f8ce9 Author: Father Chrysostomos <spr...@cpan.org> Date: Mon Jul 18 18:08:28 2016 -0700 perl.h: defines for refcounted stack M perl.h commit 61998a82fb955a1ba2f8ec1b1cecdb65e991c3c6 Author: Father Chrysostomos <spr...@cpan.org> Date: Sat Jul 16 23:08:15 2016 -0700 Add XSUB flag for refcounted stack Subs with this flag will use perlâs default refcounted stack. Other subs will get the stack copied to the old non-refcounted stack when they are called. M cv.h commit 84bae2d2d6e1ff8c86c3a92c7b31ce25233c34fb Author: Father Chrysostomos <spr...@cpan.org> Date: Sat Jul 16 00:52:17 2016 -0700 Add intrp vars for a refcounted stack M embedvar.h M intrpvar.h ----------------------------------------------------------------------- Summary of changes: av.c | 6 ++++-- regexec.c | 27 +++++++++++++++------------ t/re/subst.t | 19 ++++++++++++++++++- 3 files changed, 37 insertions(+), 15 deletions(-) diff --git a/av.c b/av.c index b85c074..20c1fb2 100644 --- a/av.c +++ b/av.c @@ -362,8 +362,10 @@ Perl_av_store(pTHX_ AV *av, SSize_t key, SV *val) ary = AvARRAY(av); if (AvFILLp(av) < key) { if (!AvREAL(av)) { - if (av == PL_curstack && key > PL_stack_sp - PL_stack_base) - PL_stack_sp = PL_stack_base + key; /* XPUSH in disguise */ + if (av == PL_rcurstack && key > PL_rstack_sp - PL_rstack_base) + PL_rstack_sp = PL_rstack_base + key; /* XPUSH in disguise */ + else if (av == PL_curstack && key > PL_stack_sp - PL_stack_base) + PL_stack_sp = PL_stack_base + key; do { ary[++AvFILLp(av)] = NULL; } while (AvFILLp(av) < key); diff --git a/regexec.c b/regexec.c index fad8876..b86cb1b 100644 --- a/regexec.c +++ b/regexec.c @@ -6341,23 +6341,26 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) if (! (to_complement ^ cBOOL(isFOO_lc(FLAGS(scan), (U8) nextchr)))) { sayNO; } + + locinput++; + break; } - else if (UTF8_IS_DOWNGRADEABLE_START(nextchr)) { - if (! (to_complement ^ cBOOL(isFOO_lc(FLAGS(scan), - EIGHT_BIT_UTF8_TO_NATIVE(nextchr, - *(locinput + 1)))))) - { - sayNO; - } - } - else { /* Here, must be an above Latin-1 code point */ + + if (! UTF8_IS_DOWNGRADEABLE_START(nextchr)) { /* An above Latin-1 code point */ _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(locinput, reginfo->strend); goto utf8_posix_above_latin1; } - /* Here, must be utf8 */ - locinput += UTF8SKIP(locinput); - break; + /* Here is a UTF-8 variant code point below 256 and the target is + * UTF-8 */ + if (! (to_complement ^ cBOOL(isFOO_lc(FLAGS(scan), + EIGHT_BIT_UTF8_TO_NATIVE(nextchr, + *(locinput + 1)))))) + { + sayNO; + } + + goto increment_locinput; case NPOSIXD: /* \W or [:^punct:] etc. under /d */ to_complement = 1; diff --git a/t/re/subst.t b/t/re/subst.t index 2de1a7b..d32e7b8 100644 --- a/t/re/subst.t +++ b/t/re/subst.t @@ -11,7 +11,7 @@ BEGIN { require './loc_tools.pl'; } -plan( tests => 270 ); +plan( tests => 271 ); $_ = 'david'; $a = s/david/rules/r; @@ -1102,3 +1102,20 @@ SKIP: { $s =~ s/..\G//g; is($s, "\x{123}", "#RT 126260 gofs"); } + +SKIP: { + if (! locales_enabled('LC_CTYPE')) { + skip "Can't test locale", 1; + } + + # To cause breakeage, we need a locale in which \xff matches whatever + # POSIX class is used in the pattern. Easiest is C, with \W. + fresh_perl_is(' use POSIX qw(locale_h); + setlocale(&POSIX::LC_CTYPE, "C"); + my $s = "\xff"; + $s =~ s/\W//l; + print qq(ok$s\n)', + "ok\n", + {stderr => 1 }, + '[perl #129038 ] s/\xff//l no longer crashes'); +} -- Perl5 Master Repository