summaryrefslogtreecommitdiff
path: root/pp.c
Commit message (Collapse)AuthorAgeFilesLines
* assert() that every NN argument is not NULL. Otherwise we have theNicholas Clark2008-02-121-0/+4
| | | | | | | | | | | | 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
* In pp_split(), eliminate most (all?) of the conditional calls toNicholas Clark2008-02-011-26/+16
| | | | | sv_2mortal() by conditionally passing SVs_TEMP to newSVpvn_flags(). p4raw-id: //depot/perl@33178
* Make lc/uc/lcfirst/ucfirst warn when passed undef.Rafael Garcia-Suarez2008-01-281-0/+6
| | | | | Naive implementation. p4raw-id: //depot/perl@33088
* Re-order so that the !SvOK() case is last (which should be rare)Nicholas Clark2008-01-131-6/+4
| | | | | Remove the FIXME comment as I had already fixed it. p4raw-id: //depot/perl@32971
* For 5.12: saner behaviour for `length`Nicholas Clark2008-01-121-11/+21
| | | | | | (Make C<length undef> return undef). Patch mostly by Rafael, with some fine tuning by me. p4raw-id: //depot/perl@32969
* Fix compilation issues and warnings with exotic configuration.Marcus Holland-Moritz2008-01-061-1/+1
| | | p4raw-id: //depot/perl@32865
* Replace all reads of RXf_UTF8 with RX_UTF8().Nicholas Clark2008-01-051-2/+2
| | | p4raw-id: //depot/perl@32849
* Add macros mPUSHs() and mXPUSHs() for pushing SVs on the stackMarcus Holland-Moritz2008-01-041-4/+4
| | | | | | and mortalizing them. Use these macros where possible. And also mX?PUSH[inpu] where possible. p4raw-id: //depot/perl@32821
* Add newSVpvs_flags() as a wrapper to newSVpvn_flags(), and reworkNicholas Clark2008-01-031-1/+1
| | | | | sv_2mortal(newSVpvs(...)) constructions to use it. p4raw-id: //depot/perl@32819
* Extend newSVpvn_flags() to also call sv_2mortal() if SVs_TEMP is set inNicholas Clark2008-01-031-4/+6
| | | | | | the flags. Move its implementation just ahead of sv_2mortal()'s for CPU cache locality. Refactor all code that can be to use this. p4raw-id: //depot/perl@32818
* Possible future bugs found by the creation of newSVpvn_flags().Nicholas Clark2008-01-031-1/+1
| | | | | But use newSVhek() in preference when possible. p4raw-id: //depot/perl@32813
* Add a new function newSVpvn_flags(), which takes a third parameter ofNicholas Clark2008-01-021-29/+10
| | | | | | | | | | flag bits. Right now the only flag bit is SVf_UTF8, which will call SvUTF8_on() on the new SV for you. Provide a wrapper newSVpvn_utf8(), which takes a boolean, and passes in SVf_UTF8 if that is true. Refactor the core to use it where possible. It makes the source code clearer and smaller, but seems to be swings and roundabouts on object code size. p4raw-id: //depot/perl@32807
* Wrap all deferences of struct regexp* in macros RX_*() [and forNicholas Clark2008-01-021-26/+26
| | | | | | | 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
* Change Perl_av_iter_p() to return IV* rather than I32* (which meansNicholas Clark2007-12-291-1/+1
| | | | | having to allocate memory where sizeof(IV) > sizeof(I32)). p4raw-id: //depot/perl@32760
* Take code that occurs in three places to take a scalar and ready it toNicholas Clark2007-12-261-7/+1
| | | | | hold a reference, and convert it to a macro define prepare_SV_for_RV(). p4raw-id: //depot/perl@32737
* Eliminate SVt_RV, and use SVt_IV to store plain references.Nicholas Clark2007-12-261-3/+3
| | | | | This frees up a scalar type for first class regular expressions. p4raw-id: //depot/perl@32734
* Swap SVt_RV and SVt_NV in the SV ordering.Nicholas Clark2007-12-261-1/+1
| | | p4raw-id: //depot/perl@32725
* Implement each @array.Nicholas Clark2007-12-201-0/+61
| | | | | | Documentation needed, FIXME for proper 64 bit support of arrays longer than 2**32, re-order the new ops at the end if merging to 5.10.x. p4raw-id: //depot/perl@32680
* Re: overload64.t failuresRick Delaney2007-10-211-9/+17
| | | | | Message-ID: <20071021201351.GY29047@bort.ca> p4raw-id: //depot/perl@32157
* Fix overloading for 64-bit ints (revised)Jerry D. Hedden2007-10-191-87/+87
| | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510710181149s1c096dd9qffa8fe42046e675b@mail.gmail.com> p4raw-id: //depot/perl@32141
* pp_int should treat refs as UVs (not IVs)Jerry D. Hedden2007-10-111-3/+3
| | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510710110723p6cbed55fo558777258061b556@mail.gmail.com> p4raw-id: //depot/perl@32100
* Re: [perl #46011] [RESOLVED] overload "0+" doesn't handle integer resultsRick Delaney2007-10-081-0/+2
| | | | | Message-ID: <20071008023701.GI29047@bort.ca> p4raw-id: //depot/perl@32062
* Re: [perl #46011] overload "0+" doesn't handle integer resultsRick Delaney2007-10-071-9/+25
| | | | | Message-ID: <20071007042214.GH29047@bort.ca> p4raw-id: //depot/perl@32059
* Remove the 'err' keywordRafael Garcia-Suarez2007-09-071-1/+1
| | | p4raw-id: //depot/perl@31812
* Make state $zok = slosh(); behave as the Perl 6 design with an implicitNicholas Clark2007-09-061-0/+13
| | | | | | | | | | | | | | | START block. First time through, call slosh() and assign to $zok. Subsequently neither call slosh() nor assign to $zok. Adds a new op ONCE to control the conditonal call and assign. No change to list context, so state ($zok) = slosh() and (state $zok) = ... etc will still repeatedly evaluate and assign. [Can't fix that before 5.10] Use as an RVALUE is as Larry's design - my $boff = state $zok = ...; will evaluate, assign and return first time, and subsequently act as if it were written my $boff = $zok; FIXME - state $zok = ...; won't deparse - I believe op->op_last isn't being correctly set on the sassign, but I don't know how to fix this. This change may be backed out before 5.10. p4raw-id: //depot/perl@31798
* Re: optimize push @ISA, (was Re: parent.pm at http://corion.net/perl-dev)Brandon Black2007-08-311-0/+5
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60708121336m13dcf9e5uac624fb246f2a79c@mail.gmail.com> p4raw-id: //depot/perl@31770
* misc blead stuffJarkko Hietaniemi2007-08-301-1/+1
| | | | | Message-ID: <46D617B5.3000002@iki.fi> p4raw-id: //depot/perl@31765
* Re: [PATCH] Optimize split //Ævar Arnfjörð Bjarmason2007-08-121-14/+24
| | | | | | From: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Message-Id: <51dd1af80708111333kfd82e12u145b5ba38e23dcce@mail.gmail.com> p4raw-id: //depot/perl@31704
* Optimize split //Ævar Arnfjörð Bjarmason2007-08-091-0/+37
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80708090049p2cf4810ep5a437ad53f64fa78@mail.gmail.com> p4raw-id: //depot/perl@31693
* Fix [perl #43207] lc() or uc() inside sort affect the return value.Rafael Garcia-Suarez2007-06-141-3/+3
| | | p4raw-id: //depot/perl@31377
* Re: mro status, etcBrandon Black2007-04-301-0/+9
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704291527y1b39be37l221ef66e4c828f66@mail.gmail.com> p4raw-id: //depot/perl@31107
* Where possible, use SvIV instead of SvIVX, SvNV instead of SvNVX,Nicholas Clark2007-04-211-6/+6
| | | | | | | | | SvUV instead of SvUVX, and SvPV* variants instead of SvPVX*. Document that the non-x variants are preferable whenever the expression has no side effects. (Compilers perform common subexression elimination). Likewise SvREFCNT_inc simple variants are valid for all cases apart from expressions with side effects. p4raw-id: //depot/perl@31010
* [perl #42614] NAN_COMPARE_BROKEN.DIV_BY_NAN_BUG (with patch) Patrick Dugnolle2007-04-201-0/+4
| | | | | | From: patrick.dugnolle@bnpparibas.com (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.6.HEAD-6655-1176989657-125.42614-75-0@perl.org> p4raw-id: //depot/perl@30991
* fix casting warning in pp_ord()Dave Mitchell2007-04-151-1/+1
| | | p4raw-id: //depot/perl@30965
* Change 18797 (Patch for [perl #9402], known also as "glibc _moddi3 bugNicholas Clark2007-04-121-3/+6
| | | | | | | with negative quads", or also as RedHat bug #65612.) was a bit brute force. In reality, we don't need to have an auto-detecting pp_i_modulo unless we're compiled with 64 bit IVs and on glibc. p4raw-id: //depot/perl@30931
* Turn op_pmreplroot in struct pmop into a real union.Nicholas Clark2007-04-071-4/+6
| | | p4raw-id: //depot/perl@30865
* Re: pmdynflags and thread safetyYves Orton2007-04-041-8/+8
| | | | | Message-ID: <9b18b3110704031646p7ac8dbearf9e41397a5f884d8@mail.gmail.com> p4raw-id: //depot/perl@30841
* Back out changes 30762 and 30763Rafael Garcia-Suarez2007-03-291-4/+3
| | | p4raw-id: //depot/perl@30776
* stop the cargo cult of (MEM_SIZE)~0Jarkko Hietaniemi2007-03-271-1/+1
| | | | | Message-Id: <200703271207.l2RC7qOC443040@kosh.hut.fi> p4raw-id: //depot/perl@30774
* In struct regexp replace the two arrays of I32s accessed via startpNicholas Clark2007-03-261-4/+4
| | | | | | | | | | 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
* Nit to change 30762 by Gisle.Rafael Garcia-Suarez2007-03-261-1/+1
| | | | | Avoids storing the chars removed by 4-arg substr() in void context. p4raw-id: //depot/perl@30763
* Re: substr($megabytes, 30) = Yitzchak Scott-Thoennes2007-03-261-3/+4
| | | | | | From: "Yitzchak Scott-Thoennes" <sthoenna@efn.org> Message-ID: <1119.63.226.247.186.1171347230.squirrel@63.226.247.186> p4raw-id: //depot/perl@30762
* Add a new API function newSV_type, to replace the idiom:Nicholas Clark2007-02-181-2/+1
| | | | | | sv = newSV(0); sv_upgrade(sv, type); p4raw-id: //depot/perl@30347
* These casts to GV are no longer needed.Nicholas Clark2007-02-101-3/+3
| | | p4raw-id: //depot/perl@30195
* The last parameter to gv_stashpv/gv_stashpvn/gv_stashsv is a bitmaskNicholas Clark2007-01-251-1/+1
| | | | | of flags, not a boolean, so correct the documenation and callers. p4raw-id: //depot/perl@29977
* Refactor the common soft-reference code from pp_rv2sv and pp_rv2avNicholas Clark2007-01-211-27/+47
| | | | | | into a single routine Perl_softref2xv(). As soft references are rarely used compared with true references, move this code from pp_hot.c p4raw-id: //depot/perl@29905
* Re: [PATCH] fix unicode split /\s+/SADAHIRO Tomoyuki2007-01-191-16/+20
| | | | | | Message-Id: <20070120005232.D9CC.BQW10602@nifty.com> Date: Sat, 20 Jan 2007 00:52:42 +0900 p4raw-id: //depot/perl@29887
* fix unicode split /\s+/Yves Orton2007-01-191-8/+33
| | | | | Message-ID: <9b18b3110701181714r4f3bc9ebq9ba462eba8338734@mail.gmail.com> p4raw-id: //depot/perl@29880
* Let the regex parser decide if we have a special pattern or not.Yves Orton2007-01-091-1/+1
| | | | | Message-ID: <9b18b3110701081546n2c3f19acy29adc0d233bb848c@mail.gmail.com> p4raw-id: //depot/perl@29730
* Update copyright years in .c filesRafael Garcia-Suarez2007-01-051-1/+1
| | | p4raw-id: //depot/perl@29696