summaryrefslogtreecommitdiff
path: root/global.sym
Commit message (Collapse)AuthorAgeFilesLines
* Regen headers after previous patchesSteve Hay2010-02-201-0/+1
|
* Convert Perl_sv_pos_u2b_proper() to Perl_sv_pos_u2b_flags().Nicholas Clark2010-02-141-1/+1
| | | | | | | Change from a value/return offset pointer to passing a Unicode offset, and returning a byte offset. The optional length value/return pointer remains. Add a flags argument, passed to SvPV_flags(). This allows the caller to specify whether mg_get() should be called on sv.
* Removes 32-bit limit on substr arguments. The full range of IV and UV is ↵Eric Brine2010-02-141-0/+1
| | | | available for the pos and len arguments, with safe conversion to STRLEN where it's smaller than an IV.
* Omnibus strict and lax version parsingDavid Golden2010-01-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Authors: John Peacock, David Golden and Zefram The goal of this mega-patch is to enforce strict rules for version numbers provided to 'package NAME VERSION' while formalizing the prior, lax rules used for version object creation. Parsing for use() is unchanged. version.pm adds two globals, $STRICT and $LAX, containing regular expressions that define the rules. There are two additional functions -- version::is_strict and version::is_lax -- that test an argument against these rules. However, parsing of strings that might contain version numbers is done in core via the Perl_scan_version function, which may be called during compilation or may be called later when version objects are created by Perl_new_version or Perl_upg_version. A new helper function, Perl_prescan_version, has been added to validate a string under either strict or lax rules. This is used in toke.c for 'package NAME VERSION' in strict mode and by Perl_scan_version in lax mode. It matches the behavior of the verison.pm regular expressions, but does not use them directly. A new test file, comp/packagev.t, validates strict and lax behaviors of 'package NAME VERSION' and 'version->new(VERSION)' respectively and verifies their behavior against the $STRICT and $LAX regular expressions, as well. Validating these two implementation should help ensure they each work as intended. Other files and tests have been modified as necessary to support these changes. There is remaining work to be done in a few areas: * documenting all changes in behavior and new functions * determining proper treatment of "," as decimal separators in various locales * updating diagnostics for new error messages * porting changes back to the version.pm distribution on CPAN, including pure-Perl versions
* Make new is_utf8_X_* functions publicRafael Garcia-Suarez2009-12-131-0/+10
|
* lexer APIZefram2009-11-151-0/+11
| | | | | | | | | Attached is a patch that adds a public API for the lowest layers of lexing. This is meant to provide a solid foundation for the parsing that Devel::Declare and similar modules do, and it complements the pluggable keyword mechanism. The API consists of some existing variables combined with some new functions, all marked as experimental (which making them public certainly is).
* Bareword sub lookupsZefram2009-11-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Attached is a patch that changes how the tokeniser looks up subroutines, when they're referenced by a bareword, for prototype and const-sub purposes. Formerly, it has looked up bareword subs directly in the package, which is contrary to the way the generated op tree looks up the sub, via an rv2cv op. The patch makes the tokeniser generate the rv2cv op earlier, and dig around in that. The motivation for this is to allow modules to hook the rv2cv op creation, to affect the name->subroutine lookup process. Currently, such hooking affects op execution as intended, but everything goes wrong with a bareword ref where the tokeniser looks at some unrelated CV, or a blank space, in the package. With the patch in place, an rv2cv hook correctly affects the tokeniser and therefore the prototype-based aspects of parsing. The patch also changes ck_subr (which applies the argument context and checking parts of prototype behaviour) to handle subs referenced by an RV const op inside the rv2cv, where formerly it would only handle a gv op inside the rv2cv. This is to support the most likely kind of modified rv2cv op. The attached patch is the resulting revised version of the bareword sub patch. It incorporates the original patch (allowing rv2cv op hookers to control prototype processing), the GV-downgrading addition, and a mention in perldelta.
* Partially fix Win32 link following commit 88e1f1aSteve Hay2009-11-061-0/+1
| | | | There is currently still a linker error about PL_keyword_plugin.
* somewhat fix failing regex tests. but break lots of other stuff at the same timeYves Orton2009-10-191-0/+3
|
* Add Perl_ck_warner_d(), which combines Perl_ckwarn_d() and Perl_warner().Nicholas Clark2009-10-121-0/+1
| | | | | 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-0/+1
| | | | | | | 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.
* Remove obsolete functions is_uni_alnumc, is_uni_alnumc_lc, is_utf8_alnumcRafael Garcia-Suarez2009-09-131-3/+0
|
* In C<use utf8; a=>'b'>, do not set utf8 flag on 'a' [perl #68812]Chip Salzenberg2009-08-261-0/+1
|
* Merge gv_AVadd(), gv_HVadd() and gv_SVadd() into gv_add_by_type().Nicholas Clark2009-08-081-0/+1
| | | | The "short" names become macro wrappers, and the Perl_* versions become mathoms.
* Introduce save_hdelete() and SAVEHDELETE()Vincent Pit2009-07-251-0/+1
| | | | save_hdelete() is just like save_delete() except that it takes an SV instead of char buffer.
* Introduce save_aelem_flags()Vincent Pit2009-07-251-1/+1
| | | | It's the symmetric of save_helem_flags(). save_aelem() is now a macro wrapping around save_aelem_flags().
* 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