summaryrefslogtreecommitdiff
path: root/hv.h
Commit message (Collapse)AuthorAgeFilesLines
* Create a direct lookup hash for ->isa() lookup, by retaining theNicholas Clark2008-09-121-0/+1
| | | | | | | | | | | de-duping hash used by S_mro_get_linear_isa_dfs(). Provide a new function Perl_get_isa_hash() to lazily retrieve this. (Which could actually be static if S_isa_lookup() and Perl_sv_derived_from() moved into mro.c.) Make S_isa_lookup() use this lookup hash in place of a linear walk of the linear isa. This should turn isa lookups from O(n) to O(1), which should make heavy users of ->isa() faster. (eg PPI, and hence Perl Critic). p4raw-id: //depot/perl@34354
* metabatman fails the "this patch is self-documenting" test. RestoreNicholas Clark2008-05-201-27/+27
| | | | | (roughly) the original parameter names. p4raw-id: //depot/perl@33891
* Deprecate (and remove core use of ) Nullav, Nullcv, Nullgv, Nullhe,Nicholas Clark2008-01-231-4/+11
| | | | | Nullhek and Nullhv. Nullop is going to be a bit less simple. p4raw-id: //depot/perl@33051
* Typo fixRafael Garcia-Suarez2008-01-051-2/+2
| | | p4raw-id: //depot/perl@32860
* Missed three sv_2mortal(newSVpvn(...))s in the headers.Nicholas Clark2008-01-031-2/+2
| | | p4raw-id: //depot/perl@32820
* Add HeUTF8() to complement HePV() and then immediately suggest thatNicholas Clark2008-01-031-1/+15
| | | | | newSVhek(HeKEY_hek(he) is probably what you wanted all along. p4raw-id: //depot/perl@32812
* Change 32783 was generating warnings from gcc about an extra semicolonNicholas Clark2007-12-301-1/+1
| | | | | | in structure or union. No doubt some non-sloppy compilers will consider this an error and barf. We don't like barfing. p4raw-id: //depot/perl@32785
* factor out duplicate code in struct xpv*Marcus Holland-Moritz2007-12-301-41/+15
| | | | | Message-ID: <20071229181742.1933db40@r2d2> p4raw-id: //depot/perl@32783
* Similiarly Perl_newHV() can become a mathom by making newHV() aNicholas Clark2007-12-201-0/+10
| | | | | wrapper around newSV_type() and tweaking Perl_sv_upgrade(). p4raw-id: //depot/perl@32676
* Change the way of determining the MRO algorithm used from an enumNicholas Clark2007-09-261-5/+4
| | | | | | | | defined in the header, to a pointer to a structure. This allows the flexibility to easily add more MROs in the future, and to provide an API to do so. Dispatch in mro.c is now via the structure pointed to, rather than switch statements on the value of the enum. p4raw-id: //depot/perl@31977
* Add a new function Perl_hv_common_key_len(), which contains theNicholas Clark2007-09-201-0/+23
| | | | | | | | manipulations to convert negative lengths to positive length + UTF-8 flag. hv_delete(), hv_exists(), hv_fetch(), hv_store() and hv_store_flags() all become mathoms. The macros hv_fetchs() and hv_stores() call hv_common() directly. p4raw-id: //depot/perl@31931
* Switch Perl_hv_common() to returning void * rather than HE *.Nicholas Clark2007-09-201-3/+4
| | | p4raw-id: //depot/perl@31926
* Convert hv_delete_ent(), hv_exists_ent(), hv_fetch_ent() andNicholas Clark2007-09-201-0/+13
| | | | | | hv_store_ent() to macros, and consign the function bodies to history. Er, mathoms.c p4raw-id: //depot/perl@31924
* Send all delete()/delete_ent() calls via S_hv_fetch_common().Nicholas Clark2007-09-191-1/+1
| | | | | This puts all the key normalisation code in one place. p4raw-id: //depot/perl@31916
* For an LVALUE fetch, "hv_fetch()" will recurse into "hv_store()" for aNicholas Clark2007-09-191-5/+8
| | | | | | | | | hash with magic. Field hashes have u magic, so this recursion triggers. However, key conversion replaces the original key with the converted key, so we need to ensure that conversion happens exactly once, else for a non-idempotent key conversion routine (eg ROT13) we will see double conversion in this case. p4raw-id: //depot/perl@31898
* miscellaneaJarkko Hietaniemi2007-06-151-3/+3
| | | | | Message-ID: <4671FA51.4070001@iki.fi> p4raw-id: //depot/perl@31388
* Re: HvMROMETABrandon Black2007-05-301-3/+7
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60705291708m3f106d74r473f3d91c780163d@mail.gmail.com> p4raw-id: //depot/perl@31312
* Various mro updates from Brandon Black. References:Craig A. Berry2007-05-191-0/+1
| | | | | | | | <84621a60705111347q40f9dd9ciefa9468e9ff9ca6c@mail.gmail.com> <84621a60705121458i34ff361fh9166e8558781df41@mail.gmail.com> <84621a60705141111q70ed307r9181dfc2834a8f5c@mail.gmail.com> <84621a60705160937h53946fcfg70635908302724e8@mail.gmail.com> p4raw-id: //depot/perl@31239
* Re: mro status, etcBrandon Black2007-04-301-11/+5
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704291527y1b39be37l221ef66e4c828f66@mail.gmail.com> p4raw-id: //depot/perl@31107
* Move hash action constants to hv.hJerry D. Hedden2007-04-251-0/+9
| | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510704240735t50cfc159g59b55726ac5ac64b@mail.gmail.com> p4raw-id: //depot/perl@31064
* Make struct mro_meta 4(ish) bytes smaller.Nicholas Clark2007-04-201-7/+7
| | | p4raw-id: //depot/perl@30999
* A little bit more safe version of HvMROMETARafael Garcia-Suarez2007-04-201-1/+3
| | | p4raw-id: //depot/perl@30994
* Re: new C3 MRO patchBrandon Black2007-04-191-0/+27
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704171114k29b0460el5b08ce5185d55ed5@mail.gmail.com> p4raw-id: //depot/perl@30980
* Rearrange members of structures to reduce memory size on someNicholas Clark2007-03-311-1/+1
| | | | | | platforms. On LP64 structs stackinfo, refcounted_he, and magic shrink by 8 bytes, struct yy_parser by 16. p4raw-id: //depot/perl@30817
* Re-order the flags values for struct refcounted_he to allow theNicholas Clark2007-03-221-6/+19
| | | | | | possibility of storing 2 futher types. Add a void * to the union as it won't increase the size, but may become useful. p4raw-id: //depot/perl@30683
* The HePV macro was borked.Rafael Garcia-Suarez2007-03-081-1/+1
| | | p4raw-id: //depot/perl@30520
* Warning fix. Since HePV's second argument is supposedRafael Garcia-Suarez2007-03-081-2/+1
| | | | | | to be an unsigned integer, there's not point in comparing it to 0. p4raw-id: //depot/perl@30519
* 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-4/+0
| | | | | *allocated structs, as these are not going to be needed again. p4raw-id: //depot/perl@29664
* Move all the FBM data fields from the table into a struct xbm_s whichNicholas Clark2006-12-281-0/+5
| | | | | 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/+4
| | | | | | 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
* Add a new hash key flag HVhek_UNSHARED, to mark all unshared hash keys.Nicholas Clark2006-05-021-2/+4
| | | | | | Otherwise Perl_newSVhek(), called by Perl_hv_iterkeysv(), naively assumes that it can share any hash key directly. p4raw-id: //depot/perl@28069
* Store cop_hints as a shared structure without using any SVs (onNicholas Clark2006-04-121-4/+20
| | | | | ithreads). p4raw-id: //depot/perl@27776
* First stab at using the pad to store the serialised hints data.Nicholas Clark2006-04-111-0/+6
| | | | | | This approach is almost certainly not only wrong, but also doomed. But it's needed to build a correct solution. p4raw-id: //depot/perl@27768
* Need to migrate the refcounted_he structure to be properly shared.Nicholas Clark2006-04-111-5/+32
| | | | | | Add a mutex for manipulated their reference counts. Unwrap the structure, so that for ithreads it can store SVs in pads. p4raw-id: //depot/perl@27764
* Serialise changes to %^H onto the current COP. Return the compile timeNicholas Clark2006-03-311-0/+5
| | | | | | state of %^H as an eleventh value from caller. This allows users to write pragmas. p4raw-id: //depot/perl@27643
* Expunge references to HV_AMAGIC, HV_AMAGICbad and HV_AMAGICmb whichNicholas Clark2006-03-151-13/+0
| | | | | have been unused since revision 1. p4raw-id: //depot/perl@27507
* Move the GvNAME HEK into the IV union - every GV is now 1 pointerNicholas Clark2006-03-051-0/+4
| | | | | smaller. p4raw-id: //depot/perl@27380
* xgv_stash can be stored as a union with the NV, reducing the size ofNicholas Clark2006-02-251-1/+4
| | | | | PVGVs by another pointer. p4raw-id: //depot/perl@27326
* Store the stash for our in the magic slot. This will allow us to useNicholas Clark2006-02-241-2/+8
| | | | | | 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
* Re: [PATCH] s/Null(gv|hv|sv)/NULL/gSteven Schubiger2006-02-031-2/+2
| | | | | | Message-ID: <20060203152449.GI12591@accognoscere.homeunix.org> Date: Fri, 3 Feb 2006 16:24:49 +0100 p4raw-id: //depot/perl@27065
* Re: [PATCH] s/Null(av|ch)/NULL/gSteven Schubiger2006-02-021-2/+2
| | | | | Message-ID: <20060202093849.GD12591@accognoscere.homeunix.org> p4raw-id: //depot/perl@27054
* Use a union for storing the shared hash key reference count, ratherNicholas Clark2006-01-301-3/+6
| | | | | than messy pointer hacks. p4raw-id: //depot/perl@27000
* RMAGIC on symbol tables is bad, m'kay.Nicholas Clark2005-12-301-0/+1
| | | | | | | | Allow hashes (and therefore all symbol tables) to store the backreference array in the hv_aux structure, and thereby undo the performance damage of 24966, which resulted in 60% of all hash lookups trying to mg_find tiehash magic. p4raw-id: //depot/perl@26530
* More consting, and putting stuff in embed.fncAndy Lester2005-12-061-2/+2
| | | | | Message-ID: <20051205194613.GB7791@petdance.com> p4raw-id: //depot/perl@26281
* Replace hv_magic() with a macro to call sv_magic() directly. Move theNicholas Clark2005-10-301-0/+1
| | | | | old body to mathoms.c p4raw-id: //depot/perl@25897
* Replace hv_iternext() with a macro that calls hv_iternext_flags withNicholas Clark2005-10-301-0/+2
| | | | | an extra 0 argument. Move the old body to mathoms.c p4raw-id: //depot/perl@25895
* Minor comment fixRafael Garcia-Suarez2005-09-091-1/+1
| | | p4raw-id: //depot/perl@25366
* Given that we now have a union, there's no need for all the HvARRAY()Nicholas Clark2005-08-171-5/+1
| | | | | casting games. p4raw-id: //depot/perl@25297
* [patch hv.h doc] HvNAMESteve Hay2005-07-111-1/+2
| | | | | | | | | | | | From: Stas Bekman <stas@stason.org> Date: Fri, 08 Jul 2005 13:52:13 +0300 Message-ID: <42CE5ADD.3020003@stason.org> Subject: Re: [patch hv.h doc] HvNAME From: Nicholas Clark <nick@ccl4.org> Date: Sat, 9 Jul 2005 15:23:51 +0100 Message-ID: <20050709142351.GT15833@plum.flirble.org> p4raw-id: //depot/perl@25111