platform/upstream/perl.git
13 years agoUpdate Unicode-Collate to CPAN version 0.64
Chris 'BinGOs' Williams [Sun, 31 Oct 2010 11:46:43 +0000 (11:46 +0000)]
Update Unicode-Collate to CPAN version 0.64

  [DELTA]

  0.64  Sun Oct 31 14:17:29 2010
    - U::C::Locale newly supports locale: ja.
    - added Unicode::Collate::CJK::JISX0208 for ja.
    - a subroutine specified in 'overrideCJK' or 'overrideHangul' is allowed
      to return an integer or undef value.
    - fix: Ideographs Ext.A are assigned since UCA Version 9 (Unicode 3.1).
           This fix should affect only the case of (UCA_Version => 8).

13 years agoMerge the implementation of B::{dowarn,sub_generation} using ALIAS.
Nicholas Clark [Sun, 31 Oct 2010 11:39:53 +0000 (11:39 +0000)]
Merge the implementation of B::{dowarn,sub_generation} using ALIAS.

13 years agoMerge the implementation of B::{minus_c,save_BEGINSs} using ALIAS.
Nicholas Clark [Sun, 31 Oct 2010 09:52:40 +0000 (09:52 +0000)]
Merge the implementation of B::{minus_c,save_BEGINSs} using ALIAS.

13 years agoRemove the conditional #define of OPpPAD_STATE from the BOOT block in B.xs
Nicholas Clark [Sun, 31 Oct 2010 09:43:15 +0000 (09:43 +0000)]
Remove the conditional #define of OPpPAD_STATE from the BOOT block in B.xs

This can now be done with less code in the Makefile.PL since commit
b1826b71659a2c08 changed B to use ExtUtils::Constant

13 years agoRemove the variables stash and export_ok from the BOOT block in B.xs
Nicholas Clark [Sun, 31 Oct 2010 09:31:31 +0000 (09:31 +0000)]
Remove the variables stash and export_ok from the BOOT block in B.xs

These are no longer needed since commit b1826b71659a2c08 changed how B was
generating its exported constants.

13 years agoMerge the implementation of B::HE::{VAL,SVKEY_force} using ALIAS.
Nicholas Clark [Sun, 31 Oct 2010 08:35:14 +0000 (08:35 +0000)]
Merge the implementation of B::HE::{VAL,SVKEY_force} using ALIAS.

13 years agoMerge the implementation of B::CV::{XSUB,XSUBANY} using ALIAS.
Nicholas Clark [Sun, 31 Oct 2010 08:16:54 +0000 (08:16 +0000)]
Merge the implementation of B::CV::{XSUB,XSUBANY} using ALIAS.

