summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Allow mro_isa_changed_in to be called on nonexistent packagesFather Chrysostomos2010-10-116-23/+50
| | | | | | | | | | | | | | | | | This is necessary for an upcoming bug fix. (For this bug: @left::ISA = 'outer::inner'; @right::ISA = 'clone::inner'; *clone:: = \%outer::; print left->isa('clone::inner'),"\n"; print right->isa('outer::inner'),"\n"; ) This commit actually replaces mro_isa_changed_in with mro_isa_changed_in3. See the docs for it in the diff for mro.c.
* Avoid calling Gcovert() when stringifying 0.0 and -0.0Nicholas Clark2010-10-111-21/+15
| | | | | | Previously we always called Gconvert(), then tested its string output, then fixed that up if necessary. This way has fewer tests. We can also reduce the memory allocation for the string output for the case of zero.
* Install l1_char_class_tab.h on VMS.Craig A. Berry2010-10-101-2/+5
|
* Remove some excess cleverness from the Bhk macros.Ben Morrow2010-10-105-21/+21
| | | | | | | | | Allowing BhkENTRY(bhk, start) to look up the bhk_start member defeats much of the point of having a bhk_ prefix in the first place: if a member is added later called (say) 'bhk_die', any invocation of BhkENTRY(bhk, die) will expand to BhkENTRY(bhk, Perl_die) because of the API macros. Requiring BhkENTRY(bhk, bhk_start), while tedious, is much safer.
* plugin mechanism to rewrite calls to a subroutineZefram2010-10-1018-275/+1123
| | | | | | | | | | | | | | | | | | | | | | | | New magic type PERL_MAGIC_checkcall attaches a function to a CV, which will be called as the second half of the op checker for an entersub op calling that CV. Default state, in the absence of this magic, is to process the CV's prototype if it has one, or apply list context to all the arguments if not. New API functions cv_get_call_checker() and cv_set_call_checker() provide a clean interface to this facility, hiding the internal use of magic. Expose in the API the new functions rv2cv_op_cv(), ck_entersub_args_list(), ck_entersub_args_proto(), and ck_entersub_args_proto_or_list(), which are meaningful segments of standard entersub op checking and are likely to be useful in plugged-in call checker functions. Expose new API function op_contextualize(), which is a public interface to the internal scalar()/list()/scalarvoid() functions. This API is likely to be required in most plugged-in call checker functions. Incidentally add new function mg_free_type(), in the API, which will remove magic of one type from an SV. (mg_free() removes all magic, and there isn't anything else more selective.)
* make sv_clear() non-recursive on RVsDavid Mitchell2010-10-111-1/+1
| | | | | | | The previous two commits made it non-recursive on AVs. With that machinery in place, it's now trivial to extend it to RVs too. This means that now any depth nesting of AVs and RVs will be freed in a single call to sv_clear().
* re-indent sv_clear()David Mitchell2010-10-111-209/+217
| | | | | | The previous commit wrapped most of sv_clear in a big while loop, but didn't re-indent everything, to keep the change clear. So re-indent now, and wrap long lines. Only whitespace changes.
* make sv_clear() iterate over AVsDavid Mitchell2010-10-113-13/+97
| | | | | | | | | | | | | In sv_clear(), rather than calling av_undef(), iterate over the AV's elements. This is the first stage in making sv_clear() non-recursive, and thus non-stack-blowing when freeing deeply nested structures. Since we no longer have the stack to maintain the chain of AVs currently being iterated over, we instead store a pointer to the previous AV in the AvARRAY[AvMAX] slot of the currently-being-iterated AV. Since our first action is to pop the first SV, that slot is guaranteed to be free, and (in theory) nothing should be messing with the AV while we iterate over its elements, so that slot should remain undisturbed.
* stop DEBUG_LEAKING_SCALARS, er, leaking!David Mitchell2010-10-111-0/+1
| | | | | When cloning an SV, new_SV() was setting sv_debug_file, then we immediately set it again without freeing the first one.
* regcomp.c: Fix compiler warningKarl Williamson2010-10-101-1/+1
| | | | | Another compiler gave another warning, that this should fix. The expression should have been cast to a bool all along
* Add an inheritance diagram to package_aliases.tFather Chrysostomos2010-10-101-0/+9
|
* Don't assume filenames can contain parenthesesCraig A. Berry2010-10-101-19/+25
| | | | | in the new File::DosGlob tests that came in with 2f3c8ce922663caa9b02d9fddae7536225b6f95d.
* Move regen scripts to regen/Steffen Mueller2010-10-1013-21/+21
| | | | | Moves the various scripts that are called by regen.pl to a subdirectory to reduce clutter.
* Mention a few more auto-generated files in pumpkin.podSteffen Mueller2010-10-101-1/+2
|
* Make more ways to move packages around reset isa cachesFather Chrysostomos2010-10-092-43/+103
| | | | | | | | This makes string-to-glob assignment and hashref-to-glob assignment reset isa caches by calling mro_package_moved, if the glob’s name ends with ::. Related to [perl #75176].
* Avoid uninitialized warning in glob_assign_globFather Chrysostomos2010-10-091-1/+1
|
* Remove code added by c8bbf675 that turns out to be unnecessaryFather Chrysostomos2010-10-091-25/+0
|
* Oops. Remove a duplicate require.Father Chrysostomos2010-10-091-1/+1
|
* Update gitignore files for moved pod scriptsFlorian Ragwitz2010-10-104-0/+7
|
* Pod/Html.pm is now in ext/Pod-HtmlFlorian Ragwitz2010-10-101-0/+1
|
* [perl #78306] Clearify inc_version_list config in INSTALLZsbán Ambrus2010-10-091-0/+7
|
* Reset isa on stash manipulationFather Chrysostomos2010-10-098-5/+201
| | | | | | | | | | | | This only applies to glob-to-glob assignments and deletions of stash elements. Other types of stash manipulation are dealt with by subse- quent patches. It adds mro_package_moved, a private function that iterates through subpackages, calling mro_isa_changed_in on each. This is related to [perl #75176], but is not the same bug. It simply got in the way of fixing [perl #75176].
* Make the new perl5db.t taint test work on VMS.Craig A. Berry2010-10-091-0/+1
| | | | Follow-up to 07004ebbe530fe5ce1c67e63c0b8e1c0aa77b3b9.
* Add VMS symbol shortening to PL_bincompat_options.Craig A. Berry2010-10-091-0/+3
|
* Create populate_isa() to de-duplicate logic to populate @ISA.Nicholas Clark2010-10-094-26/+54
| | | | | | | Previously yylex() was conditionally populating @AnyDBM_File::ISA (if it was not set, and the token dbmopen was seen), and init_predump_symbols() was populating @IO::File::ISA (unconditionally, but this is so early that nothing previously could have set it). This refactoring eliminates code duplication.
* do not use both "a lvalue" and "an lvalue" but pick oneRicardo Signes2010-10-091-2/+2
|
* Remove now-unused parameters from S_gv_magicalize_isa().Nicholas Clark2010-10-094-9/+8
| | | | 997daa56862a0fc7 eliminated the need for passing these in.
* Move the automatic instantiation of @AnyDBM_File::ISA to Perl_yylex()Nicholas Clark2010-10-092-16/+17
| | | | | | | | | | | case KEY_dbmopen in Perl_yylex() has always had special-case code to create @AnyDBM_File::ISA, using GV_ADDMULTI. S_gv_magicalize_isa() [part of Perl_gv_fetchpvn_flags()] has special case code to spot "AnyDBM_File::ISA" being created with GV_ADDMULTI, and populate the variable if it is empty. Grouping the special case code in one place makes more sense. Removing the special case code from gv.c means that there is no longer a check clause in the code path for *every* package's @ISA initialisation.
* Update perldelta.pod for threads::shared upgradeChris 'BinGOs' Williams2010-10-081-1/+5
|
* Upgrade to threads::shared 1.34Jerry D. Hedden2010-10-082-4/+4
| | | | Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
* Remove dead code from Perl_gv_stashpvn().Nicholas Clark2010-10-081-4/+2
| | | | | | | | GvHV() and HvNAME() will both always already be set, as gv_fetchpvn_flags() will initialise these as it walks the string in its initial loop to locate the correct stash, then return early because name == name_end. This code has been dead since it was added in 5.000.
* Make compiler-shortened symbols the default on VMS.Craig A. Berry2010-10-081-1/+1
| | | | | | | | | It used to be that once or twice per decade a symbol longer than 31 characters snuck into the core and we had to manually shorten it to get the build working. But it's happened twice in the last month, most recently with the humanly unswallowable function name XS_XS__APItest__XSUB_XS_VERSION_undef, so the need for a more general solution has become not only apparent but mandatory.
* Let the compiler shorten symbols on VMS.Craig A. Berry2010-10-081-5/+55
| | | | | | | | | | | | | | | | | | | | | Traditionally Perl does its own name shortening in ExtUtils::XSSymSet to get around the 31-character limit on symbol names in the VMS linker. That method predates the availability of the /NAMES=SHORTENED option in the C compiler, which uses the same algorithm as the C++ name mangler to produce shortened symbols. This change makes configuration with -Duseshortenedsymbols select the compiler's shortening over the home-grown shortening. The advantages of the compiler option over the home-grown option are that hand-coded long symbols in the core can be handled (instead of only generated XS_... symbols); long symbols in external libraries can be handled; and eventually we can remove XSSymSet and have less to maintain. 84efe3dfc6afbd8ea017ddcc4d5d213cc1a35c72 is required to travel wherever this change travels for extension building to work properly.
* ExtUtils::XSSymSet can now let the compiler shorten symbols.Craig A. Berry2010-10-081-4/+16
| | | | | | | | | If the soon-to-be-implemented configuration option -Duseshortenedsymbols has been selected, bypass the home-grown symbol shortening traditionally done by xsubpp because the compiler's /NAMES=SHORTENED feature will be used instead. This is only relevant on VMS.
* Fix bugs in e771aaa95f65a9c4 (reducing copying in gv_fetchpvn_flags)Nicholas Clark2010-10-081-8/+9
| | | | Bug spotting and 1 fix by Jerry D. Hedden.
* Refactor Perl_xs_apiversion_bootcheck()Nicholas Clark2010-10-081-7/+12
| | | | Use fewer mortals, and avoid leaking an SV if upg_version() croaks.
* Convert the implementation of XS_APIVERSION_BOOTCHECK to a function.Nicholas Clark2010-10-085-18/+37
| | | | | | The previous macro generated over .5K of object code. This is in every shared object, and is only called once. Hence this change increases the perl binary by about .5K (once), to save .5K for every XS module loaded.
* XS::APItest tests for XS_APIVERSION_BOOTCHECK.Nicholas Clark2010-10-083-0/+22
|
* xs_version_bootcheck() is an implementation detail, rather than a public API.Nicholas Clark2010-10-081-1/+3
| | | | XS_VERSION_BOOTCHECK() is the public API.
* Refactor xs_version_bootcheck() to remove complex constructions.Nicholas Clark2010-10-081-13/+22
| | | | | | Replace complex format strings ternary conditionals with an if/else block. Avoid assignment within expressions. Directly use the SV for the module's name, rather than converting it to a char *.
* xs_version_bootcheck() must use mortals, as {new,upg}_version() can croak.Nicholas Clark2010-10-086-8/+51
| | | | | | | It's unlikely that XS_VERSION will contain a bogus version string (for long), but the value passed in (or derived from $XS_VERSION or $VERSION) might well. For that case, without this change, temporary SVs created within xs_version_bootcheck() won't be freed (before interpreter exit).
* threads::shared should not FREETMPS in its BOOT code.Nicholas Clark2010-10-082-2/+3
| | | | | | | | | | | perl_construct() sets the current interpreter context, and ends in an ENTER. Hence threads::shared needs to restore the interpreter context, and balance the ENTER with a leave. Previously it was using its PERL_SET_CONTEXT() macro, which also contains a FREETMPS. However, this FREETMPS is erroneous in this specific context, as it does not have a balancing SAVETMPS. Hence calling SAVETMPS here would run it in the context of the shared interpreter, but it would (attempt to) free up temporaries created in the context of the parent interpreter.
* Change vverify() to return HV or NULL (RT#78286)David Golden2010-10-084-31/+32
| | | | | | | | | | Multiple code paths were dereferencing version objects without checking the underlying type, which could result in segmentation faults per RT#78286 This patch consolidates all dereferencing into vverify() and has vverify return the underlying HV or NULL instead of a boolean value.
* Perl_gv_fetchpvn_flags() can avoid copying when the package separator is ::Nicholas Clark2010-10-081-8/+9
|
* Fix unicode characters in Locale-Maketext ChangeLogChris 'BinGOs' Williams2010-10-081-1/+1
|
* Fix pod/buildtoc's handling of Win32 makefilesSteve Hay2010-10-073-24/+25
| | | | | | The state of the POD file cleanup code in the Win32 makefiles had parted company with what pod/buildtoc was looking for. Fix the script for the current state of play and regenerate the makefiles.
* Bring Locale::Maketext ChangeLog up to date with all recent commitsTodd Rinaldo2010-10-071-2/+15
| | | | Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
* Convert the implementation of XS_VERSION_BOOTCHECK to a function from a macro.Nicholas Clark2010-10-075-37/+53
| | | | | | The macro expansion generates over 1K of object code. This is in every shared object, and is only called once. Hence this change increases the perl binary by about 1K (once), to save 1K for every XS module loaded.
* XS::APItest tests for XS_VERSION_BOOTCHECK.Nicholas Clark2010-10-075-1/+126
|
* Improve XSLoader::load documentation.Nicholas Clark2010-10-071-4/+8
| | | | | Document that all arguments are passed on to the module's bootstrap function, and the behaviour of the bootstrap function in modules built by xsubpp.