summaryrefslogtreecommitdiff
path: root/sv.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix bit-fields for VC [was RE: [perl #50386] GIMME_V broken with 5.10.0/GCC ↵Jan Dubois2008-02-121-4/+4
| | | | | | | | and XS?] From: "Jan Dubois" <jand@activestate.com> Message-ID: <02ee01c8651b$17ef72f0$47ce58d0$@com> p4raw-id: //depot/perl@33292
* Standardise the conditional compilation protection of ({}) fromNicholas Clark2008-01-261-2/+2
| | | | | | | | | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) && !defined(PERL_GCC_PEDANTIC) to #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) because the ({}) construction can be used under __STRICT_ANSI__ (and should be, because it avoids temporary use of PL_Sv). p4raw-id: //depot/perl@33077
* PVIOs don't need space for SvNVX allocated.Nicholas Clark2008-01-251-28/+40
| | | p4raw-id: //depot/perl@33069
* For 5.12: saner behaviour for `length`Nicholas Clark2008-01-121-0/+2
| | | | | | (Make C<length undef> return undef). Patch mostly by Rafael, with some fine tuning by me. p4raw-id: //depot/perl@32969
* With regexps stored as real RVs, we can eliminate SvREPADTMP().Nicholas Clark2008-01-081-12/+2
| | | | | Exterminate! Exterminate! Exterminate! p4raw-id: //depot/perl@32902
* Clarify the use of SVf_BREAK on PL_reg_curpm.Nicholas Clark2008-01-071-1/+3
| | | p4raw-id: //depot/perl@32895
* Make REGEXP a type distinct from SV. (Much like AV, CV, GV, HV).Nicholas Clark2008-01-051-0/+5
| | | p4raw-id: //depot/perl@32861
* In struct regexp move the member paren_names to the IV union.Nicholas Clark2008-01-051-0/+1
| | | p4raw-id: //depot/perl@32854
* BER is all very well, but it turns out that it's better to store theNicholas Clark2008-01-051-6/+63
| | | | | | | | offset as either a byte (if <256), or a 0 byte with a STRLEN before. "better" in that the reading can be inlined, and even then the object code is smaller (function calls have space overhead). So goodbye Perl_sv_read_offset() and hello SvOOK_offset(). p4raw-id: //depot/perl@32838
* Re-implement the SvOOK() hack to store the offset as a BER encodedNicholas Clark2008-01-041-5/+12
| | | | | | | | | | | number in the part of the PVX that is being released. (It will always fit, as chopping off 1 byte gives just enough space for recording a delta of up to 127). This allows SvOOK() to co-exist with SvIOK_on(), which means all the calls to SvOOK_off() [with the possibility of a call to sv_backoff()] in SvIOK_on() can be removed. This ought to make a lot of straight line code a little bit simpler. OOK()d scalars can now be SVt_PV, as the IVX isn't needed. p4raw-id: //depot/perl@32836
* Missed three sv_2mortal(newSVpvn(...))s in the headers.Nicholas Clark2008-01-031-1/+1
| | | p4raw-id: //depot/perl@32820
* Add a new function newSVpvn_flags(), which takes a third parameter ofNicholas Clark2008-01-021-0/+11
| | | | | | | | | | 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-6/+0
| | | | | | and regexp reference counting is via the regular SV reference counting. This was not as easy at it looks. p4raw-id: //depot/perl@32804
* factor out duplicate code in struct xpv*Marcus Holland-Moritz2007-12-301-305/+86
| | | | | Message-ID: <20071229181742.1933db40@r2d2> p4raw-id: //depot/perl@32783
* Include SVf_UTF8 in the bitmask when checking the SvFLAGS inMarcus Holland-Moritz2007-12-301-1/+1
| | | | | | SvPVutf8_force(), as otherwise the conditional expression will always be false and the optimisation will never kick in. p4raw-id: //depot/perl@32781
* First class regexps.Nicholas Clark2007-12-281-1/+32
| | | p4raw-id: //depot/perl@32751
* SvPVX_const() triggers an assertion that when the sv isn't a PV.Steve Peters2007-12-281-1/+1
| | | | | | Back this down to just checking to see if the sv is a PV or not. p4raw-id: //depot/perl@32750
* Take code that occurs in three places to take a scalar and ready it toNicholas Clark2007-12-261-0/+14
| | | | | 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-8/+12
| | | | | 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-4/+4
| | | p4raw-id: //depot/perl@32725
* In SvPV_free(), assert() that no-one is trying to free up a reference.Nicholas Clark2007-12-231-0/+1
| | | p4raw-id: //depot/perl@32717
* Bug fix for storing shared objects in shared structuresJerry D. Hedden2007-11-081-0/+1
| | | | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510711061136t52a1fe62waf384c4551612181@mail.gmail.com> (core patch only) p4raw-id: //depot/perl@32241
* Nothing is using IoSUBPROCESS() so eliminate xio_subprocess.Nicholas Clark2007-10-011-3/+1
| | | | | | Make xio_flags a U8, which is what it should have been all along (rather than a char, which might be signed). B.xs had its wrapper as U8 p4raw-id: //depot/perl@32001
* Under -DDEBUGGING (on gcc), assert that SvRV(sv) is being called onNicholas Clark2007-09-231-2/+16
| | | | | a valid SvTYPE(). p4raw-id: //depot/perl@31941
* Add some information to the comments describing SV flag bits.Nicholas Clark2007-07-011-1/+6
| | | p4raw-id: //depot/perl@31512
* Also get copy on write working with ithreads. It hadn't been workingNicholas Clark2007-06-241-1/+3
| | | | | | | since change 26684 (which uses sv_setsv_flags to copy a value from an SV in one interpreter context to an SV in another), despite what change 31120 thought. ext/Compress/Raw/Zlib/t/07bufsize.t still fails. p4raw-id: //depot/perl@31454
* Where possible, use SvIV instead of SvIVX, SvNV instead of SvNVX,Nicholas Clark2007-04-211-7/+11
| | | | | | | | | 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
* Wrap the SvTYPE macro definition in parens.Rafael Garcia-Suarez2007-02-071-1/+1
| | | p4raw-id: //depot/perl@30153
* Fix a typo and some doubled spaces in comments.Nicholas Clark2007-01-221-3/+3
| | | p4raw-id: //depot/perl@29922
* Make PERL_OLD_COPY_ON_WRITE build again. Inline Perl_sv_release_IVX().Nicholas Clark2007-01-171-2/+2
| | | | | (Currently it fails ext/Compress/Raw/Zlib/t/07bufsize.t) p4raw-id: //depot/perl@29853
* Change the API doc for some of the SvXXX testing macros.Rafael Garcia-Suarez2007-01-081-24/+24
| | | | | | | Often, those macros simply test a bit in sv_flags, so the return value should be assigned to a U32 instead of a bool to avoid truncation. (bug perl #32884) p4raw-id: //depot/perl@29718
* Rename OURSTASH to SvOURSTASH and OURSTASH_set to SvOURSTASH_set.Nicholas Clark2007-01-031-2/+2
| | | p4raw-id: //depot/perl@29679
* Update copyright years to include 2007. (Plus a couple of 2006s andNicholas Clark2007-01-021-1/+1
| | | | | earlier we missed in av.h and hv.h) p4raw-id: //depot/perl@29670
* Remove the vestigal "#if 0"s from header files that defined same-sizedNicholas Clark2007-01-021-8/+0
| | | | | *allocated structs, as these are not going to be needed again. p4raw-id: //depot/perl@29664
* Move SVt_BIND to be the lowest type after SVt_NULL. This will force allNicholas Clark2006-12-311-5/+7
| | | | | | | | | code attempting to upgrade a BIND to anything into sv_upgrade(), which for now will croak, but in future can DTRT, for whatever TRT is decided to be. Make SvOK() check the flags of the referenant for a BIND, as I envisage that the only flag bit that will get set on a BIND is SVf_UTF8 even if the referant has a defined value. p4raw-id: //depot/perl@29642
* Eliminate BmPREVIOUS_set - with the complexity gone from how the datumNicholas Clark2006-12-281-2/+0
| | | | | is stored, there's no need for it. p4raw-id: //depot/perl@29635
* Move all the FBM data fields from the table into a struct xbm_s whichNicholas Clark2006-12-281-46/+63
| | | | | is part of the xnv union. p4raw-id: //depot/perl@29634
* Move the low/high cop sequences from NVX/IVX to a two U32 structureNicholas Clark2006-12-281-0/+36
| | | | | | 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
* Silence an unused variable warning in sv.c.Steve Peters2006-12-221-9/+7
| | | p4raw-id: //depot/perl@29611
* Add a new flag SVprv_PCS_IMPORTED (which is a pseudonym for SVf_SCREAM)Nicholas Clark2006-12-161-0/+9
| | | | | | | to note when a proxy constant subroutine is copied. This allows us to correctly set GvIMPORTED_CV_on() if the symbol is ever turned into a real GV. p4raw-id: //depot/perl@29566
* Split out the use of SVp_SCREAM for GVs with GPs into a new symbolicNicholas Clark2006-12-161-3/+19
| | | | | flag SVpgv_GP, and use this in isGV_with_GP_on/off. p4raw-id: //depot/perl@29565
* Better documentation for SVf_UTF8. Including SvPV() 1st, SvUTF() 2nd.Nicholas Clark2006-12-151-2/+8
| | | p4raw-id: //depot/perl@29559
* Turn a tab into 2 spaces to make more room for comments about SV flags.Nicholas Clark2006-12-141-59/+57
| | | | | | Sorry about damaging the change history - dig through this change with http://public.activestate.com/cgi-bin/perlbrowse?show_blame=Show+Annotated+File&filename=sv.h&rev=&change=29552 p4raw-id: //depot/perl@29554
* Swap the order of PERL_FBM_PREVIOUS_{L,H}_OFFSET_FROM_TABLE on littleNicholas Clark2006-12-131-2/+7
| | | | | endian machines to hint to the compiler that a 16 bit read could work. p4raw-id: //depot/perl@29552
* Restore the two comments describing BmRARE and BmPREVIOUS that I'dNicholas Clark2006-12-131-1/+4
| | | | | | inadvertently deleted. Explain the setting and testing of SVpbm_VALID. p4raw-id: //depot/perl@29551
* Eliminate PVBM. Store fast Boyer-Moore tables in PVGV.Nicholas Clark2006-12-131-35/+24
| | | | | | Add the placeholder for new type, temporarily named BIND, for binding and aliasing in 6 on 5. p4raw-id: //depot/perl@29544
* Assert that SvPAD_TYPED_on(), SvPAD_OUR_on() and SvPAD_STATE_on()Nicholas Clark2006-12-121-4/+23
| | | | | are never called on PVGVs. p4raw-id: //depot/perl@29537
* Assert that PVGVs are never SvVALID() in the PVBM sense.Nicholas Clark2006-12-121-3/+17
| | | p4raw-id: //depot/perl@29536
* Silence VC warnings about possible operator precedence problemsSteve Hay2006-12-121-3/+3
| | | | | and signed/unsigned mismatches p4raw-id: //depot/perl@29532
* By moving xbm_previous into the SvPVX, we save a U16 from struct xpvbm,Nicholas Clark2006-12-121-19/+38
| | | | | | | | which will likely equate to 4 bytes with padding. (But we add 2 bytes to the SvPVX buffer...). However, the real win is that xpvbm is now identical to xpvmg, and all active FBM compiled strings are SvVALID() true, so now we can eliminate xpvbm, freeing a type for 6 on 5 proxies. p4raw-id: //depot/perl@29527