summaryrefslogtreecommitdiff
path: root/pad.c
Commit message (Collapse)AuthorAgeFilesLines
* Missing static storage class for some new static functionsRafael Garcia-Suarez2009-11-201-1/+1
|
* Make the style of pad_add_name's flags consistent with pad_new's and pad_tidy's.Nicholas Clark2009-11-151-7/+7
|
* Change S_pad_check_dup()'s arguments from char*/STRLEN to SV *.Nicholas Clark2009-11-151-15/+8
| | | | Within the function, use sv_eq() rather than strcmp().
* Convert pad_check_dup() to static linkage, and call it from Perl_pad_add_name().Nicholas Clark2009-11-151-7/+9
| | | | | Provide a flag option to Perl_pad_add_name(), pad_add_NO_DUP_CHECK, to supress the call.
* Refactor common code paths from Perl_pad_add_name() into S_pad_add_name_sv().Nicholas Clark2009-11-151-56/+69
| | | | | | The only user of the pad_add_FAKE flag was S_pad_findlex(), so move the relevant code there from Perl_pad_add_name(), and have S_pad_findlex() call S_pad_add_name_sv() directly. This eliminates the pad_add_FAKE flag completely.
* Add length and flags arguments to Perl_pad_add_name().Nicholas Clark2009-11-091-8/+20
| | | | | | Currently only pad_add_STATE and pad_add_FAKE are used. The length is cross- checked against strlen() on the pointer, but the intent is to re-work the entire pad API to be UTF-8 aware, from the current situation of char * pointers only.
* Add length and flags arguments to Perl_pad_check_dup().Nicholas Clark2009-11-091-1/+13
| | | | | | Currently only pad_add_OUR is used. The length is cross-checked against strlen() on the pointer, but the intent is to re-work the entire pad API to be UTF-8 aware, from the current situation of char * pointers only.
* In Perl_pad_check_dup(), use sv rather than name for diagnostics.Nicholas Clark2009-11-091-3/+3
| | | | It already knows its length, and it will be UTF-8 clean in the future.
* Add length and flags arguments to Perl_pad_findmy(), moving it to the public ↵Nicholas Clark2009-11-071-1/+17
| | | | | | | | API. Currently no flags bits are used, and the length is cross-checked against strlen() on the pointer, but the intent is to re-work the entire pad API to be UTF-8 aware, from the current situation of char * pointers only.
* Add Perl_ck_warner_d(), which combines Perl_ckwarn_d() and Perl_warner().Nicholas Clark2009-10-121-5/+4
| | | | | Replace ckWARN_d{,2,3,4}() && Perl_warner() with it, which trades reduced code size for 1 more function call if warnings are not enabled.
* Add Perl_ck_warner(), which combines Perl_ckwarn() and Perl_warner().Nicholas Clark2009-10-121-9/+7
| | | | | | | Replace ckWARN{,2,3,4}() && Perl_warner() with it, which trades reduced code size (about 0.2%), for 1 more function call if warnings are not enabled. However, if we're now in the L1 or L2 cache when we weren't previously, that's still going to be a speed win.
* Simpify logic in Perl_pad_free(): SvIsCOW() has the same semantics in all cases.Nicholas Clark2009-04-191-7/+1
|
* Just s/Perl_/S_/ isn't good enough - you also need to add the C<static>Nicholas Clark2008-11-261-1/+1
| | | p4raw-id: //depot/perl@34934
* The vestigial PL_pad_reset_pending can actually be bool, rather thanNicholas Clark2008-11-261-1/+1
| | | | | | I32. This permits some space saving rejigging of the interpreter struct. p4raw-id: //depot/perl@34930
* pad_reset() is only used in pad.c, so can be static.Nicholas Clark2008-11-261-1/+1
| | | | | Protect the prototype of S_vdie() with #if defined (PERL_IN_UTIL_C) p4raw-id: //depot/perl@34929
* PATCH: Large omnibus patch to clean up the JRRT quotesTom Christiansen2008-11-021-6/+10
| | | | | | Message-ID: <25940.1225611819@chthon> Date: Sun, 02 Nov 2008 01:43:39 -0600 p4raw-id: //depot/perl@34698
* Eliminate (SV *) casts from the rest of *.c, picking up one (further)Nicholas Clark2008-10-301-19/+19
| | | | | erroneous const in dump.c. p4raw-id: //depot/perl@34675
* Use pvs macros instead of pvn where possible.Marcus Holland-Moritz2008-10-291-1/+1
| | | p4raw-id: //depot/perl@34653
* Eliminate (AV *) casts in *.c.Nicholas Clark2008-10-291-18/+18
| | | p4raw-id: //depot/perl@34650
* Add MUTABLE_CV(), and eliminate (CV *) casts in *.c.Nicholas Clark2008-10-291-8/+8
| | | p4raw-id: //depot/perl@34647
* Every remaining (HV *) cast in *.cNicholas Clark2008-10-281-1/+1
| | | p4raw-id: //depot/perl@34629
* No, it's not a const SV* if we subsequently callMarcus Holland-Moritz2008-10-261-1/+1
| | | | | SvREFCNT_dec() on it. p4raw-id: //depot/perl@34600
* Update copyright years.Nicholas Clark2008-10-251-1/+2
| | | p4raw-id: //depot/perl@34585
* assert() that every NN argument is not NULL. Otherwise we have theNicholas Clark2008-02-121-0/+30
| | | | | | | | | | | | 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
* [perl #49522] state variable not availableDave Mitchell2008-01-191-4/+9
| | | | | | Svf_PADSTALE means something different for state vars. Make sure we always handle it correctly p4raw-id: //depot/perl@33009
* change #31447 was wrong. Really handle cloning a stale lexical varDave Mitchell2008-01-091-5/+5
| | | | | p4raw-link: @31447 on //depot/perl: efa785391fea9e6aff4c999b27ad62b7d8f9ea99 p4raw-id: //depot/perl@32906
* when anon subs are cloned, the 'assign once only' flag should beDave Mitchell2007-09-101-0/+3
| | | | | | set for all state vars in the pad. (Nicholas worked up the same fix - spooky action at a distance!) p4raw-id: //depot/perl@31835
* [perl #43425] local $[: fix scoping during parser error handling.Dave Mitchell2007-07-161-2/+2
| | | | | | | | | Change 22306# inadvertently made 'local $[' statement-scoped rather than block-scoped; so revert that change and add a different fix. The problem was to ensure that the savestack got popped correctly while popping errored tokens. We how record the current value of PL_savestack_ix with each pushed parser state. p4raw-id: //depot/perl@31615
* safely handle cloning a stale lexical varDave Mitchell2007-06-221-2/+2
| | | | | | | This code: my $x if ...; sub { $x} could attempt to clone $x even if $x is stale. p4raw-id: //depot/perl@31447
* move PL_in_my and PL_in_my_stash into the PL_parser structDave Mitchell2007-05-121-1/+1
| | | p4raw-id: //depot/perl@31203
* Various variables in intrpvar.h and thrdvar.h are considerably largerNicholas Clark2007-04-211-1/+1
| | | | | than they need to be. p4raw-id: //depot/perl@31017
* Like fake scalars, state variables shouldn't get new pad entriesRafael Garcia-Suarez2007-03-121-1/+4
| | | | | at each recursion, in order to be truly stateful. (bug #41789) p4raw-id: //depot/perl@30548
* Add a new API function newSV_type, to replace the idiom:Nicholas Clark2007-02-181-7/+4
| | | | | | sv = newSV(0); sv_upgrade(sv, type); p4raw-id: //depot/perl@30347
* Update copyright years in .c filesRafael Garcia-Suarez2007-01-051-1/+1
| | | p4raw-id: //depot/perl@29696
* 4th patch from: Marcus Holland-Moritz2007-01-041-1/+1
| | | | | | | | | Subject: [PATCH] Cleanup SVf arguments (2nd try) Message-ID: <20070101201613.4120d9ef@r2d2> Introduce an SVfARG() macro for %SVf (%-p here) arguments to perl's printf p4raw-id: //depot/perl@29687
* Rename OURSTASH to SvOURSTASH and OURSTASH_set to SvOURSTASH_set.Nicholas Clark2007-01-031-5/+5
| | | p4raw-id: //depot/perl@29679
* With xlow and xhigh as U32, PAD_MAX shouldn't be IV_MAX, as on a 64 bitNicholas Clark2006-12-291-1/+1
| | | | | system this can't be stored. p4raw-id: //depot/perl@29639
* Move PAD_COMPNAME_GEN from SvCUR to SvUVX.Nicholas Clark2006-12-281-3/+1
| | | p4raw-id: //depot/perl@29632
* Move PAD_FAKELEX_ANON and PAD_FAKELEX_MULTI to pad.h, export them viaNicholas Clark2006-12-281-5/+0
| | | | | B.pm, so that B::Concise doesn't need to hard code magic numbers. p4raw-id: //depot/perl@29631
* Move the low/high cop sequences from NVX/IVX to a two U32 structureNicholas Clark2006-12-281-14/+18
| | | | | | in the xnv union. This frees up IVX for the PL_generation code, which in turn will allow SvCUR to return to its real purpose. p4raw-id: //depot/perl@29630
* Abstract the pad code's overloaded use of SvNVX and SvIVX intoNicholas Clark2006-12-281-34/+43
| | | | | | 4 macros COP_SEQ_RANGE_LOW, COP_SEQ_RANGE_HIGH, PARENT_PAD_INDEX and PARENT_FAKELEX_FLAGS p4raw-id: //depot/perl@29629
* Change PAD_MAX to something a bit less FORTRAN-ish than 999999999.Nicholas Clark2006-12-281-1/+1
| | | p4raw-id: //depot/perl@29628
* pads haven't actually contained any PVGVs since change 27313.Nicholas Clark2006-12-121-1/+2
| | | | | So correct the docs and assert this in the code. p4raw-id: //depot/perl@29535
* Introduce a new keyword, state, for state variables.Rafael Garcia-Suarez2006-05-031-3/+8
| | | p4raw-id: //depot/perl@28086
* reduce gcc -ansi -pedantic noise plus a suggestionJarkko Hietaniemi2006-04-281-1/+2
| | | | | Message-ID: <44527402.8000506@gmail.com> p4raw-id: //depot/perl@28008
* use NOOP macroAndy Lester2006-04-251-1/+1
| | | | | Message-ID: <20060424184451.GA1479@petdance.com> p4raw-id: //depot/perl@27958
* A couple of casts to PADOFFSET.Marcus Holland-Moritz2006-04-241-5/+5
| | | | | | | 2nd patch from : Subject: Re: [PATCH] cleanup 212 warnings emitted by gcc-4.2 Message-ID: <20060423044704.6a383ee8@r2d2> p4raw-id: //depot/perl@27945
* SvREFCNT_inc tweaksAndy Lester2006-04-031-5/+5
| | | | | Message-ID: <20060401080130.GA19372@petdance.com> p4raw-id: //depot/perl@27701
* Add MAD changes to pad code (new function Perl_pad_peg)Nicholas Clark2006-03-081-1/+9
| | | p4raw-id: //depot/perl@27419
* Speedups and shrinkages of SvREFCNT_incAndy Lester2006-02-271-22/+17
| | | | | Message-ID: <20060224205434.GA17867@petdance.com> p4raw-id: //depot/perl@27334