summaryrefslogtreecommitdiff
path: root/global.sym
Commit message (Collapse)AuthorAgeFilesLines
* Bump coopyright year in embed.pl and various files that were just touchedRafael Garcia-Suarez2009-01-021-1/+1
| | | | (and run "make regen")
* Faster sv_utf8_upgrade()karl williamson2009-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider what currently happens when the tokenizer is scanning a string. It looks through it byte-by-byte until it finds a character that forces it to decide to go to utf8. It then calls sv_utf8_upgrade() with the portion of the string scanned so far. sv_utf8_upgrade() starts over from the beginning, and scans the string byte-by-byte until it finds a character that varies between non-utf8 and utf8. It then calls bytes_to_utf8(). bytes_to_utf8() allocates a new string that can handle the worst case expansion, 2n+1, of the entire string, and starts over from the beginning, and scans the input string byte-by-byte copying and converting each character to the output string as it goes. It doesn't return the size of the new string, so sv_utf8_upgrade() assumes it is only as big as what actually got converted, throwing away knowledge of any spare. It then returns to the tokenizer, which immediately does a grow to get space for the unparsed input. This is likely to cause a new string to be allocated and copied from the one we had just created, even if that string in actuality had enough space in it. Thus, the invariant head portion of the string is scanned 3 times, and probably 2 strings will be allocated and copied. My solution to cutting this down is to do several things. First, I added an extra flag for sv_utf8_upgrade that says don't bother to check if the string needs to be converted to utf8, just assume it does. This eliminates one of the passes. I also added a new parameter to sv_utf8_upgrade that says when you return, I want this much unused space in the string. That eliminates the extra grow. This was all done by renaming the current work-horse function from sv_utf8_upgrade_flags to be sv_utf8_upgrade_flags_grow() and making the current function name be a macro which calls the revised one with a 0 grow parameter. I also improved the internal efficiency of sv_utf8_upgrade so that when it does scan the string, it doesn't call bytes_to_utf8, but does the conversion itself, using a fast memory copy instead of the byte-oriented one for the invariant header, and it uses that header to get a better estimate of the needed size of the new string, and it doesn't throw away the knowledge of the allocated size. And, if it is clear without scanning the whole string that the conversion will fit in the already allocated string, it just uses that instead of allocating and copying a new one, using the algorithm I copied from the tokenizer. (In this case it does have to finish scanning the whole string to get the correct size.) The comments have details. It still is byte-oriented. Vectorization et. al. could yield performance improvements. One idea for that is in the comments. The patch also includes a new synonym I created which is a more accurate name than NATIVE_TO_ASCII.
* Add save_adelete()/SAVEADELETE() to save on the stack an array element deleteVincent Pit2008-12-281-0/+1
|
* Break out the set-the-MRO logic from the XS_mro_set_mro into Perl_mro_set_mro(),Nicholas Clark2008-12-271-0/+1
| | | | which can be called from C code (such as the guts of extensions).
* Explictly export Perl_mro_meta_init() so that HvMROMETA() can become part of theNicholas Clark2008-12-271-0/+1
| | | | | public API and be used outside the core. However, leave Perl_mro_meta_init() as a private implementation detail.
* Add Perl_mro_register() to register Method Resolution Orders,Nicholas Clark2008-12-271-0/+2
| | | | | | Perl_mro_get_from_name() to retrieve MROs by name, and PL_registered_mros to store them in. Abolish the static array of mros, and instead register the dfs and c3 MRO structures.
* Repurpose struct mro_meta to allow it to store cached linear ISA for arbitaryNicholas Clark2008-12-271-0/+2
| | | | | | | method resolution orders. mro_linear_dfs becomes a hash holding the different MROs' private data. mro_linear_c3 becomes a shortcut pointer to the current MRO's private data.
* Remove "b" flag for sv_utf8_upgrade_nomg in embed.fncRafael Garcia-Suarez2008-12-271-1/+0
| | | | | This is only a macro, without a Perl_ implementation. Hopefully this fixes the Win32 build.
* Regen docs and headersRafael Garcia-Suarez2008-12-261-0/+1
| | | | Necessary after change fe749c9aa803ce74d997ff797103481a55741837
* It looks like the previous patch is working fine on UNIXish boxes,Steve Peters2008-12-191-1/+0
| | | | | but is failing on Windows. Anyways sv_utf8_upgrade_nomg() is a macro anyways, so moving the documentation to sv.h.
* Subject: PATCH 5.10 documentationSteve Peters2008-12-191-0/+1
| | | | | | From: karl williamson <public@khwilliamson.com> Date: Tue, 16 Dec 2008 16:00:34 -0700 Message-ID: <49483312.80804@khwilliamson.com>
* Convert all the scope save functions of the formNicholas Clark2008-11-301-0/+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
* Perl_cv_ckproto() is not part of the public API, and not used anywhereNicholas Clark2008-11-261-1/+0
| | | | | in the core. So it can go. p4raw-id: //depot/perl@34922
* Re: [perl #60360] [PATCH] UPDATED: local $SIG{FOO} = sub {...}; sets signal ↵Chip Salzenberg2008-11-131-1/+1
| | | | | | | | | | | | 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
* Update copyright year in embed.pl, and everything that it builds.Nicholas Clark2008-10-251-1/+1
| | | p4raw-id: //depot/perl@34586
* Add Perl_croak_xs_usage(), which reduces a lot of explicit calls ofNicholas Clark2008-05-211-0/+1
| | | | | | | the form Perl_croak(aTHX_ "Usage %s::%s(%s)", "ouch" "awk", "eee_yow"); down to croak_xs_usage(cv, "eee_yow"); and refactor all the core XS code to use it. This adds () to the error messages for attributes::* p4raw-id: //depot/perl@33901
* /* This code tries to figure out just what went wrong withNicholas Clark2008-04-171-0/+1
| | | | | | | | | | | gv_fetchmethod. It therefore needs to duplicate a lot of the internals of that function. "Duplicate". <snigger>. You said a naughty word. Now sanitised. [All tests pass, but I'm not 100% confident that this code is equivalent in all reachable corner cases, and it may be possible to simplify the error reporting logic now in gv_fetchmethod_flags] p4raw-id: //depot/perl@33702
* Eliminate cop_label from struct cop by storing a label as the firstNicholas Clark2008-04-071-0/+1
| | | | | | entry in the hints hash. Most statements don't have labels, so this will save memory. Not sure how much. p4raw-id: //depot/perl@33656
* Double magic with substrVincent Pit2008-03-311-0/+1
| | | | | Message-ID: <47F119E8.5010106@profvince.com> p4raw-id: //depot/perl@33618
* util.c: some constingSteven Schubiger2008-01-281-1/+1
| | | | | Message-ID: <20080125001052.GA29980@refcnt.homeunix.org> p4raw-id: //depot/perl@33083
* Move the reg_stringify logic to Perl_sv_2pv_flagsÆvar Arnfjörð Bjarmason2008-01-101-1/+0
| | | | | | | | Message-ID: <86zlveaewk.fsf@cpan.org> with two corrections. Plus remove reg_stringify from embed.fnc and regen. p4raw-id: //depot/perl@32934
* BER is all very well, but it turns out that it's better to store theNicholas Clark2008-01-051-1/+0
| | | | | | | | 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-0/+1
| | | | | | | | | | | 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
* Run regen.pl (fixes build on Win32, at least)Steve Hay2008-01-041-0/+1
| | | p4raw-id: //depot/perl@32823
* Silly Nick - change 32804 missed updating the list of global functions.Nicholas Clark2008-01-021-1/+2
| | | p4raw-id: //depot/perl@32806
* Regen some files...Steve Peters2007-12-201-0/+1
| | | p4raw-id: //depot/perl@32682
* 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
* make PERL_SYS_INIT/INIT3/TERM into functionsDave Mitchell2007-09-251-0/+3
| | | p4raw-id: //depot/perl@31970
* Add a new function Perl_hv_common_key_len(), which contains theNicholas Clark2007-09-201-0/+1
| | | | | | | | 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
* Change 31919 forgot to add Perl_hv_common to global.symNicholas Clark2007-09-201-0/+1
| | | p4raw-id: //depot/perl@31925
* Change #31889 forgot to regen global.symSteve Hay2007-09-181-1/+0
| | | p4raw-id: //depot/perl@31891
* mro_get_linear_isa_dfs and mro_get_linear_isa_c3 can have staticNicholas Clark2007-09-121-2/+0
| | | | | linkage. p4raw-id: //depot/perl@31849
* Make Perl_find_runcv a member of the public APIRafael Garcia-Suarez2007-07-071-0/+1
| | | | | (so Sub::Current works on Windows) p4raw-id: //depot/perl@31548
* Re: [PATCH] Callbacks for named captures (%+ and %-)Ævar Arnfjörð Bjarmason2007-06-061-0/+7
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80706031324y5618d519p460da27a2e7fe712@mail.gmail.com> p4raw-id: //depot/perl@31341
* delete thrdvar.h and move its contents to intrpvar.hDave Mitchell2007-05-201-1/+1
| | | p4raw-id: //depot/perl@31245
* Fix breakages caused by #31130:Steve Hay2007-05-031-0/+1
| | | | | | report_uninit was not exported on Win32 and my_reg_numbered_buff_length had wrong prototype p4raw-id: //depot/perl@31132
* FETCH/STORE/LENGTH callbacks for numbered capture variablesÆvar Arnfjörð Bjarmason2007-05-031-2/+4
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80705011658g1156e14cw4d2b21a8d772ed41@mail.gmail.com> p4raw-id: //depot/perl@31130
* Add Perl_my_dirfd() to util.cSteve Peters2007-05-011-0/+1
| | | p4raw-id: //depot/perl@31112
* Re: [PATCH] Cleanup of the regexp APIÆvar Arnfjörð Bjarmason2007-04-301-1/+1
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80704261922j3db0615wa86ccc4cb65b2713@mail.gmail.com> p4raw-id: //depot/perl@31106
* Fix mro docs.Brandon Black2007-04-261-8/+4
| | | | | | | Subject: Re: mro callbacks patch From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704231658o4c85783ere3c3e90dd614c30b@mail.gmail.com> p4raw-id: //depot/perl@31086
* Re: new C3 MRO patchBrandon Black2007-04-191-0/+8
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704171114k29b0460el5b08ce5185d55ed5@mail.gmail.com> p4raw-id: //depot/perl@30980
* Re: Proposed changes and to regular expression interfaces in coreÆvar Arnfjörð Bjarmason2007-04-061-0/+1
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80703291552y1073bcb6r954b043eb68a4459@mail.gmail.com> p4raw-id: //depot/perl@30849
* symbol-exports needed for Data::AliasMatthijs van Duin2007-03-231-0/+8
| | | | | Message-ID: <20070320135915.GA25192@cds.nl> p4raw-id: //depot/perl@30716
* Resolve PL_curpm issues with (??{}) and fix corruption of match results when ↵Yves Orton2007-03-221-0/+1
| | | | | | | | | pattern is a qr. Message-ID: <9b18b3110703210239x540f5ad9mdb41c2ea6229ac31@mail.gmail.com> plus two follow-up patches (minor tweaks) p4raw-id: //depot/perl@30678
* With the demise of ByteLoader in blead, unshare_hek can return to theNicholas Clark2007-03-121-1/+0
| | | | | | backwaters of 'p'. Not being visible to 'EX'tensions means that there's less exposure to maintenance compatibility concerns. p4raw-id: //depot/perl@30552
* Re: [PATCH] Tweaks so that miniperl.exe doesnt croak while building perl.exeYves Orton2007-03-081-0/+1
| | | | | Message-ID: <9b18b3110703071144t787e028s8a79fa1986624b54@mail.gmail.com> p4raw-id: //depot/perl@30517
* Add a new API function newSV_type, to replace the idiom:Nicholas Clark2007-02-181-0/+1
| | | | | | sv = newSV(0); sv_upgrade(sv, type); p4raw-id: //depot/perl@30347
* Missed an aTHX_ in B's call to Perl_emulate_cop_io.Nicholas Clark2007-02-171-0/+1
| | | | | Missed that global.sym was modified. p4raw-id: //depot/perl@30335
* signbit detection (was [perl #39875] -0.0 loses signedness upon numeric ↵Andy Dougherty2007-02-101-0/+1
| | | | | | | comparison) Message-ID: <Pine.LNX.4.62.0702091121400.10202@fractal.phys.lafayette.edu> p4raw-id: //depot/perl@30192
* Stop S_incline needing to temporarily write a '\0' into its passed-inNicholas Clark2007-01-261-0/+2
| | | | | | buffer. (Requires adding gv_fetchfile_flags(), savesharedpvn() and CopFILE_setn() to provide pointer/length versions of APIs) p4raw-id: //depot/perl@30015