summaryrefslogtreecommitdiff
path: root/pp_hot.c
Commit message (Collapse)AuthorAgeFilesLines
* Assigning to DEFSV leaks if PL_defgv's gp_sv isn't set.Marcus Holland-Moritz2008-11-081-1/+1
| | | | | | | | | As Nicholas already noted in a FIXME, assigning to DEFSV should use GvSV instead of GvSVn. This change ensures that, at least under -DPERL_CORE, DEFSV cannot be assigned to and introduces a DEFSV_set macro to allow setting DEFSV. This fixes #53038: map leaks memory. p4raw-id: //depot/perl@34776
* PATCH: Large omnibus patch to clean up the JRRT quotesTom Christiansen2008-11-021-2/+4
| | | | | | Message-ID: <25940.1225611819@chthon> Date: Sun, 02 Nov 2008 01:43:39 -0600 p4raw-id: //depot/perl@34698
* Explicitly specify some printf formats for constant strings.Rafael Garcia-Suarez2008-11-021-5/+5
| | | | | | This is mostly to silence gcc's warning, "format not a string literal and no format arguments". p4raw-id: //depot/perl@34694
* Add MUTABLE_GV(), and eliminate (V *) casts in *.c.Nicholas Clark2008-10-311-10/+11
| | | | | | Can't easily do gv.h, as GvGP() (at least) needs to split into two macros - one const for reading, one non-const for writing. p4raw-id: //depot/perl@34679
* Eliminate (SV *) casts from the rest of *.c, picking up one (further)Nicholas Clark2008-10-301-28/+28
| | | | | erroneous const in dump.c. p4raw-id: //depot/perl@34675
* Use pvs macros instead of pvn where possible.Marcus Holland-Moritz2008-10-291-2/+2
| | | p4raw-id: //depot/perl@34653
* Eliminate (AV *) casts in *.c.Nicholas Clark2008-10-291-7/+7
| | | p4raw-id: //depot/perl@34650
* Add MUTABLE_CV(), and eliminate (CV *) casts in *.c.Nicholas Clark2008-10-291-2/+2
| | | p4raw-id: //depot/perl@34647
* Every remaining (HV *) cast in *.cNicholas Clark2008-10-281-4/+4
| | | p4raw-id: //depot/perl@34629
* Update copyright years.Nicholas Clark2008-10-251-2/+2
| | | p4raw-id: //depot/perl@34585
* Fix memory leak in qr// operator. This was most probablyMarcus Holland-Moritz2008-10-181-0/+1
| | | | | introduced with #30849. p4raw-id: //depot/perl@34506
* Some more missing isGV_with_GP()sBen Morrow2008-06-281-5/+9
| | | | | Message-ID: <20080628160017.GA81579@osiris.mauzo.dyndns.org> p4raw-id: //depot/perl@34092
* Re: [perl #51636] segmentation fault with array tiesVincent Pit2008-05-021-3/+19
| | | | | | From: "Vincent Pit" <perl@profvince.com> Message-ID: <56287.147.210.17.175.1205339860.squirrel@147.210.17.175> p4raw-id: //depot/perl@33778
* /* This code tries to figure out just what went wrong withNicholas Clark2008-04-171-73/+3
| | | | | | | | | | | gv_fetchmethod. It therefore needs to duplicate a lot of the internals of that function. "Duplicate". <snigger>. You said a naughty word. Now sanitised. [All tests pass, but I'm not 100% confident that this code is equivalent in all reachable corner cases, and it may be possible to simplify the error reporting logic now in gv_fetchmethod_flags] p4raw-id: //depot/perl@33702
* Silence warning from VC++ following #33447Steve Hay2008-03-101-0/+1
| | | | | (not all control paths return a value) p4raw-id: //depot/perl@33463
* Refactoring the /Can't return (?:array|hash) to scalar context/ croakNicholas Clark2008-03-061-10/+7
| | | | | logic in pp_rv2av into one place saves 112 bytes here. p4raw-id: //depot/perl@33447
* Chainsaw DEBUG_S out, as suggested by Vincent Pit.Rafael Garcia-Suarez2008-02-261-4/+0
| | | p4raw-id: //depot/perl@33376
* Re: [PATCH] Splitting OP_CONST (Was: pp_const, not, that, hot?)Vincent Pit2008-02-231-8/+1
| | | | | | Message-ID: <47B60D72.50708@profvince.com> Date: Fri, 15 Feb 2008 23:08:50 +0100 p4raw-id: //depot/perl@33356
* Revert change #33302. This change was wrong, since it wasRafael Garcia-Suarez2008-02-141-8/+2
| | | | | | using OP_ENTERSUB as a LISTOP, whereas it's a UNOP. p4raw-link: @33302 on //depot/perl: 781e3f050073176aa21ffc243184a1cb57f4ec92 p4raw-id: //depot/perl@33307
* [perl #47047] Use of inherited AUTOLOAD for non-method is deprecated Rick Delaney2008-02-131-2/+8
| | | | | | From: Rick Delaney (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.6.HEAD-24634-1193800780-55.47047-75-0@perl.org> p4raw-id: //depot/perl@33302
* assert() that every NN argument is not NULL. Otherwise we have theNicholas Clark2008-02-121-0/+9
| | | | | | | | | | | | 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
* Eliminate the OP_SETSTATE, which had been disabled by change 4309.Nicholas Clark2008-01-261-7/+0
| | | p4raw-id: //depot/perl@33072
* Re: struct context now 12.5% smaller than 5.10Benjamin Smith2008-01-261-41/+38
| | | | | | Message-ID: <20080124215537.GB10198@vtrl.co.uk> Date: Thu, 24 Jan 2008 21:55:37 +0000 p4raw-id: //depot/perl@33070
* Using PL_sv_no in place of any !SvOK() maximum removes a little bit ofNicholas Clark2008-01-251-3/+3
| | | | | hot code in pp_iter. p4raw-id: //depot/perl@33068
* In struct block_loop, merge itermax and iterlval into a unionNicholas Clark2008-01-241-7/+6
| | | | | | | | | lval_max_u, as CXt_LOOP_LAZYIV doesn't use iterlval and the other LOOP types don't use itermax. This reduces struct block_loop by 1 IV. As it's the largest component of the unions making up struct context, this reduces struct context. On ILP32 it will now be 56 bytes, down from the 64 of 5.10.x, as I've already removed the element 'label'. p4raw-id: //depot/perl@33063
* Merge CXt_LOOP_STACK's use of itermax for the reverse minimum withNicholas Clark2008-01-241-2/+3
| | | | | iterary, as the two structure members are not used simultaneously. p4raw-id: //depot/perl@33062
* Change the context type of for ($a .. $b) to CXt_LOOP_LAZYIV, andNicholas Clark2008-01-241-1/+2
| | | | | | assert that it isn't using cx->blk_loop.iterlval. Fix a casting bug when assigning a sentinal to cx->blk_loop.iterary. p4raw-id: //depot/perl@33061
* Avoid using cx->blk_loop.itermax when reverse iterating an array.Nicholas Clark2008-01-241-1/+2
| | | p4raw-id: //depot/perl@33060
* Split out foreach iterations of temporary lists on the stack toNicholas Clark2008-01-241-1/+1
| | | | | CXt_LOOP_STACK. Don't use cx->blk_loop.iterary to store PL_curstack. p4raw-id: //depot/perl@33059
* Split CXt_LOOP into CXt_LOOP_PLAIN and CXt_LOOP_FOR, eliminating theNicholas Clark2008-01-241-1/+1
| | | | | CXp_FOREACH flag added as part of given/when. p4raw-id: //depot/perl@33057
* Eliminate the U8 sbu_once from struct subst, and shrink sbu_rflags fromNicholas Clark2008-01-211-2/+2
| | | | | I32 to U8, which reduces the size of the struct by at least 4 bytes. p4raw-id: //depot/perl@33035
* In pp_subst, rxtainted is not a boolean, as it stores 2 bits of values.Nicholas Clark2008-01-211-1/+1
| | | p4raw-id: //depot/perl@33033
* In struct block_sub and block_format, access the members hasargs andNicholas Clark2008-01-201-2/+2
| | | | | | lval via macros CxHASARGS() and CxLVAL(), which will allow the storage location to be changed. p4raw-id: //depot/perl@33017
* Fix range operatorJerry D. Hedden2008-01-151-0/+9
| | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510801141656i325ac69ev8a0af47f9fe72a1e@mail.gmail.com> p4raw-id: //depot/perl@32979
* Rename PERL_MAX_SUB_DEPTH to PERL_SUB_DEPTH_WARN, per Tim Bunce'sRafael Garcia-Suarez2008-01-111-1/+1
| | | | | suggestion p4raw-id: //depot/perl@32955
* Remove code that protected pp_qr against REGEXPs going away duringNicholas Clark2008-01-111-9/+0
| | | | | | | global destruction whilst they were stored via true references in PL_regex_padav. It won't happen again (unless someone manages to get a reference to an OP's regexp, which is also a risk in 5.10 and 5.8) p4raw-id: //depot/perl@32951
* Introduce macro PERL_MAX_SUB_DEPTHRafael Garcia-Suarez2008-01-111-1/+1
| | | p4raw-id: //depot/perl@32949
* Fix leak introduced by change #32873, thanks to NicholasRafael Garcia-Suarez2008-01-091-1/+1
| | | | | p4raw-link: @32873 on //depot/perl: 3a28f3fb1bfd44e4e3dfe6842af867c8c1c9de28 p4raw-id: //depot/perl@32915
* In PL_regexp_padav, store regexps via real references, rather thanNicholas Clark2008-01-081-1/+10
| | | | | | hiding them within IVs. We can do this now that they are real SV pointers. p4raw-id: //depot/perl@32900
* Re: [perl #49264] say behaves as just print on tied filehandleMichael G. Schwern2008-01-061-0/+5
| | | | | Message-ID: <477C3594.9080302@pobox.com> p4raw-id: //depot/perl@32873
* Make REGEXP a type distinct from SV. (Much like AV, CV, GV, HV).Nicholas Clark2008-01-051-1/+1
| | | p4raw-id: //depot/perl@32861
* Replace all reads of RXf_UTF8 with RX_UTF8().Nicholas Clark2008-01-051-1/+1
| | | p4raw-id: //depot/perl@32849
* Fix the compile for -DPERL_OLD_COPY_ON_WRITE (apart from the tenaciousNicholas Clark2008-01-051-4/+5
| | | | | broken window: ../ext/Compress/Raw/Zlib/t/07bufsize.t) p4raw-id: //depot/perl@32837
* Add macros mPUSHs() and mXPUSHs() for pushing SVs on the stackMarcus Holland-Moritz2008-01-041-3/+3
| | | | | | and mortalizing them. Use these macros where possible. And also mX?PUSH[inpu] where possible. p4raw-id: //depot/perl@32821
* Extend newSVpvn_flags() to also call sv_2mortal() if SVs_TEMP is set inNicholas Clark2008-01-031-2/+2
| | | | | | 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
* Add a new function newSVpvn_flags(), which takes a third parameter ofNicholas Clark2008-01-021-3/+1
| | | | | | | | | | 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
* Make struct regexp the body of SVt_REGEXP SVs, REGEXPs become SVs,Nicholas Clark2008-01-021-3/+13
| | | | | | 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-72/+72
| | | | | | | 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
* Move all code that relies on reading the to-be-thrown-away buffer aheadNicholas Clark2007-12-291-3/+1
| | | | | of the call to sv_chop() that throws it away. p4raw-id: //depot/perl@32777
* Fix Perl #49190, tests from Abigail, codefix from me.Yves Orton2007-12-291-5/+5
| | | p4raw-id: //depot/perl@32761