This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Jarkko Hietaniemi [Thu, 18 Sep 2014 18:46:24 +0000 (14:46 -0400)]
Unused return value.
Jarkko Hietaniemi [Thu, 18 Sep 2014 18:45:38 +0000 (14:45 -0400)]
Conditionally unused variable.
Jarkko Hietaniemi [Thu, 18 Sep 2014 18:38:59 +0000 (14:38 -0400)]
Comment detypo.
Jarkko Hietaniemi [Thu, 18 Sep 2014 18:38:07 +0000 (14:38 -0400)]
Add dVAR:s for -DPERL_GLOBAL_STRUCT.
Jarkko Hietaniemi [Thu, 18 Sep 2014 17:51:34 +0000 (13:51 -0400)]
Make certain we have the top-level "lib" in @INC.
Jarkko Hietaniemi [Thu, 18 Sep 2014 14:53:35 +0000 (10:53 -0400)]
hexfp: use the bytewise extraction also for plain doubles.
Instead of the frexp+ldexp way which doesn't work when NVSIZE > UVSIZE.
Jarkko Hietaniemi [Thu, 18 Sep 2014 11:31:59 +0000 (07:31 -0400)]
Add comment about the double-double extraction.
Jarkko Hietaniemi [Thu, 18 Sep 2014 11:26:20 +0000 (07:26 -0400)]
Document the double-double format a little.
Daniel Dragan [Thu, 18 Sep 2014 17:16:17 +0000 (13:16 -0400)]
more NAN FP fixs for VC6/NAN_COMPARE_BROKEN compilers
op/infnan.t now passes all tests on VC6
Steffen Mueller [Thu, 18 Sep 2014 15:45:39 +0000 (17:45 +0200)]
Data::Dumper version bump for CPAN release
Tony Cook [Mon, 30 Jun 2014 02:16:03 +0000 (12:16 +1000)]
don't recurse infinitely in Data::Dumper
Add a configuration variable/option to limit recursion when dumping
deep data structures.
Defaults the limit to 1000, which can be reduced or increase, or
eliminated by setting it to 0.
This patch addresses CVE-2014-4330. This bug was found and
reported by: LSE Leading Security Experts GmbH employee Markus
Vervier.
Steve Hay [Thu, 18 Sep 2014 12:25:36 +0000 (13:25 +0100)]
Revert
a231c375cc and fix
61cd60c6c5 differently instead
Change
a231c375cc fixed the GCC build, broken by
61cd60c6c5, but
unfortunately also caused a test failure in the very same GCC build:
ext/XS-APItest/t/print.t test 11. There is no way to print long doubles
with formatting functions in msvcrt.dll (which is what MinGW/MinGW-w64
use by default) because that doesn't support long doubles at all, other
than as a synonym for doubles. Defining PERL_PRIfldbl gave APItest.xs the
false expectation that printing a long double with it would work, but it
does not. Hence, revert
a231c375cc for now. (Future commits will add
optional GCC-only support for using long doubles by using some MinGW-
specific formatting functions instead.)
We now fix the GCC build breakage in sv.c by simply testing for whether
PERL_PRIgldbl is defined (just like APItest.xs already tests for whether
PERL_PRIfldbl is defined). Now that it once again isn't defined, we fall
through to the #else case, which is what VC uses anyway since its
LONG_DOUBLESIZE is equal to its DOUBLESIZE.
Father Chrysostomos [Thu, 18 Sep 2014 07:15:21 +0000 (00:15 -0700)]
gv.h: Comment typo
Father Chrysostomos [Thu, 18 Sep 2014 06:50:58 +0000 (23:50 -0700)]
Teach dump.c:debop about CV refs in stashes
This is what -Dt was giving:
$ ./miniperl -Dt -e 'sub foo{} &foo'
EXECUTING...
(-e:0)enter
(-e:0)nextstate
(-e:1)pushmark
(-e:1)gvAssertion failed: (isGV_with_GP(_gvstash)), function Perl_gv_fullname4, file gv.c, line 2341.
Abort trap: 6
Father Chrysostomos [Thu, 18 Sep 2014 06:41:00 +0000 (23:41 -0700)]
perlop tweak
Consider this a follow-up to
fc6933476.
Father Chrysostomos [Thu, 18 Sep 2014 06:40:03 +0000 (23:40 -0700)]
[Merge] Eliminate IS_PADGV etc.
The core no longer uses IS_PADGV, IS_PADCONST, or GvIN_PAD. They were
no longer needed and never really worked properly.
Father Chrysostomos [Thu, 18 Sep 2014 06:21:11 +0000 (23:21 -0700)]
Remove GVf_IN_PAD
Nothing on CPAN uses it, but some CPAN modules use the associ-
ated macros.
Father Chrysostomos [Thu, 18 Sep 2014 06:18:54 +0000 (23:18 -0700)]
Only #define IS_(PADGV|CONST) if !PERL_CORE
and give IS_PADGV a simpler definition.
These are not used in the perl core any more and shouldn’t be.
The IS_PADGV definition checked for the IN_PAD flag, which flag never
made much sense (see the prev. commit’s message). Since any GV could
end up with that flag, and since any GV coming near a pad would get
it, it might as well have been turned on for all GVs (except copies).
So just check whether the thingy is a GV.
Father Chrysostomos [Thu, 18 Sep 2014 06:13:33 +0000 (23:13 -0700)]
pad.c: Stop turning on GvIN_PAD
This flag never really made any sense. It allows us to identify
whether a GV is being used by a pad (e.g., for *foo under ithreads),
but *any* GV could have this set and there is no way to know whether
it was set for the pad we are currently looking at.
Father Chrysostomos [Thu, 18 Sep 2014 05:10:47 +0000 (22:10 -0700)]
Remove !IS_PADGV assertions
Commit
60779a30f stopped setting PADTMP on GVs in pads,
and changed many instances of if(SvPADTMP && !IS_PADGV) to
if(SvPADTMP){assert(!IS_PADGV)...}.
This PADTMP was leftover from the original ithreads implementation
that marked these as PADTMP under the assumption that anything in a
pad had to be marked PADMY or PADTMP.
Since we don’t want these GVs copied the way operator targets are
(PADTMP indicates the latter), we needed this !IS_PADGV check all over
the place.
60779a30f was actually right in removing the flag and the !IS_PADGV
check, because it should be possible for XS modules to create ops that
return copiable GVs. But the assertions prevent that from working.
More importantly (to me at least), this IS_PADGV doesn’t quite make
sense and I am trying to eliminate it.
BTW, you have to be doubly naughty, but it is possible to fail these
assertions:
$ ./perl -Ilib -e 'BEGIN { sub { $::{foo} = \@_; constant::_make_const(@_) }->(*bar) } \ foo'
Assertion failed: (!IS_PADGV(sv)), function S_refto, file pp.c, line 576.
Abort trap: 6
Father Chrysostomos [Thu, 18 Sep 2014 03:35:15 +0000 (20:35 -0700)]
Change IS_PADGV to isGV in op.c:newPADOP
IS_PADGV is about to go bye-bye. IS_PADGV was returning true only
for GVs marked as being present in the pad. But since any GV can
make its way in there (just mention *foo under threads), it’s actually
somewhat meaningless.
This check in newPADOP is perhaps useless, too, since it is only called
by newGVOP in core (so sv is always a GV), and by B::Generate on CPAN,
which, again, gives it a GV.
Father Chrysostomos [Thu, 18 Sep 2014 03:30:00 +0000 (20:30 -0700)]
pad.c:padlist_clone: Don’t bother with IS_PADGV
As of
c9859fbde1 and
c2bad63bb3, PadnamePV(name) will be non-null
for all pad GVs.
Father Chrysostomos [Thu, 18 Sep 2014 03:28:21 +0000 (20:28 -0700)]
pad.c:pad_push: Don’t bother with IS_PADGV
As of
c9859fbde1 and
c2bad63bb3, PadnamePV(name) will be true for
all pad GVs.
Father Chrysostomos [Thu, 18 Sep 2014 03:27:46 +0000 (20:27 -0700)]
pad.c:cv_clone_pad: Don’t bother with IS_PADGV
As of
c9859fbde1 and
c2bad63bb3, namesv && PadnamePV(namesv) will be
true for all pad GVs.
Father Chrysostomos [Thu, 18 Sep 2014 03:25:54 +0000 (20:25 -0700)]
pad.c:pad_tidy: Remove IS_PADCONST and another IS_PADGV
Checking these is no longer necessary, since the only thing this loop
does is handle entries that close over variables from outer subrou-
tines. IS_PADGV and IS_PADCONST will never be true for those.
Father Chrysostomos [Thu, 18 Sep 2014 03:23:29 +0000 (20:23 -0700)]
pad.c:pad_tidy: Remove redundant IS_PADGV
GVs are stored in the pads in two code paths, newPADOP when called by
newGVOP, and ck_rvconst. Both of those now set the pad name to
&PL_sv_no, as of
c9859fbde1 and
c2bad63bb3. So GVs are now excluded
from the check a few lines below, just like constants.
Father Chrysostomos [Thu, 18 Sep 2014 03:20:53 +0000 (20:20 -0700)]
pad.c:pad_alloc: Remove redundant IS_PADGV
GVs are stored in the pads in two code paths, newPADOP when called by
newGVOP, and ck_rvconst. Both of those now set the pad name to
&PL_sv_no, as of
c9859fbde1 and
c2bad63bb3. So by the time this
check is reached, IS_PADGV can never be true.
Karl Williamson [Fri, 5 Sep 2014 04:48:22 +0000 (22:48 -0600)]
regcomp.c: White-space only
Karl Williamson [Thu, 18 Sep 2014 04:42:17 +0000 (22:42 -0600)]
perlop: Nits
Karl Williamson [Thu, 18 Sep 2014 02:58:20 +0000 (20:58 -0600)]
bisect-runner.pl: Correct pod misspelling
Jarkko Hietaniemi [Sat, 13 Sep 2014 23:10:54 +0000 (19:10 -0400)]
POSIX pod tweaks.
Steve Hay [Wed, 17 Sep 2014 20:52:31 +0000 (21:52 +0100)]
perldelta - Fix a typo and remove a trailing space
Jarkko Hietaniemi [Wed, 17 Sep 2014 17:42:22 +0000 (13:42 -0400)]
Use more NAN_COMPARE_BROKEN.
VC6 landed on new code paths thanks to more NaN.
Jarkko Hietaniemi [Wed, 17 Sep 2014 17:40:10 +0000 (13:40 -0400)]
If numtype is inf/nan, don't bother with Atof.
Jarkko Hietaniemi [Wed, 17 Sep 2014 17:01:03 +0000 (13:01 -0400)]
If numtype is inf/nan, don't do Atof and iv/uv cast.
The return values are bogus, especially so for nan, but what can you do.
Yves Orton [Wed, 17 Sep 2014 14:14:01 +0000 (16:14 +0200)]
silence diagnostics in regen/regcomp.pl for now
Jarkko Hietaniemi [Wed, 17 Sep 2014 13:45:02 +0000 (09:45 -0400)]
Use the Perl_isfinite multiplication fallback last.
Otherwise we shadow e.g. the Win32 _isfinite.
Steve Hay [Wed, 17 Sep 2014 13:12:12 +0000 (14:12 +0100)]
regen_config_h for GCC
(Note: Had to locally undo
c69a26e800 to avoid trouble redefining stdio to
PerlIO when building in a minimal configuration with USE_PERLIO=undef!)
Steve Hay [Wed, 17 Sep 2014 13:08:47 +0000 (14:08 +0100)]
Define PERL_PRI[efg]ldbl and PERL_SCNfldbl in Win32 canned config files
Without PERL_PRIgldbl, the gcc build on Win32 is completely broken,
stopping at sv.c in the miniperl build since
61cd60c6c5 added a use of
PERL_PRIgldbl in its new FV_GF.
Steve Hay [Wed, 17 Sep 2014 12:59:04 +0000 (13:59 +0100)]
regen_config_h for VC++
(Note: Had to locally undo
c69a26e800 to avoid trouble redefining stdio to
PerlIO when building in a minimal configuration with USE_PERLIO=undef!)
Steve Hay [Wed, 17 Sep 2014 12:57:18 +0000 (13:57 +0100)]
Eliminate pointless win32/makefile.mk macro
As per
6e75769d30 and previous commit.
Steve Hay [Wed, 17 Sep 2014 12:36:30 +0000 (13:36 +0100)]
Remove pointless variable in win32/config_sh.PL
$int64f is always 'I64' since
6e75769d30 so there is no longer any point
in it.
Steve Hay [Wed, 17 Sep 2014 07:48:26 +0000 (08:48 +0100)]
Module::CoreList - re-order so that Porting/corelist.pl runs ok
Steve Hay [Wed, 17 Sep 2014 07:38:47 +0000 (08:38 +0100)]
perldelta - Add links for rt.perl.org bugs
Steve Hay [Wed, 17 Sep 2014 07:33:31 +0000 (08:33 +0100)]
perldelta - Start updating modules
Steve Hay [Wed, 17 Sep 2014 07:26:26 +0000 (08:26 +0100)]
Remove reference to obsolete threads version in Porting/cmpVERSION.pl
Steve Hay [Wed, 17 Sep 2014 07:24:56 +0000 (08:24 +0100)]
Teach Porting/cmpVERSION.pl about Scalar-List-Utils (broken by
cb8c84586a)
Yves Orton [Wed, 17 Sep 2014 04:57:26 +0000 (06:57 +0200)]
only produce diagnostic warnings in regen/regcomp.pl when STDERR is a terminal
Yves Orton [Wed, 17 Sep 2014 02:36:57 +0000 (04:36 +0200)]
Perl RT #122761 - split /\A/ should not behave like split /^/m
Long ago a weird special case was hacked into split so that it
treated C<split /^/> as if it was C<split /^/m>. At the time this
was done by letting the split PP code inspect the pattern, and IFF
it matched "^\0" the special behavior was enabled (which also
bypasses using the regex engine for matching.)
Later on when we added pluggable regex engines and when we
encountered various counter-intuitive behaviors related to split
we changed who this worked so that the regex engine would
set flags appropriate for split to use. This meant that regex
plugins using totally different regex syntax could still enable
the optimisation. At the same time I modified how we detected
this pattern type by looking at the *compiled* regops, and not
the raw pattern. This had the side effect of making things like
C< split /(?:)^/ > also enable the optimisation.
Unfortunately this did not play nicely with the fact that /^/
produces an SBOL node, as does /\A/, but we definitely don't want
C<split /\A/> to behave like C<split /^/m>. In fact C<split /\A/>
should behave like a noop (which means there is room for a future
optimisation here if someone cares to implement it.)
In the discussion attached to the ticket I propose what I consider
to be a better fix, default split patterns to be compiled by default
with the /m modifier enabled. This patch does NOT do this. It is
instead the "simple" patch. This means that C<split /^/> behaves like
C<split /^/m> but C<split /^x/> does NOT behave like C<split /^x/m>
which I consider to be a bug which I will fix in a future patch.
Yves Orton [Wed, 17 Sep 2014 02:10:35 +0000 (04:10 +0200)]
change NODE_ALIGN_FILL to set flags to 0
In
075abff3 Andy Lester set the flags field of regops
to default to 0xde. I find this really weird, and possibly dangerous,
as it seems to me reasonable to assume a new regop would have this
field set to 0, so that later on code can set it to something else
if necessary. (Which is what I wanted to do.)
Since nothing breaks if I set it to 0x0 and I find that to be a much
more natural default than 0xde (the prefix of 0xdeadbeef), I am
changing this to set it to 0.
Yves Orton [Tue, 16 Sep 2014 22:23:01 +0000 (00:23 +0200)]
Eliminate the duplicative regops BOL and EOL
See also perl5porters thread titled: "Perl MBOLism in regex engine"
In the perl 5.000 release (
a0d0e21ea6ea90a22318550944fe6cb09ae10cda)
the BOL regop was split into two behaviours MBOL and SBOL, with SBOL
and BOL behaving identically. Similarly the EOL regop was split into
two behaviors SEOL and MEOL, with EOL and SEOL behaving identically.
This then resulted in various duplicative code related to flags and
case statements in various parts of the regex engine.
It appears that perhaps BOL and EOL were kept because they are the
type ("regkind") for SBOL/MBOL and SEOL/MEOL/EOS. Reworking regcomp.pl
to handle aliases for the type data so that SBOL/MBOL are of type
BOL, even though BOL == SBOL seems to cover that case without adding
to the confusion.
This means two regops, a regstate, and an internal regex flag can
be removed (and used for other things), and various logic relating
to them can be removed.
For the uninitiated, SBOL is /^/ and /\A/ (with or without /m) and
MBOL is /^/m. (I consider it a fail we have no way to say MBOL without
the /m modifier). Similarly SEOL is /$/ and MEOL is /$/m (there is
also a /\z/ which is EOS "end of string" with or without the /m).
Jarkko Hietaniemi [Tue, 16 Sep 2014 20:59:46 +0000 (16:59 -0400)]
Do not test inf/nan if utterly broken.
(The test for the brokenness was ... broken.)
(I think FC pointed this out some weeks ago.)
Jarkko Hietaniemi [Tue, 16 Sep 2014 21:20:54 +0000 (17:20 -0400)]
[perl #122788] broken nan on win32
Apparently VS 2003 smartly optimizes (HUGE_VAL-HUGE_VAL) into zero,
so using that for NaN was quite a disaster. Let instead Win32 fall
thru to the __PL_nan_u option. (HUGE_VAL for Inf is fine.)
Father Chrysostomos [Tue, 16 Sep 2014 22:50:49 +0000 (15:50 -0700)]
op.c: new is a keyword in C++
Father Chrysostomos [Tue, 16 Sep 2014 21:52:11 +0000 (14:52 -0700)]
Father Chrysostomos [Tue, 16 Sep 2014 21:51:17 +0000 (14:51 -0700)]
Father Chrysostomos [Tue, 16 Sep 2014 21:49:03 +0000 (14:49 -0700)]
Fix $DB::sub in DB::goto for lexical subs
$ PERL5DB='sub DB::DB{}' ./perl -Ilib -XMfeature=:all -de '
state sub f{};
sub DB::goto { warn $DB::sub }
$^P|=0x80;
sub {goto &f}->()'
main::f at -e line 1.
There should not be a package name. Lexical subs should be treated
like anonymous subs here; $DB::sub should contain a reference.
This bug was introduced recently, in
ae77754ae. Before that the
output was:
CODE(0x7fdbf102de58) at -e line 1.
Though before
9d8e4b9b3 it was:
Segmentation fault: 11
Steve Hay [Tue, 16 Sep 2014 21:39:39 +0000 (22:39 +0100)]
Make "NEWS" an IGNORABLE file
Term-ANSIColor-4.03 added a NEWS file which wasn't pulled in by
5e64492f64,
probably in the belief that it was IGNORABLE. Now it is!
Steve Hay [Tue, 16 Sep 2014 21:39:04 +0000 (22:39 +0100)]
Add new Digest-SHA file missed by
207902b174, and note a CUSTOMIZED file
Father Chrysostomos [Tue, 16 Sep 2014 20:10:38 +0000 (13:10 -0700)]
Make sort bareword respect lexical subs
—something I completely missed when implementing them.
Chris 'BinGOs' Williams [Tue, 16 Sep 2014 17:31:23 +0000 (18:31 +0100)]
Update ExtUtils-Manifest to CPAN version 1.68
[DELTA]
1.68 Tue, Sep 16, 2014
- Fix regression with manifind() and following symlinks
Father Chrysostomos [Tue, 16 Sep 2014 16:43:31 +0000 (09:43 -0700)]
Make ‘No comma allowed’ respect lex subs
$ ./perl -lIlib -XMfeature=:all -e 'sub foo {} print foo,bar'
bar
$ ./perl -lIlib -XMfeature=:all -e 'state sub foo {} print foo,bar'
No comma allowed after filehandle at -e line 1.
This commit makes the latter behave like the former.
Father Chrysostomos [Tue, 16 Sep 2014 12:47:17 +0000 (05:47 -0700)]
lexsub.t: To-do tests for sort lex_sub
Father Chrysostomos [Tue, 16 Sep 2014 12:32:35 +0000 (05:32 -0700)]
toke.c: Remove obsolete comment
345b37853 removed the associated parameter.
Chris 'BinGOs' Williams [Tue, 16 Sep 2014 12:12:40 +0000 (13:12 +0100)]
Update ExtUtils-Install to CPAN version 2.04
[DELTA]
2.04
- Cosmetic change as forgot to update version information in POD on last two
releases
2.02
- Reverted change to pm_to_blib that causes write-only directory paths to
be created
2.00
- Formal release to change META information and synchronise versioning
Chris 'BinGOs' Williams [Tue, 16 Sep 2014 09:01:26 +0000 (10:01 +0100)]
Synchronise Maintainers.pl for Module-CoreList
Steve Hay [Tue, 16 Sep 2014 08:24:11 +0000 (09:24 +0100)]
Note that one MakeMaker test is currently CUSTOMIZED
Steve Hay [Tue, 16 Sep 2014 08:11:18 +0000 (09:11 +0100)]
Remove IGNORABLE files from ExtUtils-Install as per
8db6555210
(now that it's under cpan/, rather than dist/, since
d393d7e5ec)
Steve Hay [Tue, 16 Sep 2014 08:00:39 +0000 (09:00 +0100)]
Upgrade Archive-Tar from version 2.00 to 2.02
Steve Hay [Tue, 16 Sep 2014 07:53:07 +0000 (08:53 +0100)]
Update 5.20 release schedule: Plan for 5.20.2 in January
And add a missing development release engineer to the list.
Father Chrysostomos [Tue, 16 Sep 2014 05:27:05 +0000 (22:27 -0700)]
Exclude lex sub package name from (caller $n)[3]
Commit
ae77754ae caused it to start including the package name. Pre-
viously, lexical subs were reported as ‘(unknown)’.
Now we have more expected output:
$ ./perl -Ilib -XMfeature=:all -e 'my sub x{warn +(caller 0)[3]} x'
x at -e line 1.
Father Chrysostomos [Tue, 16 Sep 2014 03:39:22 +0000 (20:39 -0700)]
mg.c: Avoid reifying GV for undefined sig handler
Father Chrysostomos [Tue, 16 Sep 2014 03:34:32 +0000 (20:34 -0700)]
Make ‘SIG handler not defined’ UTF8- and null-safe
Father Chrysostomos [Tue, 16 Sep 2014 01:03:41 +0000 (18:03 -0700)]
Avoid reifing GVs in gv.c:gv_try_downgrade
I’m not sure that it’s even possible for a CV with a name hek to reach
this code path, but if that happens this avoids reifying the GV.
Father Chrysostomos [Tue, 16 Sep 2014 00:54:51 +0000 (17:54 -0700)]
Fix compiler warnings
See ticket #116735.
Father Chrysostomos [Mon, 15 Sep 2014 23:56:46 +0000 (16:56 -0700)]
Father Chrysostomos [Mon, 15 Sep 2014 23:11:03 +0000 (16:11 -0700)]
Avoid reifying GVs when lex subs are used for overload
Takes more code, but I think the new code is clearer....
Father Chrysostomos [Mon, 15 Sep 2014 22:53:31 +0000 (15:53 -0700)]
Stop undef &foo from temporarily anonymising
Instead of setting aside the name, calling cv_undef, and then naming
the sub anew, just pass a flag to tell cv_undef not to unname it.
Father Chrysostomos [Mon, 15 Sep 2014 21:50:00 +0000 (14:50 -0700)]
Avoid reifying GV when lex stub is used as method
Ricardo Signes [Mon, 15 Sep 2014 23:03:36 +0000 (19:03 -0400)]
delete/exists on array elements is discouraged, not deprecated
For further discussion, see (among other things)
http://nntp.perl.org/group/perl.perl5.porters/218752
Ricardo Signes [Mon, 15 Sep 2014 22:19:41 +0000 (18:19 -0400)]
document how to graduate from experimental status
Ricardo Signes [Mon, 15 Sep 2014 22:19:28 +0000 (18:19 -0400)]
release schedule: Max M. will do December 2014
Father Chrysostomos [Mon, 15 Sep 2014 21:28:22 +0000 (14:28 -0700)]
Fix assertion failure with undef &my_sub/&anon
$ ./perl -Ilib -le 'use experimental lexical_subs; my sub x; undef &x;'
Assertion failed: (isGV_with_GP(_gvname_hek)), function Perl_leave_scope, file scope.c, line 1035.
Abort trap: 6
pp_undef undefines a subroutine via cv_undef, which wipes out the
name, and then restores the name again afterwards.
For subs with GVs, it would call CvGV_set afterwards with the same gv.
But cv_undef could have freed the GV, if the CV held the only refer-
ence count.
I caused this for lexical subs a few commits ago in
ae77754ae (because
CvGV will always return non-null; in fact the CvNAME_HEK code in
pp_undef is no longer exercised, but I will address that soon).
For anonymous subs it is older:
$ perl5.14.4 -e '$_ = sub{}; delete $::{__ANON__}; undef &$_; use Devel::Peek; Dump $_'
SV = IV(0x7fed9982f9c0) at 0x7fed9982f9d0
REFCNT = 1
FLAGS = (ROK)
RV = 0x7fed9982f9e8
SV = PVCV(0x7fed9982e290) at 0x7fed9982f9e8
REFCNT = 2
FLAGS = (PADMY,WEAKOUTSIDE,CVGV_RC)
COMP_STASH = 0x7fed99806b68 "main"
ROOT = 0x0
GVGV::GV = 0x7fed9982fa48Assertion failed: (isGV_with_GP(_gvname_hek)), function Perl_do_gvgv_dump, file dump.c, line 1477.
Abort trap: 6
(Probably commit
803f2748.)
Presumably that could be made to crash in other ways than introspec-
tion, but it is much harder.
This commit fixes the problem by fiddling with reference counts. But
this is only a temporary fix. I think I plan to stop cv_undef from
removing the name (gv/hek) when called from pp_undef.
Father Chrysostomos [Mon, 15 Sep 2014 16:35:50 +0000 (09:35 -0700)]
Peek.t needs to know about the prev. change
Father Chrysostomos [Mon, 15 Sep 2014 16:34:41 +0000 (09:34 -0700)]
dump.c: Don’t dump GvFLAGS as part of GP
The flags are not actually stored in the GP. Dumping them as part of
it implies that they are shared between globs that share the same GP,
which is not the case.
Father Chrysostomos [Mon, 15 Sep 2014 16:41:57 +0000 (09:41 -0700)]
Father Chrysostomos [Mon, 15 Sep 2014 16:42:13 +0000 (09:42 -0700)]
perldelta: Insert missing =item
Father Chrysostomos [Mon, 15 Sep 2014 06:03:08 +0000 (23:03 -0700)]
Increase $Term::ReadLine::VERSION to 1.15
Father Chrysostomos [Mon, 15 Sep 2014 06:02:01 +0000 (23:02 -0700)]
Term::ReadLine: Check $^O before -e
Put faster checks first. $^O is internal to perl, but -e has to go
out to the file system.
Father Chrysostomos [Mon, 15 Sep 2014 13:22:30 +0000 (06:22 -0700)]
universal.c:croak_xs_usage: Don’t fetch context twice
Father Chrysostomos [Mon, 15 Sep 2014 13:20:16 +0000 (06:20 -0700)]
[Merge] CVs without GVs
Subroutines in packages no longer need typeglobs to live in. Concep-
tually the typeglobs still exist, and will be reified as necessary.
(This was already the case with constant subs, which could be stored
in the stash as refs to constants, but now the stash can have sub
refs, too.)
Currently this optimisation is undone if a sub is exported or used as
a method. Also, it does not apply to XSUBs.
Here is the full list of notable changes:
Internal:
• CvGV now reifies the GV if necessary.
• Lexical subs now have notional GVs, which are likewise rei-
fied by CvGV.
• The new CVf_LEXICAL flag indicates that the package name should be
dropped in error messages.
XS API:
• New cv_name function
• New cv_set_call_checker_flags function
Perl-visible changes:
• New B::safename function
Father Chrysostomos [Sat, 13 Sep 2014 03:26:04 +0000 (20:26 -0700)]
concise-xs.t needs to know about B::safename
Father Chrysostomos [Fri, 12 Sep 2014 21:14:07 +0000 (14:14 -0700)]
Tweak Peek.t again
Father Chrysostomos [Fri, 12 Sep 2014 20:40:41 +0000 (13:40 -0700)]
dump.c: Missing comma from CVf_HASEVAL output
Father Chrysostomos [Fri, 12 Sep 2014 20:38:23 +0000 (13:38 -0700)]
Teach Deparse about coderefs in stashes
Father Chrysostomos [Fri, 12 Sep 2014 20:33:55 +0000 (13:33 -0700)]
Increase $B::VERSION to 1.51
Father Chrysostomos [Fri, 12 Sep 2014 20:33:29 +0000 (13:33 -0700)]
Add safename() func to B
Father Chrysostomos [Fri, 12 Sep 2014 06:53:36 +0000 (23:53 -0700)]
Remove no-longer-used op.c:S_gv_ename
Father Chrysostomos [Fri, 12 Sep 2014 06:52:41 +0000 (23:52 -0700)]
Teach ck_entersub_args_proto about non-GV names
Now ck_subr no longer needs to vivify GVs:
$ ./miniperl -e 'sub foo{} BEGIN { warn $::{foo} } foo(); BEGIN { warn $::{foo} }'
CODE(0x7fc98282ad98) at -e line 1.
CODE(0x7fc98282ad98) at -e line 1.
Previously it was like this:
$ ./miniperl -e 'sub foo{} BEGIN { warn $::{foo} } foo(); BEGIN { warn $::{foo} }'
CODE(0x7f8ef082ad98) at -e line 1.
*main::foo at -e line 1.
Father Chrysostomos [Fri, 12 Sep 2014 06:44:45 +0000 (23:44 -0700)]
Inline op.c:too_many_arguments_sv into its only caller
I’m about to change this code anyway, and it’s easier in one spot.