summaryrefslogtreecommitdiff
path: root/regexec.c
Commit message (Collapse)AuthorAgeFilesLines
* assert() that every NN argument is not NULL. Otherwise we have theNicholas Clark2008-02-121-15/+49
| | | | | | | | | | | | ability to create landmines that will explode under someone in the future when they upgrade their compiler to one with better optimisation. We've already done this at least twice. (Yes, some of the assertions are after code that would already have SEGVd because it already deferences a pointer, but they are put in to make it easier to automate checking that each and every case is covered.) Add a tool, checkARGS_ASSERT.pl, to check that every case is covered. p4raw-id: //depot/perl@33291
* REGEXPs are now stored directly in PL_regex_padav, rather thanNicholas Clark2008-01-111-1/+1
| | | | | | indirectly via RVs. This saves memory, and removes 1 level of pointer indirection. p4raw-id: //depot/perl@32950
* It seems that you don't need to reference count PL_reg_curpm withoutNicholas Clark2008-01-101-0/+5
| | | | | ithreads, so don't waste time doing it there. p4raw-id: //depot/perl@32939
* The correct solution is to reference count the regexp in PL_reg_curpm,Nicholas Clark2008-01-101-3/+6
| | | | | | rather than put in lots of hacks to work round not reference counting it. p4raw-id: //depot/perl@32938
* Change 32899 missed the other double-reference count.Nicholas Clark2008-01-091-1/+1
| | | p4raw-id: //depot/perl@32913
* Correct a long-standing ithreads reference counting anonamly - theNicholas Clark2008-01-081-1/+1
| | | | | | reference count only needs "doubling" when the scalar is pushed onto PL_regex_padav for the second time. p4raw-id: //depot/perl@32899
* Clarify the use of SVf_BREAK on PL_reg_curpm.Nicholas Clark2008-01-071-1/+2
| | | p4raw-id: //depot/perl@32895
* Make REGEXP a type distinct from SV. (Much like AV, CV, GV, HV).Nicholas Clark2008-01-051-5/+5
| | | p4raw-id: //depot/perl@32861
* Fix regexec.c so $^N and $+ are correctly updated so that they work properly ↵Moritz Lenz2008-01-051-2/+13
| | | | | | | | inside of (?{...}) blocks as reported by Moritz Lenz in Subject: Bugs in extended regexp features Message-ID: <477FACED.4000505@casella.verplant.org> p4raw-id: //depot/perl@32857
* Convert all accesses of the member paren_names of struct regexp toNicholas Clark2008-01-051-2/+2
| | | | | | be accessed via RXp_PAREN_NAMES(). (They are entirely within the regexp implementation). p4raw-id: //depot/perl@32853
* Abolish RXf_UTF8. Store the UTF-8-ness of the pattern with SvUTF8().Nicholas Clark2008-01-051-1/+0
| | | p4raw-id: //depot/perl@32852
* Make Perl_pregcomp() use SvUTF8() of the pattern, rather than the flagNicholas Clark2008-01-051-1/+13
| | | | | bit in pmflags, to decide whether the pattern is UTF-8. p4raw-id: //depot/perl@32851
* s/re/rx/ in an assert overlooked during recent renovationsYves Orton2008-01-051-1/+1
| | | p4raw-id: //depot/perl@32850
* Replace all reads of RXf_UTF8 with RX_UTF8().Nicholas Clark2008-01-051-3/+3
| | | p4raw-id: //depot/perl@32849
* Add RX_UTF8(), which is effectively SvUTF8() but for regexps.Nicholas Clark2008-01-051-6/+6
| | | | | | | Remove RXp_PRECOMP() and RXp_WRAPPED(). Change the parameter of S_debug_start_match() from regexp to REGEXP. Change its callers [the only part wrong for 5.10.x] p4raw-id: //depot/perl@32840
* Make struct regexp the body of SVt_REGEXP SVs, REGEXPs become SVs,Nicholas Clark2008-01-021-34/+46
| | | | | | and regexp reference counting is via the regular SV reference counting. This was not as easy at it looks. p4raw-id: //depot/perl@32804
* Wrap all deferences of struct regexp* in macros RX_*() [and forNicholas Clark2008-01-021-8/+8
| | | | | | | regcomp.c and regexec.c RXp_* where necessary] so that in future we can maintain source compatibility when we add an extra level of dereferencing. p4raw-id: //depot/perl@32802
* Wrap all accesses to the members precomp and prelen of struct regexp inNicholas Clark2007-12-281-2/+2
| | | | | | the macros RX_PRECOMP() and RX_PRELEN(). This will allow us to reduce the regexp storage overhead by computing them at retrieve time. p4raw-id: //depot/perl@32753
* First class regexps.Nicholas Clark2007-12-281-6/+18
| | | p4raw-id: //depot/perl@32751
* scalars used in postponed subexpressions aren't first class regexps,Nicholas Clark2007-12-271-1/+3
| | | | | | so don't upgrade them to ORANGE before attaching qr magic. (And don't stop using qr magic once regexps become first class) p4raw-id: //depot/perl@32748
* assert() that the sv_unmagic() in S_regmatch() is unneeded.Nicholas Clark2007-12-271-2/+12
| | | | | Add a comment about the mg_find() that follows. p4raw-id: //depot/perl@32742
* Regexps are now orange.Nicholas Clark2007-12-271-1/+3
| | | | | (Correct a comparison of $] with 5.011 in B.pm) p4raw-id: //depot/perl@32740
* Comment out a now unused variableRafael Garcia-Suarez2007-12-171-1/+2
| | | p4raw-id: //depot/perl@32630
* Fix various bugs in regex engine with mixed utf8/latin pattern and strings. ↵Yves Orton2007-12-171-27/+61
| | | | | | | Related to [perl #36207] among others Message-ID: <9b18b3110712170621h41de2c76k331971e3660abcb0@mail.gmail.com> p4raw-id: //depot/perl@32628
* Re: [perl #47195] $1 suddenly tainted after regexp on utf-8 stringRick Delaney2007-11-071-1/+1
| | | | | | | Message-ID: <20071107001845.GA21000@bort.ca> [plus remove the TODO from the now passing test] p4raw-id: //depot/perl@32236
* misc blead stuffJarkko Hietaniemi2007-08-301-2/+2
| | | | | Message-ID: <46D617B5.3000002@iki.fi> p4raw-id: //depot/perl@31765
* TRIE must use 'yes' state transitions when more than one match possible to ↵Marcus Holland-Moritz2007-08-181-10/+2
| | | | | | | | | | ensure proper scope cleanup. Fix and test for issue raised in: Subject: Very strange interaction between regex and lexical array in blead Message-ID: <20070818015537.0088db31@r2d2> p4raw-id: //depot/perl@31733
* s/\bunicode\b/Unicode/; # For everything not dual lifeNicholas Clark2007-06-241-2/+2
| | | p4raw-id: //depot/perl@31455
* [perl #43159] 5.9.4 regexp capturing wronglyDave Mitchell2007-06-181-6/+0
| | | | | | | | change #28398 accidently made the last branch of an alternation not restore the paren state after failure backtrack. Fix this by removing the last-branch-skips-pushing-a-state optimisation. p4raw-link: @28398 on //depot/perl: 40a824489101168f94fce98aa2824baf40bad402 p4raw-id: //depot/perl@31417
* add test for, and update comments for, old defined($1) oddity.Dave Mitchell2007-06-181-8/+6
| | | | | | | | | Some code in regexec.c had a comment to the effect that without this code, Dynaloader failed (this is back at 5.6.0). Replace the comments with something more specific, and add a test for it (basically without the code $1 is '' rather than undefined sometimes). p4raw-id: //depot/perl@31408
* Silence another VC++ compiler warning (signed/unsigned mismatch in ==)Steve Hay2007-06-051-1/+1
| | | p4raw-id: //depot/perl@31335
* Re: [perl #43015] regex /.*\z/ doesn't matches strings ending with \nYves Orton2007-05-291-1/+1
| | | | | Message-ID: <9b18b3110705281046ib37acb4i7960fe415325270f@mail.gmail.com> p4raw-id: //depot/perl@31303
* tweak some regexp params to avoid warningsYves Orton2007-05-021-1/+1
| | | | | Message-ID: <9b18b3110705011446h2113221cndf70af928d72505@mail.gmail.com> p4raw-id: //depot/perl@31118
* Signedness nit, found by JarkkoRafael Garcia-Suarez2007-04-301-1/+1
| | | p4raw-id: //depot/perl@31109
* Re: [PATCH] Cleanup of the regexp APIÆvar Arnfjörð Bjarmason2007-04-301-3/+3
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80704261922j3db0615wa86ccc4cb65b2713@mail.gmail.com> p4raw-id: //depot/perl@31106
* Re: Analysis of problems with mixed encoding case insensitive matches in ↵Yves Orton2007-04-271-22/+15
| | | | | | | regex engine. Message-ID: <9b18b3110704270709y50ef652ci436b3bb29abca275@mail.gmail.com> p4raw-id: //depot/perl@31102
* Fix a signed/unsigned comparison warningRafael Garcia-Suarez2007-04-271-2/+1
| | | p4raw-id: //depot/perl@31097
* Avoid a SIGBUS caused by passing a U32 pointer to utf8_to_uvchr(),Nicholas Clark2007-04-261-2/+3
| | | | | | which expects a STRLEN pointer. Avoid some signed/unsigned casting warnings by adding casts. p4raw-id: //depot/perl@31093
* Re: Analysis of problems with mixed encoding case insensitive matches in ↵Yves Orton2007-04-261-0/+27
| | | | | | | regex engine. Message-ID: <9b18b3110704240746u461e4bdcl208ef7d7f9c5ef64@mail.gmail.com> p4raw-id: //depot/perl@31081
* Re: [PATCH (incomplete)] Make regcomp use SV* sv, instead of char* exp, ↵Ævar Arnfjörð Bjarmason2007-04-231-3/+1
| | | | | | | char* xend Message-ID: <51dd1af80704211430m6ad1b4afy49b069faa61e33a9@mail.gmail.com> p4raw-id: //depot/perl@31027
* Change meaning of \v, \V, and add \h, \H to match Perl6, add \R to match ↵Yves Orton2007-04-231-1/+135
| | | | | | | PCRE and unicode tr18 Message-ID: <9b18b3110704221434g43457742p28cab00289f83639@mail.gmail.com> p4raw-id: //depot/perl@31026
* Re: pmdynflags and thread safetyYves Orton2007-04-041-4/+3
| | | | | Message-ID: <9b18b3110704031646p7ac8dbearf9e41397a5f884d8@mail.gmail.com> p4raw-id: //depot/perl@30841
* free backtrack track when on unexpected exit, eg /(?{ die })/Dave Mitchell2007-04-011-20/+27
| | | p4raw-id: //depot/perl@30819
* fix $^R scoping bug.Dave Mitchell2007-04-011-17/+13
| | | | | | | | By setting the outer saved $^R to the current $^R just at the end of a successful match, and ensuring that that the savestack doesn't get popped beforehand, the code is simplified and fixes a bug. p4raw-id: //depot/perl@30818
* In struct regexp replace the two arrays of I32s accessed via startpNicholas Clark2007-03-261-61/+52
| | | | | | | | | | and endp with a single array of struct regexp_paren_pair, which has 2 I32 members. PL_regstartp and PL_regendp are replaced with a pointer to regexp_paren_pair. The regexp swap structure now only has one member, so abolish it and store the pointer to the swap array directly. Hopefully keeping the corresponding start and end adjacent in memory will help with cache coherency. p4raw-id: //depot/perl@30769
* Move the declaration of two variables into the only block that usesNicholas Clark2007-03-261-4/+2
| | | | | them. p4raw-id: //depot/perl@30766
* startp and endp can allocate their array of I32s from the same block ofNicholas Clark2007-03-241-2/+2
| | | | | | | memory, and Copy() and free it as one. Probably these two pointers to array should merge into single pointer to an array of structs. p4raw-id: //depot/perl@30745
* Resolve PL_curpm issues with (??{}) and fix corruption of match results when ↵Yves Orton2007-03-221-15/+20
| | | | | | | | | pattern is a qr. Message-ID: <9b18b3110703210239x540f5ad9mdb41c2ea6229ac31@mail.gmail.com> plus two follow-up patches (minor tweaks) p4raw-id: //depot/perl@30678
* feel the the baß (encoding problems in the regex engine)Yves Orton2007-03-201-1/+1
| | | | | Message-ID: <9b18b3110703191740m6bf21942p6521f3016ed8092f@mail.gmail.com> p4raw-id: //depot/perl@30647
* The dMY_CXT added in change 27938 isn't needed when in the PERL_CORE.Nicholas Clark2007-03-131-2/+2
| | | p4raw-id: //depot/perl@30574