summaryrefslogtreecommitdiff
path: root/scope.c
Commit message (Collapse)AuthorAgeFilesLines
* Add save_adelete()/SAVEADELETE() to save on the stack an array element deleteVincent Pit2008-12-281-0/+18
|
* Fix for tainting regression in a test of Text::Template spotted byNicholas Clark2008-12-031-0/+4
| | | | | Andreas' smoker. p4raw-id: //depot/perl@34987
* The temporary SV created in Perl_save_helem_flags() to store the keyNicholas Clark2008-12-011-2/+1
| | | | | | can be freed immediately after it is used, as it is unrelated to anything else. This folds SvREFCNT_dec()s on two code paths into one. p4raw-id: //depot/perl@34973
* Change 34966 should also have removed the SSCHECK(4); fromNicholas Clark2008-12-011-1/+0
| | | | | Perl_save_hints(). p4raw-id: //depot/perl@34970
* Implement Perl_save_delete() using save_pushptri32ptr().Nicholas Clark2008-12-011-5/+1
| | | p4raw-id: //depot/perl@34968
* Re-order Perl_save_delete() to PTR, INT, PTR.Nicholas Clark2008-12-011-2/+3
| | | p4raw-id: //depot/perl@34967
* Add S_save_pushptri32ptr() and use it to re-implement Perl_save_hints()Nicholas Clark2008-12-011-9/+17
| | | | | and Perl_save_aelem(). p4raw-id: //depot/perl@34966
* Move the implmentation of SAVEHINTS() into a new Perl_save_hints() inNicholas Clark2008-12-011-0/+19
| | | | | | scope.c. "Inlined" macro functions in scope.h are actually space inefficient. p4raw-id: //depot/perl@34965
* For SAVEHINTS(), re-order the savestack to be (?:PTR, )? INT, PTR.Nicholas Clark2008-12-011-1/+1
| | | | | This brings it to the same order as save_aelem() or save_pushi32ptr(). p4raw-id: //depot/perl@34964
* Expose save_pushi32ptr() and implement SAVECOPARYBASE() with it.Nicholas Clark2008-12-011-2/+2
| | | p4raw-id: //depot/perl@34963
* Expose save_pushptrptr() and implement SAVESWITCHSTACK() with it.Nicholas Clark2008-12-011-2/+2
| | | p4raw-id: //depot/perl@34960
* Refactor all of the code of the formNicholas Clark2008-11-301-23/+21
| | | | | | | | | SSCHECK(3); SSPUSHINT(i); SSPUSHPTR(ptr); SSPUSHINT(type); into a static function S_save_pushi32ptr(). p4raw-id: //depot/perl@34959
* Refactor all of the code of the formNicholas Clark2008-11-301-56/+26
| | | | | | | | | | | SSCHECK(3); SSPUSHPTR(ptr1); SSPUSHPTR(ptr2); SSPUSHINT(type); into a static function S_save_pushptrptr(). It might be possible to make some of its callers trivial macros, and so eliminate them as functions. But start with the easy part. p4raw-id: //depot/perl@34957
* Convert all the scope save functions of the formNicholas Clark2008-11-301-42/+3
| | | | | | | | | SSCHECK(2); SSPUSHPTR(o); SSPUSHINT(SAVEt_FREEOP); into a single function Perl_save_pushptr(ptr, type), which the others call. Implement the others as macros. This reduces the object code size. p4raw-id: //depot/perl@34956
* This feels like a more robust location than that of change 34954.Nicholas Clark2008-11-301-2/+2
| | | p4raw-id: //depot/perl@34955
* Proposed fix for -T -d:NYTProf regression. Probably this is a "missing"Nicholas Clark2008-11-301-0/+2
| | | | | part of change 24943. p4raw-id: //depot/perl@34954
* Re: [perl #60360] [PATCH] UPDATED: local $SIG{FOO} = sub {...}; sets signal ↵Chip Salzenberg2008-11-131-8/+8
| | | | | | | | | | | | handler to SIG_DFL Message-ID: <20081112234504.GI2062@tytlal.topaz.cx> Updated patch to retain source compatibility. Plus using the correct PERL_ARGS_ASSERT_SAVE_HELEM_FLAGS macro and running make regen. p4raw-id: //depot/perl@34829
* Re: [perl #60360] [PATCH] local $SIG{FOO} = sub {...}; sets signalChip Salzenberg2008-11-121-9/+9
| | | | | Message-ID: <20081111000040.GB19329@tytlal.topaz.cx> p4raw-id: //depot/perl@34819
* 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
* Add MUTABLE_GV(), and eliminate (V *) casts in *.c.Nicholas Clark2008-10-311-5/+5
| | | | | | 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-24/+24
| | | | | erroneous const in dump.c. p4raw-id: //depot/perl@34675
* Eliminate (AV *) casts in *.c.Nicholas Clark2008-10-291-8/+8
| | | p4raw-id: //depot/perl@34650
* Every remaining (HV *) cast in *.cNicholas Clark2008-10-281-6/+6
| | | p4raw-id: //depot/perl@34629
* Update copyright years.Nicholas Clark2008-10-251-2/+2
| | | p4raw-id: //depot/perl@34585
* Clarify which save types are in mathoms, which aren't used, and whichNicholas Clark2008-10-161-9/+14
| | | | | still are in use. p4raw-id: //depot/perl@34494
* Chainsaw DEBUG_S out, as suggested by Vincent Pit.Rafael Garcia-Suarez2008-02-261-4/+0
| | | p4raw-id: //depot/perl@33376
* assert() that every NN argument is not NULL. Otherwise we have theNicholas Clark2008-02-121-0/+83
| | | | | | | | | | | | 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
* Investigation reveals that the work of restoring the iterator to theNicholas Clark2008-01-261-9/+12
| | | | | | | | | | | | | | | | | pad is shared between POPLOOP, using itersave, and the end of scope restore action requested by Perl_save_padsv(). In fact, the only user of SAVEt_PADSV is pp_enteriter, and it already provides enough information to allow it to perform the sv_2mortal() in POPLOOP. So make it do so. Rather than creating a new routine, use the existing routine because nothing else (at least nothing else known to Google's codesearch) uses it. But rename it just in case something we can't see is being naughty and using our private functions - they will get link errors against 5.12. All this means that itersave is now redundant. So remove it. This makes struct context 48 bytes on ILP32 platforms with 32bit IVs, down from 64 bytes in 5.10. 33% more context stack in the same memory. p4raw-id: //depot/perl@33080
* POPLOOP is actually doing all the work of Perl_save_padsv() already!Nicholas Clark2008-01-261-1/+1
| | | p4raw-id: //depot/perl@33078
* Re: struct context now 12.5% smaller than 5.10Benjamin Smith2008-01-261-6/+5
| | | | | | Message-ID: <20080124215537.GB10198@vtrl.co.uk> Date: Thu, 24 Jan 2008 21:55:37 +0000 p4raw-id: //depot/perl@33070
* In struct block_loop, merge itermax and iterlval into a unionNicholas Clark2008-01-241-1/+1
| | | | | | | | | 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-1/+1
| | | | | 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-0/+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
* Split CXt_LOOP into CXt_LOOP_PLAIN and CXt_LOOP_FOR, eliminating theNicholas Clark2008-01-241-1/+2
| | | | | CXp_FOREACH flag added as part of given/when. p4raw-id: //depot/perl@33057
* In struct block_subst, access the member once via a macro CxONCE()Nicholas Clark2008-01-211-1/+1
| | | | | which will allow the storage location to be changed. p4raw-id: //depot/perl@33034
* In struct block_eval, access the members old_in_eval and old_op_typeNicholas Clark2008-01-211-3/+3
| | | | | | via macros CxOLD_IN_EVAL() and CxOLD_OP_TYPE(), which will allow the storage location to be changed. p4raw-id: //depot/perl@33029
* In struct block_sub and block_format, access the members hasargs andNicholas Clark2008-01-201-4/+3
| | | | | | lval via macros CxHASARGS() and CxLVAL(), which will allow the storage location to be changed. p4raw-id: //depot/perl@33017
* Split struct block_sub into struct block_sub and struct block_format.Nicholas Clark2008-01-201-10/+10
| | | | | | (CXt_SUB and CXt_FORMAT were using some comon members, but some members were only for one or the other.) p4raw-id: //depot/perl@33014
* In struct block_loop access element label via the macro CxLABEL()Nicholas Clark2008-01-201-2/+1
| | | | | (for the places that aren't about to change) p4raw-id: //depot/perl@33010
* Removes the code that is supposed to restore magic on leaving theRafael Garcia-Suarez2007-06-291-15/+2
| | | | | | | | | | | | | | | localization of an array or a hash. This fixes some memory leaks. Basically we were overwriting the magic of the outer value (value from the outer scope) by the magic of the inner value (therefore making that outer magic leaking in memory). But that inner magic was created by mg_localize() by copying *some* of the outer magic. Consequently the outer value already has that magic. So just keep it and don't bother. That change might introduce obscure bugs. On the other hand, it might also cure obscure bugs, related to the inner value acquiring container magic during its lifetime, or to the outer value loosing non-container magic. No test in the test suite seems to test that. p4raw-id: //depot/perl@31505
* blead segfaults on local *@; eval {1} because ERRSV assumes thatNicholas Clark2007-05-311-0/+8
| | | | | | | GvSV(PL_errgv) is always non-NULL. That stopped being the case with change 25009 (ish) - when we stopped automatically creating a(n unused) SV at GV creation time. p4raw-id: //depot/perl@31313
* Re: localising hash element by variableBo Lindbergh2007-05-291-1/+1
| | | | | Message-Id: <BC2C451F-B286-4D38-923E-E3B473F7B5E1@hagernas.com> p4raw-id: //depot/perl@31301
* Re: mro status, etcBrandon Black2007-04-301-2/+3
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704291527y1b39be37l221ef66e4c828f66@mail.gmail.com> p4raw-id: //depot/perl@31107
* Un-mathom Perl_save_I16Jerry D. Hedden2007-04-231-0/+10
| | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510704230610t13c62378s381eaceae3e7e9b1@mail.gmail.com> p4raw-id: //depot/perl@31033
* Re: new C3 MRO patchBrandon Black2007-04-191-2/+2
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704171114k29b0460el5b08ce5185d55ed5@mail.gmail.com> p4raw-id: //depot/perl@30980
* Get further through the build with read-only optrees. Free()ing copsNicholas Clark2007-04-041-0/+8
| | | | | | | | | as currently implemented seems to want write activity to them. Also we save a field in PL_curcop at one point, and sometimes this can be in a read only COP. If so, the end of scope restoration is always to the same value, but it's easier to cheat and skip the restoration than to dig around and avoid the save. p4raw-id: //depot/perl@30843
* Remove the other 4 bits of MAD code designed to abort on local $^L.Nicholas Clark2007-03-171-17/+0
| | | p4raw-id: //depot/perl@30607
* Remove the abort() trap, which Larry said was actually only everNicholas Clark2007-03-161-6/+0
| | | | | intended as a way to enter gdb by using local $^L p4raw-id: //depot/perl@30603
* Update copyright years in .c filesRafael Garcia-Suarez2007-01-051-1/+1
| | | p4raw-id: //depot/perl@29696
* The first three patches from:Marcus Holland-Moritz2007-01-041-1/+2
| | | | | | | | Subject: [PATCH] Cleanup SVf arguments (2nd try) Message-ID: <20070101201613.4120d9ef@r2d2> Adds (void*) casts to %-p and %p printf arguments p4raw-id: //depot/perl@29686