13 years agoTests for [perl #77358]
Father Chrysostomos [Sun, 31 Oct 2010 01:32:22 +0000 (18:32 -0700)]
Tests for [perl #77358]

13 years ago[perl #77358] ISA warnings after aliasing packages
Father Chrysostomos [Sun, 31 Oct 2010 01:19:56 +0000 (18:19 -0700)]
[perl #77358] ISA warnings after aliasing packages

This commit makes mro_package_moved call mro_isa_changed_in on the
stash that has been assigned if it did not have an effective name
(HvENAME) before the assignment.

This is what was happening:

{package Right} # autovivify it
@thing::ISA = qw[Left];
*Left:: = delete $::{"Right::"};

When Right is deleted, it is not attached to the symbol table any
more, so it has no effective name. mro_isa_changed_in3 is called on
it, which resets the caches and then proceeds to cache a new isa linearisation. The new linearisation, of course, does not use the
name ‘Left’.

When Right is assigned over the top of Left, Right is given an
HvENAME of ‘Left’. Then mro_isa_changed_is3 is called on the
original Left, which, in turn, calls mro_isa_changed on its sub-
classes. So thing’s isa linearisation is calculated, which is just
‘thing’ + get_linear_isa(Left) (where ‘Left’ now refers to what was previously called Right). This ends up using the bad linearisation.

So the linearisation of a heretofore effectively nameless stash must
be recalculated, but after it has been given a name.

If it has an effective name already, then it appears elsewhere in the
symbol table, and its effective name does not change. (The name added
simply becomes an alternative to switch to should the HvENAME become
invalid.) So the existing isa cache is fine and we do not need to call
mro_isa_changed_in.

(That is a rather lengthy commit message, is it not?)

13 years agoSet stash names before calling mro_isa_changed_in3
Father Chrysostomos [Sat, 30 Oct 2010 21:27:48 +0000 (14:27 -0700)]
Set stash names before calling mro_isa_changed_in3

mro_isa_changed_in3 cannot update isa caches properly if it only sees
an intermediate state.

13 years agoMake B::HV::NAME an ALIAS of B::GV::NAME, as both convert HEKs to SVs.
Nicholas Clark [Sat, 30 Oct 2010 20:29:39 +0000 (21:29 +0100)]
Make B::HV::NAME an ALIAS of B::GV::NAME, as both convert HEKs to SVs.

Previously B::HV::NAME was a simple XS wrapper around HvNAME(), which meant a
conversion to a char *, and then back to an SV.

13 years agoMerge B::BM::PREVIOUS, B::BM::RARE and B::BM::USEFUL into the common accessor.
Nicholas Clark [Sat, 30 Oct 2010 20:02:58 +0000 (21:02 +0100)]
Merge B::BM::PREVIOUS, B::BM::RARE and B::BM::USEFUL into the common accessor.

On this platform this reduces object code size by over 2K.

13 years agoMerge branch 'blead' of perl5.git.perl.org:/gitroot/perl into blead
David Mitchell [Sat, 30 Oct 2010 19:37:32 +0000 (20:37 +0100)]
Merge branch 'blead' of perl5.git.perl.org:/gitroot/perl into blead

13 years agoMerge B::HV::MAX and B::HV::KES into the common accessor.
Nicholas Clark [Sat, 30 Oct 2010 19:34:39 +0000 (20:34 +0100)]
Merge B::HV::MAX and B::HV::KES into the common accessor.

On this platform this reduces object code size by about 1.5K

13 years agoRT #63790: &{PL_sv_yes} corrupted mark stack
David Mitchell [Sat, 30 Oct 2010 19:15:18 +0000 (20:15 +0100)]
RT #63790: &{PL_sv_yes} corrupted mark stack

Calling a subref whose value was PL_sv_yes, and without args,
failed to pop an entry off the mark stack

13 years agoMerge all B::CV structure accesses into the common accessor code.
Nicholas Clark [Sat, 30 Oct 2010 19:06:56 +0000 (20:06 +0100)]
Merge all B::CV structure accesses into the common accessor code.

On this platform this reduces the object size by 7K.

(CvDEPTH() was changed from a long to I32 in change bb17208353b2f15e in 2006 -
B.xs was never updated)

13 years agoMerge B::AV::MAX and B::FM::LINES into the common accessor.
Nicholas Clark [Sat, 30 Oct 2010 17:22:41 +0000 (18:22 +0100)]
Merge B::AV::MAX and B::FM::LINES into the common accessor.

On this platform this reduces object code size by over 1.5K

13 years agoMerge all B::IO structure accesses into the common accessor code.
Nicholas Clark [Sat, 30 Oct 2010 16:15:27 +0000 (17:15 +0100)]
Merge all B::IO structure accesses into the common accessor code.

On this platform this reduces the object size by 9K.

(IoLINES(), IoPAGE(), IoPAGE_LEN() and IoLINES_LEFT() were changed from
long to IV in commit 11a7ac70a867da65 in 2001 - B.xs was never updated)

13 years agoComment typo
Father Chrysostomos [Sat, 30 Oct 2010 16:48:44 +0000 (09:48 -0700)]
Comment typo

13 years agoMove the meta->isa code from UNIVERSAL::isa to mro_get_linear_isa
Father Chrysostomos [Sat, 30 Oct 2010 16:38:24 +0000 (09:38 -0700)]
Move the meta->isa code from UNIVERSAL::isa to mro_get_linear_isa

This is so that it can be used for PL_isarev bookkeeping as well.

This will have no effect on the speed of DFS classes. C3 classes on
which ->isa is never called will have a slight slowdown. (We could
always add an API for setting meta->isa if we want to avoid that.)

13 years agoMerge B::GV::{STASH,GvFLAGS} into the common accessor.
Nicholas Clark [Sat, 30 Oct 2010 13:56:53 +0000 (14:56 +0100)]
Merge B::GV::{STASH,GvFLAGS} into the common accessor.

On this platform this reduces the object code size by over 1K.

13 years agoSwitch UNIVERSAL::isa over to HvENAME
Father Chrysostomos [Sat, 30 Oct 2010 13:52:24 +0000 (06:52 -0700)]
Switch UNIVERSAL::isa over to HvENAME

13 years agoSuppress warning from gv.t
Father Chrysostomos [Sat, 30 Oct 2010 13:52:00 +0000 (06:52 -0700)]
Suppress warning from gv.t

13 years agoA plethora of isarev tests
Father Chrysostomos [Sat, 30 Oct 2010 13:51:33 +0000 (06:51 -0700)]
A plethora of isarev tests

13 years agoCorrect reference to get_linear_isa in get_isarev’ description
Father Chrysostomos [Sat, 30 Oct 2010 12:48:41 +0000 (05:48 -0700)]
Correct reference to get_linear_isa in get_isarev’ description

13 years agoTo-do tests for isarev (more to come)
Father Chrysostomos [Sat, 30 Oct 2010 12:46:47 +0000 (05:46 -0700)]
To-do tests for isarev (more to come)

13 years agoIncrease mro’s version
Father Chrysostomos [Sat, 30 Oct 2010 12:15:36 +0000 (05:15 -0700)]
Increase mro’s version

13 years agoMerge the direct structure lookup for B::{PV,PVMG,PVLV} to the common routine.
Nicholas Clark [Sat, 30 Oct 2010 13:26:53 +0000 (14:26 +0100)]
Merge the direct structure lookup for B::{PV,PVMG,PVLV} to the common routine.

On this platform this reduces the object code size by about 5K.

13 years agoMerge the direct structure lookup for B::IV:: and B::NV:: into 1 routine.
Nicholas Clark [Sat, 30 Oct 2010 12:43:34 +0000 (13:43 +0100)]
Merge the direct structure lookup for B::IV:: and B::NV:: into 1 routine.

As for OPs and GPs, encode the type and offset in the XS alias integer.
Use different names for the type macros, to give them different constant
values, to allow the 3 accessor routines to have no gaps in the values used
for the set of types that they deal with. Otherwise, at least 1 switch
statement would compile to a jump table with "holes".

On this platform, this refactoring reduces the object code size by 4.5K.

13 years agoMerge the implementation of B::IV::{needs64bits,packiv} using ALIAS.
Nicholas Clark [Sat, 30 Oct 2010 11:09:26 +0000 (12:09 +0100)]
Merge the implementation of B::IV::{needs64bits,packiv} using ALIAS.

13 years ago257e0650 used the "wrong" croak() - correct B::GV:SV to use Perl_croak().
Nicholas Clark [Sat, 30 Oct 2010 10:40:08 +0000 (11:40 +0100)]
257e0650 used the "wrong" croak() - correct B::GV:SV to use Perl_croak().

Perl_croak() is a variable argument C function, hence can't have a macro to
permit the use of croak() with/without a context pointer. croak *is* defined
as a macro, substituting croak_nocontext. But we have a context to hand, so we
can use Perl_croak() directly.

13 years agoMerge B::GV::{file,name} using ALIAS.
Nicholas Clark [Sat, 30 Oct 2010 10:10:18 +0000 (11:10 +0100)]
Merge B::GV::{file,name} using ALIAS.

This saves about 700 bytes of object code on this platform.

13 years agoFor B's GP accessors, encode the type and offset in the XS alias integer.
Nicholas Clark [Sat, 30 Oct 2010 09:35:27 +0000 (10:35 +0100)]
For B's GP accessors, encode the type and offset in the XS alias integer.

This allows most of the code for simple structure lookups in the GP of a GV to
be merged into one XS routine. This saves over 5.5K of object code on this
platform.

13 years agoIn B.xs, move the direct COP access for stash and file into the common code.
Nicholas Clark [Sat, 30 Oct 2010 08:03:29 +0000 (09:03 +0100)]
In B.xs, move the direct COP access for stash and file into the common code.

Both pairs of accessors are provided for both ithreads and not, but for each,
one pair is direct structure access, and 1 pair "faked up" with a more comple
macro. The direct structure access pair uses the common code (B::OP::next)

This reduces the object code by about 1K for both threaded and unthreaded
builds.

13 years agoMacros are not called with aTHX_
Father Chrysostomos [Sat, 30 Oct 2010 06:11:51 +0000 (23:11 -0700)]
Macros are not called with aTHX_

13 years agoSwitch S_mro_get_linear_isa_c3 to HvENAME
Father Chrysostomos [Sat, 30 Oct 2010 05:55:07 +0000 (22:55 -0700)]
Switch S_mro_get_linear_isa_c3 to HvENAME

13 years agoRemove the #ifdef PERL_CORE surrounding the HvENAME* macros
Father Chrysostomos [Sat, 30 Oct 2010 05:51:13 +0000 (22:51 -0700)]
Remove the #ifdef PERL_CORE surrounding the HvENAME* macros

13 years agoAdd HvENAME_HEK
Father Chrysostomos [Sat, 30 Oct 2010 05:26:34 +0000 (22:26 -0700)]
Add HvENAME_HEK

13 years agoAdd docs for hv_ename_*
Father Chrysostomos [Sat, 30 Oct 2010 05:17:44 +0000 (22:17 -0700)]
Add docs for hv_ename_*

13 years agoperlmroapi: suggest HvNAME as a fallback
Father Chrysostomos [Sat, 30 Oct 2010 05:12:55 +0000 (22:12 -0700)]
perlmroapi: suggest HvNAME as a fallback

13 years agoAdd test for the crashes fixed in 00169e2
Father Chrysostomos [Sat, 30 Oct 2010 05:07:32 +0000 (22:07 -0700)]
Add test for the crashes fixed in 00169e2

13 years agoSwitch the core MRO code over to HvENAME
Father Chrysostomos [Sat, 30 Oct 2010 03:45:34 +0000 (20:45 -0700)]
Switch the core MRO code over to HvENAME

This has the side-effect of fixing these one-liners:

$ perl5.13.5 -le' my $glob = \*foo::ISA; delete $::{"foo::"}; *$glob = *a'
Bus error
$ perl5.13.5 -le' my $glob = \*foo::ISA; delete $::{"foo::"}; *$glob = []'
Bus error
$ perl5.13.6 -le'sub baz; my $glob = \*foo::bar; delete $::{"foo::"}; *$glob = *baz;'
Bus error
$ perl5.13.6 -le'sub foo::bar; my $glob = \*foo::bar; delete $::{"foo::"}; *$glob = *baz;'
Bus error

In the first two cases the crash was inadvertently fixed (isn’t it
nice when that happens?) in 5.13.6 (by 6f86b615fa7), but there was
still a fatal error:
Can't call mro_isa_changed_in() on anonymous symbol table at -e line 1.

Because sv_clear calls ->DESTROY, if an object’s stash has been
detached from the symbol table, mro_get_linear_isa can be called on a
hash with no HvENAME. So HvNAME is used as a fallback for those cases.

13 years agoAdd HvENAME
Father Chrysostomos [Fri, 29 Oct 2010 15:59:33 +0000 (08:59 -0700)]
Add HvENAME

Add HvENAME as an alias for HvENAME_get and make it public.

This is now the preferred name for use in isa caches.

13 years agoIn S_hv_delete_common, call mro_package_moved after the deletion
Father Chrysostomos [Fri, 29 Oct 2010 13:17:28 +0000 (06:17 -0700)]
In S_hv_delete_common, call mro_package_moved after the deletion

13 years agoFix Math::BigInt::FastCalc build under Win32 with croak_xs_usage().
George Greer [Sat, 30 Oct 2010 00:39:33 +0000 (20:39 -0400)]
Fix Math::BigInt::FastCalc build under Win32 with croak_xs_usage().

13 years agoMerge B::COP::{cop_seq,hints,line} into the common B::OP accessor XS code.
Nicholas Clark [Fri, 29 Oct 2010 20:40:18 +0000 (21:40 +0100)]
Merge B::COP::{cop_seq,hints,line} into the common B::OP accessor XS code.

On this platform, this saves almost 2.5K.

Keep IVp last in the switch values, as it's only used for ithreads. Otherwise
there would be an avoidable hole in the jump table for the non-ithreads object
code.

13 years agoMerge B::PADOP::{gv,sv} using the ALIAS mechanism.
Nicholas Clark [Fri, 29 Oct 2010 20:01:08 +0000 (21:01 +0100)]
Merge B::PADOP::{gv,sv} using the ALIAS mechanism.

On this platform, this saves around 600 bytes.

13 years agoMerge B::PADOP::padix into the common B::OP accessor XS code.
Nicholas Clark [Fri, 29 Oct 2010 19:43:49 +0000 (20:43 +0100)]
Merge B::PADOP::padix into the common B::OP accessor XS code.

On this platform, this saves about 800 bytes.

13 years agoSort the MANIFEST (after change 1222f39eae03eee3)
Nicholas Clark [Fri, 29 Oct 2010 20:18:56 +0000 (22:18 +0200)]
Sort the MANIFEST (after change 1222f39eae03eee3)

13 years agoAdd test for [perl #78674]
Father Chrysostomos [Fri, 29 Oct 2010 19:55:22 +0000 (12:55 -0700)]
Add test for [perl #78674]

13 years agoMerge B::SVOP::{gv,sv} into the common B::OP accessor XS code.
Nicholas Clark [Fri, 29 Oct 2010 19:30:23 +0000 (20:30 +0100)]
Merge B::SVOP::{gv,sv} into the common B::OP accessor XS code.

On this platform, this saves about 700 bytes.

13 years agoIn B.xs, move conditionally defined PMOP macros to their points of use.
Nicholas Clark [Fri, 29 Oct 2010 18:55:49 +0000 (19:55 +0100)]
In B.xs, move conditionally defined PMOP macros to their points of use.

Remove the definition for PMOP_pmflags, now unused.

13 years ago[perl #78674] Fix stack pointer corruption in pp_concat() with 'use encoding'
Niko Tyni [Thu, 28 Oct 2010 20:52:17 +0000 (23:52 +0300)]
[perl #78674] Fix stack pointer corruption in pp_concat() with 'use encoding'

sv_utf8_upgrade_nomg() may reallocate the stack via sv_recode_to_utf8()
if 'use encoding' is in effect, causing stack pointer corruption.

13 years agoUse STDOUT in defout.t to suppress that ‘#foo’ under TEST/harness
Father Chrysostomos [Fri, 29 Oct 2010 16:28:57 +0000 (09:28 -0700)]
Use STDOUT in defout.t to suppress that ‘#foo’ under TEST/harness

13 years agoMerge B::PMOP::precomp and B::PMOP::reflags, using the ALIAS mechanism.
Nicholas Clark [Fri, 29 Oct 2010 16:34:00 +0000 (17:34 +0100)]
Merge B::PMOP::precomp and B::PMOP::reflags, using the ALIAS mechanism.

Like B::PMOP::pmoffset, this needs to be controlled by C pre-processor symbols,
so can't be done with an ALIAS keyword.

This saves just over .5K on this platform.

13 years agoMerge B::PMOP::pmoffset into the common B::OP accessor XS code.
Nicholas Clark [Fri, 29 Oct 2010 16:08:24 +0000 (17:08 +0100)]
Merge B::PMOP::pmoffset into the common B::OP accessor XS code.

13 years agoReorder parts of B.xs to reduce the amount of conditionally compiled code.
Nicholas Clark [Fri, 29 Oct 2010 15:42:52 +0000 (16:42 +0100)]
Reorder parts of B.xs to reduce the amount of conditionally compiled code.

Some code with #ifdef guards on PERL_VERSION can be merged.
B::COP::label can have a C<const char *> return type on all perl versions.

13 years agoMerge B::PMOP::pmflags into the common B::OP accessor XS code.
Nicholas Clark [Thu, 28 Oct 2010 16:34:01 +0000 (17:34 +0100)]
Merge B::PMOP::pmflags into the common B::OP accessor XS code.

This saves about 800 bytes on this platform.

13 years agoFor B's OP accessors, encode the type and offset in the XS alias integer.
Nicholas Clark [Thu, 28 Oct 2010 10:29:21 +0000 (11:29 +0100)]
For B's OP accessors, encode the type and offset in the XS alias integer.

This allows most of the code for simple structure lookups to be merged into
one XS routine. Start by merging U8 and PADOFFSET lookups in struct op with
the existing common OP* accessor code. This saves over 2K of object code on
this platform.

13 years agoMerge all B::OP::* accessors returning B::OP objects.
Nicholas Clark [Wed, 27 Oct 2010 15:27:27 +0000 (16:27 +0100)]
Merge all B::OP::* accessors returning B::OP objects.

Use the ALIAS value to store the member's offset within the structure, and
perform explicit pointer arithmetic to read it. This reduces the object size
by about 5K on this platform.

13 years agoMath::BigInt::FastCalc doesn't need to set $BASE or $BASE_LEN.
Nicholas Clark [Thu, 28 Oct 2010 19:17:29 +0000 (20:17 +0100)]
Math::BigInt::FastCalc doesn't need to set $BASE or $BASE_LEN.

The variables are neither documented nor exported, and nothing on CPAN uses
them. Hence there is no need to set them, which means that the return list from
Math::BigInt::Calc::_base_len() can be passed directly into FastCalc's XS
bootstrap.

13 years agoMath::BigInt::FastCalc doesn't need to override methods in a BEGIN block.
Nicholas Clark [Thu, 28 Oct 2010 18:10:17 +0000 (19:10 +0100)]
Math::BigInt::FastCalc doesn't need to override methods in a BEGIN block.

The BEGIN context of the code C<use>ing it will be early enough for the
subroutine assignments to take full effect.

13 years agoRefactor FastCalc to initialise BASE and BASE_LEN as part of bootstrap.
Nicholas Clark [Thu, 28 Oct 2010 13:57:13 +0000 (14:57 +0100)]
Refactor FastCalc to initialise BASE and BASE_LEN as part of bootstrap.

This avoids the need for a separate, special, one-shot _set_XS_BASE routine.
We take advantage of the fact that all arguments to XSLoader::load() are passed
on to the module's bootstrap routine.

13 years agoReorder the list return of Math::BigInt::Calc::_base_len().
Nicholas Clark [Thu, 28 Oct 2010 13:15:01 +0000 (14:15 +0100)]
Reorder the list return of Math::BigInt::Calc::_base_len().

A search of CPAN shows that this private function is only used internally
between Math::BigInt::Calc, Math::BigInt::FastCalc and their test suites.

13 years agoFix NAMECOUNT output format in dump.c
Father Chrysostomos [Fri, 29 Oct 2010 05:34:10 +0000 (22:34 -0700)]
Fix NAMECOUNT output format in dump.c

Remove quotation marks and, as a bonus, eliminate a compiler warning.

13 years agohv_ename_delete should not delete the HvNAME
Father Chrysostomos [Fri, 29 Oct 2010 05:22:10 +0000 (22:22 -0700)]
hv_ename_delete should not delete the HvNAME

This is something that 78b79c7758 missed.

When xhv_name is a HEK *, it is both the regular name and the effect-
ive name at the same time. Only when xhv_name_count is negative is the
regular name not also the effective name.

hv_ename_delete needs to take the HEK that xhv_name points to and
put it in a new HEK * array in xhv_name. This array will just have
one element.

When xhv_name_count is negative, effective names start with the second
element. So we set xhv_name_count to -1 so there isn’t one.

13 years agoB::GV::is_empty and B::GV::isGV_with_GP can be merged using ALIAS.
Nicholas Clark [Fri, 29 Oct 2010 11:41:10 +0000 (12:41 +0100)]
B::GV::is_empty and B::GV::isGV_with_GP can be merged using ALIAS.

This saves about 700 bytes on this platform.

13 years agoUpdate CPANPLUS to CPAN version 0.9010
Chris 'BinGOs' Williams [Fri, 29 Oct 2010 11:04:32 +0000 (12:04 +0100)]
Update CPANPLUS to CPAN version 0.9010

  [DELTA]

  CHanges for 0.9010      Thu Oct 28 23:20:19 2010
  ================================================
  * Added PERL_MM_OPT to the CPANPLUS-Dist-MM test to hopefully
    resolve RT#57241 which relates to local::lib and cpanm

  Changes for 0.9009      Mon Oct 25 21:03:39 2010
  ================================================
  * Resolve issues with the SQLite source engine

  Changes for 0.9008      Mon Oct 25 17:01:34 2010
  ================================================
  * Normalise prereqs version strings before resolving prereqs

13 years agoB::PV::PV doesn't need a special case for pad names post 5.9.x
Nicholas Clark [Fri, 29 Oct 2010 11:01:11 +0000 (12:01 +0100)]
B::PV::PV doesn't need a special case for pad names post 5.9.x

The PV-related flags on SVs used to store names in pads were made sane by
commit 931b58fb28fa5ca7.

13 years agoUse the same XS body for B::IV::RV and B::PV::RV.
Nicholas Clark [Fri, 29 Oct 2010 10:29:38 +0000 (11:29 +0100)]
Use the same XS body for B::IV::RV and B::PV::RV.

This reduces the object code size by about 600 bytes on this platform.

The input typemap checking makes no distinction between different SV types,
so the XS body will generate the same C code, despite the different XS
"types". So there is no change in behaviour from doing newXS like this,
compared with the old approach of having a (near) duplicate XS body.
We should fix the typemap checking.

13 years agoA clearer implementation of B::SV::object_2svref()
Nicholas Clark [Fri, 29 Oct 2010 09:59:23 +0000 (10:59 +0100)]
A clearer implementation of B::SV::object_2svref()

The same number of lines of code, but it avoids using 2 #defines simply to
take advantage of typemap entries, which the reader may not be familiar with.

13 years agoB::SV{REFCNT,FLAGS,SvTYPE,POK,ROK,MAGICAL} can be implemented via ALIAS.
Nicholas Clark [Fri, 29 Oct 2010 09:28:53 +0000 (10:28 +0100)]
B::SV{REFCNT,FLAGS,SvTYPE,POK,ROK,MAGICAL} can be implemented via ALIAS.

Maksing the flags directly here breaks a bit of the encapsulation of sv.h, but
saves about 4K on this platform.

13 years agoUpdate CPANPLUS-Dist-Build to CPAN version 0.50
Chris 'BinGOs' Williams [Fri, 29 Oct 2010 08:49:11 +0000 (09:49 +0100)]
Update CPANPLUS-Dist-Build to CPAN version 0.50

  [DELTA]

  0.50 Thu Oct 28 23:02:19 BST 2010
    - We clear the relevant env vars that effect Module::Build
      during the 'install' test. local::lib and cpanm set these.

13 years agoRecommend a more reliable way of identifying magic
Florian Ragwitz [Fri, 29 Oct 2010 07:03:23 +0000 (09:03 +0200)]
Recommend a more reliable way of identifying magic

Also illustrate it with some example code.

13 years agoTeach dump.c about all magic flags
Florian Ragwitz [Fri, 29 Oct 2010 06:42:03 +0000 (08:42 +0200)]
Teach dump.c about all magic flags

Also rearrange the flags according to their value and trim some trailing
whitespace in that area.

13 years agoTeach dump.c about ENAMEs
Father Chrysostomos [Fri, 29 Oct 2010 05:06:33 +0000 (22:06 -0700)]
Teach dump.c about ENAMEs

13 years agoadd SAVEFREECOPHH()
Zefram [Thu, 28 Oct 2010 21:01:11 +0000 (22:01 +0100)]
add SAVEFREECOPHH()

Add the facility for the save stack to free (decrement the refcount of)
a COPHH*.

13 years agoFile::CheckTree.t: @INC should be change for chdir
Karl Williamson [Thu, 28 Oct 2010 04:54:59 +0000 (22:54 -0600)]
File::CheckTree.t: @INC should be change for chdir

This test has a workaround for windows that isn't needed if it just sets
up the @INC initially to allow for finding things both before and after
the chdir.

And, it's unreasonable to expect that nothing it calls would in turn
never do their own module load, so the @INC needs to be correct anyway.

13 years agoIn B.xs, move the definition of PMOP_pmnext adjacent to its usage.
Nicholas Clark [Thu, 28 Oct 2010 15:36:56 +0000 (16:36 +0100)]
In B.xs, move the definition of PMOP_pmnext adjacent to its usage.

Now it lives within the #ifdef guarding the conditional compilation of the only
code that uses it.

13 years agoThe method B::PMOP::pmregexp never existed. Remove it from the documentation.
Nicholas Clark [Thu, 28 Oct 2010 15:03:49 +0000 (16:03 +0100)]
The method B::PMOP::pmregexp never existed. Remove it from the documentation.

A macro was added for it when B.xs was first written, but that macro was never
used for a method definition.

13 years agoIn S_scan_const(), use the return value of my_sprintf() to avoid a strlen().
Nicholas Clark [Thu, 28 Oct 2010 13:55:51 +0000 (14:55 +0100)]
In S_scan_const(), use the return value of my_sprintf() to avoid a strlen().

Brought to you by the campaign for the elimination of strlen().

13 years agoMerge the XS implementation of B::OP::name and B::OP::desc
Nicholas Clark [Thu, 28 Oct 2010 12:17:06 +0000 (13:17 +0100)]
Merge the XS implementation of B::OP::name and B::OP::desc

This saves 4 lines of source code, but over 1K of object code.

13 years agoperldelta up to 0b6a3b5adbe83
Father Chrysostomos [Thu, 28 Oct 2010 07:04:58 +0000 (00:04 -0700)]
perldelta up to 0b6a3b5adbe83

13 years agoIncrease Hash::Util::FieldHash’s version
Father Chrysostomos [Thu, 28 Oct 2010 06:44:06 +0000 (23:44 -0700)]
Increase Hash::Util::FieldHash’s version

13 years agoDefer to perlfunc on \G and pos()
brian d foy [Thu, 28 Oct 2010 06:49:57 +0000 (01:49 -0500)]
Defer to perlfunc on \G and pos()

13 years agoMerge branch 'briandfoy/pos' into blead
brian d foy [Thu, 28 Oct 2010 06:38:30 +0000 (01:38 -0500)]
Merge branch 'briandfoy/pos' into blead

13 years agoNote that pos() only affects the next match RT #78636
brian d foy [Thu, 28 Oct 2010 06:36:57 +0000 (01:36 -0500)]
Note that pos() only affects the next match RT #78636

13 years agoType- and think-o’s
Father Chrysostomos [Thu, 28 Oct 2010 06:33:31 +0000 (23:33 -0700)]
Type- and think-o’s

13 years agoperldelta for 2acc3314e31
Father Chrysostomos [Thu, 28 Oct 2010 06:31:08 +0000 (23:31 -0700)]
perldelta for 2acc3314e31

13 years agoperldelta up to e1be28b42dd83 plus corrections
Father Chrysostomos [Thu, 28 Oct 2010 06:12:01 +0000 (23:12 -0700)]
perldelta up to e1be28b42dd83 plus corrections

13 years agoIncrease Sys::Hostname’s version
Father Chrysostomos [Thu, 28 Oct 2010 05:56:37 +0000 (22:56 -0700)]
Increase Sys::Hostname’s version

13 years agoRevert "Bump charnames’ version"
Father Chrysostomos [Thu, 28 Oct 2010 05:55:13 +0000 (22:55 -0700)]
Revert "Bump charnames’ version"

This reverts commit fc7c69e2154d208e45cf3f5c98b74ed035d8f50c.

13 years agoRun 01SelfLoader.t also under taint mode
Father Chrysostomos [Thu, 28 Oct 2010 05:16:37 +0000 (22:16 -0700)]
Run 01SelfLoader.t also under taint mode

This is to test for [perl #72062].

13 years agoMark failing tests in t/op/stash.t as to-do
Father Chrysostomos [Thu, 28 Oct 2010 04:49:03 +0000 (21:49 -0700)]
Mark failing tests in t/op/stash.t as to-do

Commit 78b79c775, in adding test for the breakage introduced in
35759254, inadvertently triggered a bug that goes back at least to
perl 5.8.7, but which only occurs with threads.

13 years agofix pod formatting in perldelta.pod
David Golden [Wed, 27 Oct 2010 22:34:11 +0000 (18:34 -0400)]
fix pod formatting in perldelta.pod

13 years agoperldelta up to 157486ae134392
Father Chrysostomos [Wed, 27 Oct 2010 20:46:13 +0000 (13:46 -0700)]
perldelta up to 157486ae134392

13 years agoIncrease SDBM_File’s version
Father Chrysostomos [Wed, 27 Oct 2010 20:43:05 +0000 (13:43 -0700)]
Increase SDBM_File’s version

13 years agoIncrease Hash::Util’s version
Father Chrysostomos [Wed, 27 Oct 2010 20:41:02 +0000 (13:41 -0700)]
Increase Hash::Util’s version

13 years agoIncrease Fcntl’s version
Father Chrysostomos [Wed, 27 Oct 2010 20:28:38 +0000 (13:28 -0700)]
Increase Fcntl’s version

13 years agoperldelta up to 582b18310
Father Chrysostomos [Wed, 27 Oct 2010 19:59:24 +0000 (12:59 -0700)]
perldelta up to 582b18310