summaryrefslogtreecommitdiff
path: root/sv.h
Commit message (Collapse)AuthorAgeFilesLines
* Change 24714 was arguably over-ambitious, in that non-core modulesNicholas Clark2006-11-121-3/+19
| | | | | | | can't be expected to know that sv_setsv() may now not "really" copy a scalar. So arrange things so that COW of shared hash key scalars is only done for calls within the the PERL_CORE. p4raw-id: //depot/perl@29248
* assert() that SvPV_set() isn't used on arrays.Nicholas Clark2006-11-061-0/+1
| | | p4raw-id: //depot/perl@29221
* assert() that SvPV_set() isn't used on hashes.Nicholas Clark2006-11-061-0/+1
| | | p4raw-id: //depot/perl@29220
* assert() that scalars are of the correct type in *set macros.Nicholas Clark2006-11-061-0/+11
| | | p4raw-id: //depot/perl@29219
* PVCVs no longer allocate memory for the SvNVX slot, so assert thatNicholas Clark2006-11-061-0/+1
| | | | | no-one is trying to access it. p4raw-id: //depot/perl@29206
* Proper use of enumsAndy Lester2006-06-121-1/+1
| | | | | Message-ID: <20060612034434.GA21588@petdance.com> p4raw-id: //depot/perl@28381
* The SvREFCNT_*void* macros return void, not SV*.Marcus Holland-Moritz2006-05-241-4/+4
| | | p4raw-id: //depot/perl@28300
* Remove duplicate documentation for SvREFCNT_inc().Marcus Holland-Moritz2006-05-211-3/+6
| | | | | | Add documentation for SvREFCNT_inc_simple_void_NN(). Wrap SvREFCNT_inc_simple_void() in STMT_START/STMT_END. p4raw-id: //depot/perl@28266
* There is no STASH type.Marcus Holland-Moritz2006-05-191-1/+1
| | | p4raw-id: //depot/perl@28246
* Add a new macro SvVSTRING_mg that returns vstring magic, if any.Rafael Garcia-Suarez2006-05-171-0/+4
| | | | | | SvVOK used to do that, in stealth mode, but now it returns a boolean like it used to. Patch suggested by John Peacock. p4raw-id: //depot/perl@28218
* Introduce a new keyword, state, for state variables.Rafael Garcia-Suarez2006-05-031-1/+7
| | | p4raw-id: //depot/perl@28086
* Assert that SvMAGIC() isn't being called on PVMGs which are using theNicholas Clark2006-05-021-0/+2
| | | | | same union to store the stash for our. p4raw-id: //depot/perl@28065
* Document SvGAMAGIC(), and its significance w.r.t. the side effects ofNicholas Clark2006-04-301-0/+12
| | | | | inadvertently calling magic and overloading too often. p4raw-id: //depot/perl@28021
* Provide a new flag for sv_usepvn_flags, SV_HAS_TRAILING_NUL, whichNicholas Clark2006-04-161-0/+1
| | | | | | | signals that the buffer passed in is already well-formed for use as SvPVX (i.e. it is followed by a trailing NUL), and hence the realloc() to add a NUL can be skipped. p4raw-id: //depot/perl@27841
* Merge sv_usepvn and sv_usepvn_mg into sv_usepvn_flags. "Promote" theNicholas Clark2006-04-161-0/+2
| | | | | other two to mathoms.c p4raw-id: //depot/perl@27840
* Random accumulated patchesAndy Lester2006-03-311-2/+2
| | | | | Message-ID: <20060331054228.GA18940@petdance.com> p4raw-id: //depot/perl@27641
* Correct the non gcc-brace-group definition of SvAMAGIC_offNicholas Clark2006-03-151-1/+2
| | | p4raw-id: //depot/perl@27511
* Expunge references to HV_AMAGIC, HV_AMAGICbad and HV_AMAGICmb whichNicholas Clark2006-03-151-5/+0
| | | | | have been unused since revision 1. p4raw-id: //depot/perl@27507
* Moving the overloading flag from the reference to the referant allowsNicholas Clark2006-03-151-10/+21
| | | | | (re)?blessing of overloaded objects to work correctly. p4raw-id: //depot/perl@27506
* SVphv_REHASH can use the same flag bit as SVf_FAKE. This allowsNicholas Clark2006-03-141-4/+3
| | | | | | 0x10000000 (SVf_AMAGIC) to be set on all 16 SV types, which seems to be necessary to fix subtle bugs involving reblessing and overloading. p4raw-id: //depot/perl@27496
* Move the GvNAME HEK into the IV union - every GV is now 1 pointerNicholas Clark2006-03-051-5/+12
| | | | | smaller. p4raw-id: //depot/perl@27380
* Use a HEK to store the GV's name, rather than a malloc()ed string.Nicholas Clark2006-03-051-4/+2
| | | | | | | Saves 1 word in each GV (no more strlen), and will also save the memory used by the string itself, as the HEK will exist already due to the key used by the symbol table for this GV. p4raw-id: //depot/perl@27379
* Silence a GCC warningSteve Hay2006-02-271-1/+1
| | | | | (assignment from incompatible pointer type) p4raw-id: //depot/perl@27348
* Speedups and shrinkages of SvREFCNT_incAndy Lester2006-02-271-1/+66
| | | | | Message-ID: <20060224205434.GA17867@petdance.com> p4raw-id: //depot/perl@27334
* GvFLAGS can be overlaid with SvCUR.Nicholas Clark2006-02-251-4/+2
| | | p4raw-id: //depot/perl@27330
* Use xpv_len rather than xpv_cur in GVs to store GvASSIGN_GENERATION.Nicholas Clark2006-02-251-2/+16
| | | | | Assert that GVs do not access SvCUR or SvLEN. p4raw-id: //depot/perl@27328
* xgv_stash can be stored as a union with the NV, reducing the size ofNicholas Clark2006-02-251-16/+44
| | | | | PVGVs by another pointer. p4raw-id: //depot/perl@27326
* Curiously none of the macros SvIVX, SvUVX or SvNVX are used onNicholas Clark2006-02-251-0/+3
| | | | | typeglobs. p4raw-id: //depot/perl@27325
* Store GvGP in the SV head union. For all the common lookups [eg GvCV()]Nicholas Clark2006-02-251-13/+29
| | | | | | | | this avoids 1 pointer dereference and the associated risk of a CPU cache miss. Although this patch looks deceptively small, I fear its CBV(*) might be rather high. (* Crack By Volume) p4raw-id: //depot/perl@27323
* Avoid special case SvMAGIC macros just to cope with Perl_sv_unmagic.Nicholas Clark2006-02-241-13/+4
| | | p4raw-id: //depot/perl@27319
* Use PVMGs rather than PVGVs to store the names of our variables in theNicholas Clark2006-02-241-1/+1
| | | | | pad. p4raw-id: //depot/perl@27313
* Store the stash for our in the magic slot. This will allow us to useNicholas Clark2006-02-241-21/+41
| | | | | | PVMGs in pad names where previously PVGVs were used. In turn, this gives much greater flexibility for the layout of PVGVs. p4raw-id: //depot/perl@27312
* Replace usage of GvSTASH for storing the stash of C<our> withNicholas Clark2006-02-241-0/+7
| | | | | OURSTASH. Set the stash with OURSTASH_SET. p4raw-id: //depot/perl@27306
* assert that SvMAGIC is never non-NULL for any PVMG used as a pad name.Nicholas Clark2006-02-241-0/+2
| | | p4raw-id: //depot/perl@27304
* Redo previous sv.h change.Nicholas Clark2006-02-241-9/+10
| | | p4raw-id: //depot/perl@27302
* Replace direct flags tests & manipulations for SVpad_TYPED andNicholas Clark2006-02-231-0/+8
| | | | | | SVpad_OUR with macros SvPAD_TYPED(), SvPAD_OUR() etc, to abstract away the flags bits acutally used to store this information. p4raw-id: //depot/perl@27294
* Document a sixth use for SVf_FAKENicholas Clark2006-02-231-0/+3
| | | p4raw-id: //depot/perl@27293
* Remove get magic from typeglobs. This means that PVGVs holdingNicholas Clark2006-02-231-2/+2
| | | | | | | | | | | typeglobs never need to use SvPVX. This comes at price - typeglobs were using magic get for their stringificiation, and to pass SvOK(), so need to make typeglobs SvOK by default (by sucking SVp_SCREAM into SVf_OK - it's the only flag left), tweak SvSCREAM() to also check SVp_POK, and teach sv_2[inpu]v how to convert globs. However, it should free up SvPVX for the next part of the plan to pointer indirections, and therefore CPU cache pressure. p4raw-id: //depot/perl@27278
* Reorder the SV flags so that SVp_?OK and SVf_?OK occupy 8 contiguousNicholas Clark2006-02-211-24/+25
| | | | | | | bits (0x0000XX00). This makes perl 3K smaller with -Os on x86 FreeBSD, and might also help on other architectures (eg with 8 contiguous bits, the SvOK() test on ARM won't need an intermediate constant). p4raw-id: //depot/perl@27264
* Re-order the definitions of the private bits in SvFLAGS by value, soNicholas Clark2006-02-211-20/+30
| | | | | that we can see where we're already double-booked. p4raw-id: //depot/perl@27259
* Document the many uses of SVf_FAKE.Nicholas Clark2006-02-211-1/+12
| | | p4raw-id: //depot/perl@27258
* Steal code from maint, and use PERL_ARENA_ROOTS_SIZE to size the arenaNicholas Clark2006-02-201-0/+2
| | | | | | arrays, rather than SVt_LAST, so that SVt_LAST can truthfully remain the number of genuine SV types, unclouded by implementation details. p4raw-id: //depot/perl@27251
* PVFMs don't need CvDEPTH, and PVCVs don't use SvIVX, so movingNicholas Clark2006-02-201-6/+16
| | | | | | | | | xcv_depth into the IV union saves 4(ish) bytes per CV and format. "ish" because it was a long, but has been changed to I32 (along with the corresponding field in struct block_sub) so as not to enlarge the IV union on platforms where sizeof(long) > sizeof(IV), or struct block_sub where sizeof(long) > sizeof(I32) p4raw-id: //depot/perl@27247
* xcv_root and xcv_xsub can also be merged into a union, providing a newNicholas Clark2006-02-201-6/+12
| | | | | flag is added to denote whether the PVCV is perl or XSUB. p4raw-id: //depot/perl@27244
* xcv_start and xcv_xsubany can be merged into a union, as they are neverNicholas Clark2006-02-201-2/+4
| | | | | both needed. p4raw-id: //depot/perl@27243
* Shave sizeof(NV) bytes from formats, by using the same offsetNicholas Clark2006-02-191-0/+29
| | | | | manoeuvre as PVs, PVIVs, PVAVs and PVHVs. p4raw-id: //depot/perl@27231
* AVs and HVs don't have IVXs or NVXs, so assert this too.Nicholas Clark2006-02-191-1/+7
| | | p4raw-id: //depot/perl@27230
* Under -DDEBUGGING, assert that SvIVX, SvUVX and SvNVX aren't beingNicholas Clark2006-02-191-6/+30
| | | | | | used on scalars that don't have the memory allocated. Correct SvSTASH and SvMAGIC to only evaluate the sv argument once. p4raw-id: //depot/perl@27229
* arena-rework : consolidated patchJim Cromie2006-02-181-1/+6
| | | | | | | | | Message-ID: <43F0F649.9040205@gmail.com> Tweaked somewhat to split the arena boolean from the arena_size, and with the PTE still doubling-up with one of the SV types in the array. p4raw-id: //depot/perl@27215
* Re: [PATCH] s/Null(gv|hv|sv)/NULL/gSteven Schubiger2006-02-031-1/+1
| | | | | | Message-ID: <20060203152449.GI12591@accognoscere.homeunix.org> Date: Fri, 3 Feb 2006 16:24:49 +0100 p4raw-id: //depot/perl@27065