summaryrefslogtreecommitdiff
path: root/regexp.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert SvPVX() to allow lvalue usage, but also add aMarcus Holland-Moritz2008-11-071-0/+2
| | | | | | | MUTABLE_SV() check. Use SvPVX_const() instead of SvPVX() where only a const SV* is available. Also fix two falsely consted pointers in Perl_sv_2pv_flags(). p4raw-id: //depot/perl@34770
* SvPV() does not take a const SV*, which means that the pattern argumentNicholas Clark2008-10-301-1/+1
| | | | | | | | | | to Perl_re_compile() can't be const, which means that the pattern argument to Perl_pregcomp() can't be const, as can't the argument in the function in the regexp engine structure. It's a shame that no-one spotted this earlier. (Again) I may have rendered the documentation inaccurate. p4raw-id: //depot/perl@34672
* Update copyright years.Nicholas Clark2008-10-251-1/+1
| | | p4raw-id: //depot/perl@34585
* Re: [PATCH] readable assertion names, now the restReini Urban2008-06-081-27/+27
| | | | | | From: "Reini Urban" <rurban@x-ray.at> Message-ID: <6910a60806080717h1aaaef1fh425a2ef21a62c9ed@mail.gmail.com> p4raw-id: //depot/perl@34030
* Fix bit-fields for VC [was RE: [perl #50386] GIMME_V broken with 5.10.0/GCC ↵Jan Dubois2008-02-121-2/+2
| | | | | | | | and XS?] From: "Jan Dubois" <jand@activestate.com> Message-ID: <02ee01c8651b$17ef72f0$47ce58d0$@com> p4raw-id: //depot/perl@33292
* Standardise the conditional compilation protection of ({}) fromNicholas Clark2008-01-261-2/+2
| | | | | | | | | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) && !defined(PERL_GCC_PEDANTIC) to #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) because the ({}) construction can be used under __STRICT_ANSI__ (and should be, because it avoids temporary use of PL_Sv). p4raw-id: //depot/perl@33077
* constingRobin Barker2008-01-141-6/+7
| | | | | | From: "Robin Barker" <Robin.Barker@npl.co.uk> Message-ID: <46A0F33545E63740BC7563DE59CA9C6D0939CA@exchsvr2.npl.ad.local> p4raw-id: //depot/perl@32976
* Well, I know *something* passed make test from a clean build beforeNicholas Clark2008-01-111-2/+2
| | | | | | change 32961, and I thought that it was the right thing, but I guess not. It should have read like this. p4raw-id: //depot/perl@32962
* assert that these are the regexps you were looking for.Nicholas Clark2008-01-111-6/+39
| | | | | | | (at least for the most commonly used macros). Remove the duplicate definition of RX_SUBBEG(), which I was sure I'd done earlier. p4raw-id: //depot/perl@32961
* Fix prototype in regexp code following #32851, and regenSteve Hay2008-01-091-1/+1
| | | p4raw-id: //depot/perl@32925
* ReREFCNT_inc() should return a pointer to REGEXP.Nicholas Clark2008-01-071-2/+2
| | | | | | [I don't get warnings about void context here, but I'm sure someone will :-(] p4raw-id: //depot/perl@32890
* Don't allocate the NV slot for SVt_REGEXP.Nicholas Clark2008-01-051-33/+42
| | | p4raw-id: //depot/perl@32859
* In struct regexp move the member paren_names to the IV union.Nicholas Clark2008-01-051-2/+4
| | | p4raw-id: //depot/perl@32854
* Convert all accesses of the member paren_names of struct regexp toNicholas Clark2008-01-051-0/+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-2/+1
| | | p4raw-id: //depot/perl@32852
* Abolish wraplen from struct regexp. We're already storing it in SvCUR.Nicholas Clark2008-01-051-2/+1
| | | p4raw-id: //depot/perl@32845
* Abolish RXp_PRELEN(rx) and RXp_WRAPLEN()Nicholas Clark2008-01-051-7/+5
| | | | | | Fix up some uses of RX_* macros in the block conditionally compiled with STUPID_PATTERN_CHECKS. p4raw-id: //depot/perl@32843
* Abolish wrapped in struct regexp - store the wrapped pattern pointerNicholas Clark2008-01-051-4/+2
| | | | | in the SvPVX(). p4raw-id: //depot/perl@32841
* Add RX_UTF8(), which is effectively SvUTF8() but for regexps.Nicholas Clark2008-01-051-4/+5
| | | | | | | 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
* Fix the compile for -DPERL_OLD_COPY_ON_WRITE (apart from the tenaciousNicholas Clark2008-01-051-2/+3
| | | | | broken window: ../ext/Compress/Raw/Zlib/t/07bufsize.t) p4raw-id: //depot/perl@32837
* Make struct regexp the body of SVt_REGEXP SVs, REGEXPs become SVs,Nicholas Clark2008-01-021-27/+43
| | | | | | 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-16/+41
| | | | | | | 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
* Reorder the external regexp flags to get RXf_PMf_STD_PMMOD into theNicholas Clark2007-12-291-40/+40
| | | | | | | lowest 4 bits (which saves a shift), and the "flags indicating special patterns" into contiguous bits. This makes everything a little tidier, and saves 88 bytes (woohoo!) of object file with -Os on x86 FreeBSD. p4raw-id: //depot/perl@32775
* The position of the modifier flag bits is actually encoded by a rightNicholas Clark2007-12-291-0/+1
| | | | | | | shift 12 in two places, so replace that magic number with a macro RXf_PMf_STD_PMMOD_SHIFT defined adjacent to the flags it interacts with. p4raw-id: //depot/perl@32774
* Note to future self about moving the regexp flag bits around.Nicholas Clark2007-12-291-1/+3
| | | p4raw-id: //depot/perl@32759
* Wrap wrapped and wraplen from struct regexp in macros RW_WRAPPED() andNicholas Clark2007-12-291-0/+3
| | | | | | RX_WRAPLEN() to preserve source compatibility when they get moved around. p4raw-id: //depot/perl@32758
* Eliminate prelen from struct regexp. Possibly we are hardcoding a bitNicholas Clark2007-12-281-2/+4
| | | | | | to much, as the replacement assumes that the wrapping string has exactly 1 character after the wrapped string [specifically ')']. p4raw-id: //depot/perl@32757
* Eliminate precomp from struct regexp. Store the offset of precomp fromNicholas Clark2007-12-281-3/+3
| | | | | | | wrapped in pre_prefix, a 4 bit value. (Maybe only for now) reduce seen_evals from I32 to 28 bits. Will anyone have more than 268435456 eval groups in a regexp? p4raw-id: //depot/perl@32755
* Wrap all accesses to the members precomp and prelen of struct regexp inNicholas Clark2007-12-281-0/+4
| | | | | | 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
* Fix up copyright years for files modified in 2007.Nicholas Clark2007-11-071-1/+1
| | | p4raw-id: //depot/perl@32237
* Add note to regexp.h that modifying RXf_ type flags requires a regen.pl or ↵Yves Orton2007-08-181-0/+14
| | | | | | | | regcomp.pl to update regnodes.h Currently the *NIX makefiles are not set up to update regnodes.h automatically when regexp.h is modified. This at least warns people modifying the list about what they should do. A better solution is needed. p4raw-id: //depot/perl@31734
* Optimize split //Ævar Arnfjörð Bjarmason2007-08-091-0/+1
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80708090049p2cf4810ep5a437ad53f64fa78@mail.gmail.com> p4raw-id: //depot/perl@31693
* /p vs (?p)Abigail2007-06-301-1/+1
| | | | | | | | | | | | | Date: Fri, 29 Jun 2007 23:38:07 +0200 Message-ID: <20070629213807.GA14454@abigail.nl> Subject: [PATCH pod/perlre.pod] Keeping up with the changes. From: Abigail <abigail@abigail.be> Date: Sat, 30 Jun 2007 01:24:36 +0200 Message-ID: <20070629232436.GA15326@abigail.nl> Plus tweaks, and debug enahancements. p4raw-id: //depot/perl@31506
* fix overzealous search and replaceYves Orton2007-06-291-4/+4
| | | p4raw-id: //depot/perl@31498
* Rename various regex defined so that they have distinct prefixes based on ↵Yves Orton2007-06-281-20/+20
| | | | | | | | | | | | | | their usage. RXf_ => flags used in pm_flags argument to regcomp and stored in the regex via rx->extflags PREGf_ => flags stored in rx->intflags RXapif_ => argument flags for regex named capture api RX_BUFF_IDX_ => special indexes to represent $` $' $& used in the numeric capture buffer api PREGf is untouched by this change, but RXf_ is split into RXapif and RX_BUFF_IDX_. p4raw-id: //depot/perl@31497
* Move the RXf_WHITE logic for split " " into the regex engineÆvar Arnfjörð Bjarmason2007-06-281-1/+8
| | | | | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80706281306i4dbba39em3eeb8da1d67ea27c@mail.gmail.com> (with tweaks) p4raw-id: //depot/perl@31495
* SvRX() and SvRXOK() macrosÆvar Arnfjörð Bjarmason2007-06-181-0/+35
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80706172033h1908aa0ge15698204e0b79ed@mail.gmail.com> p4raw-id: //depot/perl@31409
* Re: [PATCH] Callbacks for named captures (%+ and %-)Ævar Arnfjörð Bjarmason2007-06-061-3/+40
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80706031324y5618d519p460da27a2e7fe712@mail.gmail.com> p4raw-id: //depot/perl@31341
* Minor perlreapi.pod cleanupÆvar Arnfjörð Bjarmason2007-05-201-2/+11
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80705160938w13789b63m6d5f4710441ceac@mail.gmail.com> p4raw-id: //depot/perl@31244
* FETCH/STORE/LENGTH callbacks for numbered capture variablesÆvar Arnfjörð Bjarmason2007-05-031-5/+9
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80705011658g1156e14cw4d2b21a8d772ed41@mail.gmail.com> p4raw-id: //depot/perl@31130
* tweak some regexp params to avoid warningsYves Orton2007-05-021-2/+2
| | | | | Message-ID: <9b18b3110705011446h2113221cndf70af928d72505@mail.gmail.com> p4raw-id: //depot/perl@31118
* Re: [PATCH] Cleanup of the regexp APIÆvar Arnfjörð Bjarmason2007-04-301-12/+14
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80704261922j3db0615wa86ccc4cb65b2713@mail.gmail.com> p4raw-id: //depot/perl@31106
* Re: [PATCH (incomplete)] Make regcomp use SV* sv, instead of char* exp, ↵Ævar Arnfjörð Bjarmason2007-04-231-1/+1
| | | | | | | char* xend Message-ID: <51dd1af80704211430m6ad1b4afy49b069faa61e33a9@mail.gmail.com> p4raw-id: //depot/perl@31027
* Re: Proposed changes and to regular expression interfaces in coreÆvar Arnfjörð Bjarmason2007-04-061-0/+1
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80703291552y1073bcb6r954b043eb68a4459@mail.gmail.com> p4raw-id: //depot/perl@30849
* Re: pmdynflags and thread safetyYves Orton2007-04-041-2/+4
| | | | | Message-ID: <9b18b3110704031646p7ac8dbearf9e41397a5f884d8@mail.gmail.com> p4raw-id: //depot/perl@30841
* Reorder the members of various regexp structs to reduce their size onNicholas Clark2007-03-311-10/+10
| | | | | | | | LP64 platforms, by pairing up I32 and U32 members. Notably structs _reg_trie_data, reg_ac_data, regexp and regmatch_state down by 8 bytes, re_save_state by 16, and regmatch_slab up by 48 (ie one more state per slab) p4raw-id: //depot/perl@30815
* precomp in struct regexp can be const char *.Nicholas Clark2007-03-311-1/+2
| | | p4raw-id: //depot/perl@30812
* In struct regexp replace the two arrays of I32s accessed via startpNicholas Clark2007-03-261-12/+8
| | | | | | | | | | 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
* Resolve PL_curpm issues with (??{}) and fix corruption of match results when ↵Yves Orton2007-03-221-1/+11
| | | | | | | | | pattern is a qr. Message-ID: <9b18b3110703210239x540f5ad9mdb41c2ea6229ac31@mail.gmail.com> plus two follow-up patches (minor tweaks) p4raw-id: //depot/perl@30678
* Re: Regexp recursion limit too low?Yves Orton2007-02-261-1/+1
| | | | | Message-ID: <9b18b3110702150822o13a4f240g86463c60e625fb8f@mail.gmail.com> p4raw-id: //depot/perl@30412