Father Chrysostomos [Wed, 17 Aug 2011 19:32:33 +0000 (12:32 -0700)]
&CORE::foo() for nullary functions
This commit makes nullary subs in the CORE package callable with
ampersand syntax and through references--except for wantarray, which
is more complicated and will have its own commit.
It does this by creating an op tree like this:
$ ./perl -Ilib -MO=Concise,CORE::times -e 'BEGIN{\&CORE::times}'
CORE::times:
3 <1> leavesub[1 ref] K/REFC,1 ->(end)
- <@> lineseq K ->3
1 <$> coreargs(IV 310) v ->2
2 <0> tms ->3
-e syntax OK
The coreargs op checks to make sure there are no arguments, for now.
The 310 is the op number for times (OP_TMS).
There is no nextstate op, because we want to inherit hints from
the caller.
The __FILE__, __LINE__ and __PACKAGE__ directives are implemented
like this:
$ ./perl -Ilib -MO=Concise,CORE::__FILE__ -e 'BEGIN{\&CORE::__FILE__}'
CORE::__FILE__:
7 <1> leavesub[1 ref] K/REFC,1 ->(end)
- <@> lineseq K ->7
1 <$> coreargs(PV "__FILE__") v ->2
6 <2> lslice K/2 ->7
- <1> ex-list lK ->4
2 <0> pushmark s ->3
3 <$> const(IV 1) s ->4
- <1> ex-list lK ->6
4 <0> pushmark s ->5
5 <0> caller[t1] l ->6
-e syntax OK
The lslice op and its children are equivalent to (caller)[1].
Father Chrysostomos [Wed, 17 Aug 2011 01:02:33 +0000 (18:02 -0700)]
Add coreargs op
&CORE::foo subs will use this operator for sorting out @_.
Jesse Vincent [Thu, 18 Aug 2011 06:52:18 +0000 (09:52 +0300)]
rafl has accepted the burden of a maint release.
Jesse Vincent [Thu, 18 Aug 2011 06:52:01 +0000 (09:52 +0300)]
Dave Cross has been volunteered for a blead release
Father Chrysostomos [Wed, 17 Aug 2011 21:35:19 +0000 (14:35 -0700)]
Correct spelling of Kaňkovský
Father Chrysostomos [Tue, 16 Aug 2011 21:57:47 +0000 (14:57 -0700)]
[perl #96126] Allocate CvFILE more simply
See the thread starting at:
http://www.nntp.perl.org/group/perl.perl5.porters/2011/07/msg175161.html
Instead of assuming that only Perl subs have mallocked CvFILEs and
only under threads, resulting in various hackery to borrow parts of
the SvPVX buffer where that assumption proves wrong, we can simply
add another flag (DYNFILE) to indicate whether CvFILE is mallocked,
instead of trying to use the ISXSUB flag for two purposes.
This simplifies the code greatly, eliminating bug #96126 in the pro-
cess (which had to do with sv_dup not knowing about the hackery that
this commit removes).
I removed that comment from cv_ckproto_len about CONSTSUBs doubling up
the buffer field, as it is no longer relevant. But I still left the
code as it is, since it’s better to do an explicit length check.
Jesse Vincent [Wed, 17 Aug 2011 10:04:54 +0000 (13:04 +0300)]
Add Max as a release victim
Steve Hay [Tue, 16 Aug 2011 17:28:54 +0000 (18:28 +0100)]
Update AUTHORS following commit
f5458e3a4f.
Steve Hay [Tue, 16 Aug 2011 17:26:39 +0000 (18:26 +0100)]
Fix tabbing from commit
f5458e3a4f and bump IO::Handle version.
Stephen Oberholtzer [Tue, 16 Aug 2011 13:35:54 +0000 (09:35 -0400)]
Fix setting sockets nonblocking in Win32
Jesse Vincent [Tue, 16 Aug 2011 07:53:53 +0000 (10:53 +0300)]
Merge branch 'blead' of ssh://perl5.git.perl.org/perl into blead
* 'blead' of ssh://perl5.git.perl.org/perl:
[perl #97076] Fix mad+threads bareword strict exemption
perldelta update
Two AUTHORS fixes
Remove OPpENTERSUB_NOMOD from B::Concise
Remove OPpENTERSUB_NOMOD.
Propagate lvalue context only to children of list ops which are not in void context.
Fix tabbing and trailing whitespace from commit
f1d35e3443 and bump IO::Socket version.
Use the exception set in select (connect()) to early return when remote end is busy or in non existing port
generic perldelta entry for prototype changes
&CORE::not and &CORE::getprotobynumber
Give not and getprotobynumber listop prototypes
Document and test $; prototype syntax
Move checking of CV to GV assigned (OPpASSIGN_CV_TO_GV) from the peephole optimizer to scalarvoid
Jesse Vincent [Tue, 16 Aug 2011 07:46:33 +0000 (10:46 +0300)]
Restore (and slightly update) documentation about The Rules and the
structure of Perl 5 governance removed during the major refactoring
of perlhack.pod in
04c692a854b61dfae1266e29468ce4fb51c80512.
Jesse Vincent [Tue, 16 Aug 2011 07:46:12 +0000 (10:46 +0300)]
Add another explicit synonym for the porters.
Father Chrysostomos [Tue, 16 Aug 2011 05:30:07 +0000 (22:30 -0700)]
[perl #97076] Fix mad+threads bareword strict exemption
As reported in the ticket this was broken by:
commit
eb796c7f1a47acbd996034731639c1bb76e31a19
Author: Gerard Goossen <gerard@ggoossen.net>
Date: Tue Aug 9 20:35:06 2011 +0200
Move bareword checking from the peephole optimizer to finalize_optree. Fixes [perl #95998]
The bareword checking is moved from the peephole optimizer to finalize_optree.
newRANGE needs additional bareword checking because the constants may
be optimized away by 'gen_constant_list'.
The OPpCONST_STRICT flag is removed after giving an error about a
bareword to prevent giving multiple errors about the same bareword.
In some cases, like pipe(foo,bar), the bareword was subject to strict
'subs' even though it was meant to be exempt.
A backtrace revealed that it happened in S_finalize_op when called
recursively from this block:
#if defined(PERL_MAD) && defined(USE_ITHREADS)
{
/* Make sure mad ops are also thread-safe */
MADPROP *mp = o->op_madprop;
while (mp) {
if (mp->mad_type == MAD_OP && mp->mad_vlen) {
OP *prop_op = (OP *) mp->mad_val;
/* We only need "Relocate sv to the pad for thread safety.", but this
easiest way to make sure it traverses everything */
finalize_op(prop_op);
}
mp = mp->mad_next;
}
}
#endif
That comment about only needing to relocate the sv to the pad is
telling. If that’s the only reason for the recursive call, then
we don’t want that recursive call doing strict checking. So this
commit simply turns off the strict flag, which should be safe, since
S_no_bareword_allowed does the same thing itself.
Father Chrysostomos [Tue, 16 Aug 2011 04:47:33 +0000 (21:47 -0700)]
perldelta update
Father Chrysostomos [Mon, 15 Aug 2011 21:50:54 +0000 (14:50 -0700)]
Two AUTHORS fixes
• Correct Kankovský
• Add Karthik Rajagopalan
Father Chrysostomos [Tue, 16 Aug 2011 00:52:10 +0000 (17:52 -0700)]
Remove OPpENTERSUB_NOMOD from B::Concise
Gerard Goossen [Sat, 13 Aug 2011 16:51:48 +0000 (18:51 +0200)]
Remove OPpENTERSUB_NOMOD.
OPpENTERSUB_NOMOD was always set in combination with OPf_WANT_VOID
which is now used to not propagate the lvalue context, making
OPpENTERSUB_NOMOD redundant.
Gerard Goossen [Sat, 13 Aug 2011 16:38:13 +0000 (18:38 +0200)]
Propagate lvalue context only to children of list ops which are not in void context.
Children list ops might be in void context because the list is in scalar
context. A test that discarded elements in a list are not assigned lvalue
context is added.
Children of a list op might also be in void context because they are
special entersub ops for attributes. This patch makes the
OPpENTERSUB_NOMOD flag redundant.
Steve Hay [Mon, 15 Aug 2011 20:30:41 +0000 (21:30 +0100)]
Fix tabbing and trailing whitespace from commit
f1d35e3443
and bump IO::Socket version.
Karthik Rajagopalan [Thu, 14 Jul 2011 17:36:41 +0000 (13:36 -0400)]
Use the exception set in select (connect()) to early return when remote end is busy or in non existing port
For non blocking socket, it a timeout has been specified, IO::Socket internally use select(..) to
detect the result of socket connection. In situation, where remote end is busy or in non-existing port, we spend
entire timeout mentioned in select(..) call. We cannot completely differentiate if error is WSAECONNREFUSED(10061) or
WSAETIMEDOUT(10060) in this situation. If we use the exception set in select(..) call, we can do early return and also
a make a clear differentiation in error condition. This is same like what Linux handle in this situation.
Father Chrysostomos [Mon, 15 Aug 2011 19:45:28 +0000 (12:45 -0700)]
generic perldelta entry for prototype changes
Father Chrysostomos [Mon, 15 Aug 2011 16:28:51 +0000 (09:28 -0700)]
&CORE::not and &CORE::getprotobynumber
These two are now supported. They were not before, because their
prototypes gave them unary precedence, even though these ops both
have list precedence. That was corrected in the previous commit.
Father Chrysostomos [Mon, 15 Aug 2011 16:23:50 +0000 (09:23 -0700)]
Give not and getprotobynumber listop prototypes
They parse as list operators, but their prototypes imply unop
precedence.
Father Chrysostomos [Mon, 15 Aug 2011 16:20:08 +0000 (09:20 -0700)]
Document and test $; prototype syntax
This has worked this way for yonks. It is actually useful, so it might
as well be documented.
Gerard Goossen [Tue, 9 Aug 2011 19:33:27 +0000 (21:33 +0200)]
Move checking of CV to GV assigned (OPpASSIGN_CV_TO_GV) from the peephole optimizer to scalarvoid
Jesse Vincent [Mon, 15 Aug 2011 19:20:53 +0000 (22:20 +0300)]
Merge branch 'blead' of ssh://perl5.git.perl.org/perl into blead
* 'blead' of ssh://perl5.git.perl.org/perl: (198 commits)
CORE.pod: fix nit grammar
podcheck.t pod grammar fix
Make lock(&foo) syntax nominally lock the subroutine
Forgot one in
d677d0fca41325ba7203de00652fdeb43659754a.
Write some missing version strings in configure.com
Correct some format strings in configure.com.
Improve comments about op_private bits. And move the non op specific flags to the top.
get authors.t passing again
Update AUTHORS file and convert from Latin-1 to UTF-8
perldiag.pod on defined %hash
perldelta for &CORE::foo
Update core_prototype’s docs
Move pp_-specific code out of core_prototype
Change core_prototype to take a keyword num
Add tests for precedence of CORE:: subs
Add inlinable &CORE::functions
Make core_prototype provide the op number as well
Make sure the CORE package is always called CORE
Remove select’s prototype
B::Terse and B::Xref were missing some documentation.
...
Jesse Vincent [Mon, 15 Aug 2011 19:20:23 +0000 (22:20 +0300)]
Add Abigail as a release manager
Karl Williamson [Mon, 15 Aug 2011 15:01:27 +0000 (09:01 -0600)]
CORE.pod: fix nit grammar
Karl Williamson [Wed, 10 Aug 2011 15:47:28 +0000 (09:47 -0600)]
podcheck.t pod grammar fix
Father Chrysostomos [Mon, 15 Aug 2011 02:16:14 +0000 (19:16 -0700)]
Make lock(&foo) syntax nominally lock the subroutine
In 5.10, lock(&foo) was an error for non-lvalue subs. For lvalue
subs, it passed &foo to the lockhook and return \&foo.
In 5.12, lock(&foo) was still an error for non-lvalue subs. For
lvalue subs, it would pass &foo to the lockhook and then either
trip an assertion (-DDEBUGGING) or return &foo, resulting in inter-
esting bugs.
Commit
f4df43b5e changed lock(&lvalue_sub) to call the sub and lock
its return value.
As Reini Urban pointed out in
<CAHiT=DE5cVZbuCR3kb=Q5oCa18vo3jr5jZKmURHYha2PwF4pEQ@mail.gmail.com>,
locking a subroutine does have its uses.
Since lock(&foo) has never really worked anyway, we can still
change this.
So, for lvalue subs, this reverts back to the 5.10 behaviour. For
non-lvalue subs, it now behaves the same way, the lvalue flag making
no difference. Note that it still causes an error at run-time, if
threads::shared is loaded, as its lockhook is conservative in what
it accepts.
But this change allows for future extensibility, unlike
f4df43b5e.
A note about the implementation: There are two pieces of code (at
least) in op.c that convert an entersub op into an rv2cv, one in
S_doref and the other in Perl_op_lvalue_flags. Originally (before
f4df43b5e) it was S_doref that took care of that for OP_LOCK. But
Perl_op_lvalue_flags is called first, so it would assume it was an
assignment to a sub call and croak if there was no lvalue sub in the
symbol table. This commit adds back the special case for OP_LOCK, but
in Perl_op_lvalue_flags, not S_doref.
Craig A. Berry [Mon, 15 Aug 2011 03:04:09 +0000 (22:04 -0500)]
Craig A. Berry [Sun, 14 Aug 2011 14:36:01 +0000 (09:36 -0500)]
Write some missing version strings in configure.com
Craig A. Berry [Sun, 14 Aug 2011 13:38:35 +0000 (08:38 -0500)]
Correct some format strings in configure.com.
Some bits were missing and others were incompletely renamed back
in
6b356c8efb963846940ef92952cf77e5b86bd65e.
Gerard Goossen [Thu, 11 Aug 2011 19:41:20 +0000 (21:41 +0200)]
Improve comments about op_private bits. And move the non op specific flags to the top.
Father Chrysostomos [Sun, 14 Aug 2011 21:10:04 +0000 (14:10 -0700)]
get authors.t passing again
Ahem. Once you get things passing, you actually have to commit before
pushing. :-(
Keith Thompson [Sat, 13 Aug 2011 23:08:22 +0000 (16:08 -0700)]
Update AUTHORS file and convert from Latin-1 to UTF-8
Update my own e-mail address
Fix name for <daxim@cpan.org> (not representable in Latin-1)
as seen on <http://search.cpan.org/~daxim/>
Kevin Ryde [Thu, 11 Aug 2011 06:36:18 +0000 (23:36 -0700)]
perldiag.pod on defined %hash
This commit rewords the entry in perldiag (again), explaining more
clearly why defined(%hash) is unreliable.
Father Chrysostomos [Sun, 14 Aug 2011 20:42:27 +0000 (13:42 -0700)]
perldelta for &CORE::foo
Father Chrysostomos [Tue, 9 Aug 2011 13:02:39 +0000 (06:02 -0700)]
Update core_prototype’s docs
Father Chrysostomos [Tue, 9 Aug 2011 06:57:01 +0000 (23:57 -0700)]
Move pp_-specific code out of core_prototype
Commit
b8c38f0a2a65 refactored pp_prototype by moving much of its
code to a new function in op.c, called core_prototype. This served
two purposes: (1) to allow the code to be simplified, which required
the use of static functions in op.c, and (2) to allow the &CORE::subs
feature to share the same code.
But some code was moved to core_prototype which, in hindsight, did not
need to be moved, such as the ‘Can’t find an opnumber’ message.
This commit moves that code back to pp_prototype, resulting in a sim-
pler (and possibly faster, at least for &CORE::subs) core_prototype.
Father Chrysostomos [Tue, 9 Aug 2011 06:38:14 +0000 (23:38 -0700)]
Change core_prototype to take a keyword num
This refactoring requires the caller to provide the keyword
number to core_prototype. Consequently, it speeds up the code in
gv.c:gv_fetchpvn_flags by allowing it to avoid an extra call to
keyword().
This takes the place of the len parameter, which is no longer used.
It used to be used only as an argument to keyword(). Since the code
that uses strEQ is only reached if the keyword has already been veri-
fied by keyword(), the name simply cannot have embedded nulls, so len
is not necessary.
Father Chrysostomos [Sun, 14 Aug 2011 13:40:06 +0000 (06:40 -0700)]
Add tests for precedence of CORE:: subs
Father Chrysostomos [Sat, 6 Aug 2011 07:20:06 +0000 (00:20 -0700)]
Add inlinable &CORE::functions
This commit allows this to work:
BEGIN { *entangle = \&CORE::tie };
entangle $foo, $package;
And the entangle call gets inlined as a tie op, the resulting op tree
being indistinguishable.
These subs are not yet callable via &foo syntax or through a refer-
ence. That will come later, except for some functions, like sort(),
which will probably never support it.
Almost all overridable functions are supported. These few are not:
- infix operators
- not and getprotobynumber (can’t get the precedence right yet;
prototype problem)
- dump
Subsequent commits (hopefully!) will deal with those.
How this works:
gv_fetchpvn_flags is extended with hooks to create subs inside the
CORE package. Those subs are XSUBs (whose C function dies with an
error, for now at least) with a call checker that blows away the
entersub op and replaces it with whatever op the sub represents.
This is slightly inefficient right now, as gv_fetchpvn_flags calls
keyword(), only to have core_prototype call it again. That will
be fixed in a future refactoring.
Father Chrysostomos [Tue, 2 Aug 2011 22:04:47 +0000 (15:04 -0700)]
Make core_prototype provide the op number as well
Since it has to calculate it, it might as well provide it, so callers
do not have to go through that while(i < MAXO) loop yet again.
(The &CORE::foo feature will use this.)
Father Chrysostomos [Tue, 2 Aug 2011 21:46:17 +0000 (14:46 -0700)]
Make sure the CORE package is always called CORE
And not ::CORE or main::CORE or *CORE, etc.
Since the CORE package’s magic for autovivifying CORE subs
will be based on the package name, we can’t have code like
&::CORE::foo breaking the entire package.
Making a more general change to gv_fetchpvn_flags causes
problems for autoloaded SUPER methods and strangely-named
packages like main::::foo, so this patch is CORE-specific.
Father Chrysostomos [Fri, 12 Aug 2011 19:29:07 +0000 (12:29 -0700)]
Remove select’s prototype
select has a prototype of (;*), which is incorrect, as it implied that
it has high precedence. It also fails to account for the four-argu-
ment form. While removing all incorrect prototypes is counterproduc-
tive, I think this one is wrong enough it deserves to go. (And the
precedence problem is a good argument against it, as there is cur-
rently no other way to set precedence.)
Reini Urban [Sat, 13 Aug 2011 10:43:02 +0000 (12:43 +0200)]
B::Terse and B::Xref were missing some documentation.
Reini Urban [Sat, 13 Aug 2011 10:28:36 +0000 (12:28 +0200)]
remove the rest of pod/perlcompile.pod
perlcompile.pod is now maintained with B::C, and much more complete there.
[Subsequent build and test fixes by the committer]
Nicholas Clark [Thu, 11 Aug 2011 12:35:02 +0000 (14:35 +0200)]
In makedef.pl, use %Config to avoid hardcoding the DLL version number.
Craig A. Berry [Sat, 13 Aug 2011 15:35:12 +0000 (10:35 -0500)]
Initial attempt at putting podcheck.t on a diet.
The current design of this test is to scan *every* file in a dirty
build directory to see if it contains POD, excluding only a short
list of files and file types that it knows about. This means that
on most platforms it was scanning executable code, object code,
object libraries, dynamic libraries, and many other build products
too numerous to mention.
The present commit expands the exclusion list considerably and
makes that list slightly more cross-platform, but it's probably
still quite incomplete. Whether that list is even worth
maintaining or the test should be based on an inclusion list
rather than an exclusion list is a question worth asking.
On my system, the present austerity measures, despite the addition
of Config, reduce memory consumption by 14% (but it's still a pig,
gulping something like 160MB). Physical I/O is reduced by 105%
and elapsed time by 25%.
Craig A. Berry [Sat, 13 Aug 2011 15:19:08 +0000 (10:19 -0500)]
Trim trailing dots on VMS in podcheck.t.
readdir() and thus File::Find return files having zero-length
extensions as 'foo.' which doesn't match entries like 'foo' in
the known problems database. Trimming that trailing dot reduces
the number of failures on VMS to a handful. They are primarily
due to:
1.) The test attempts to exclude .PL files, but on VMS, case is
not preserved by default, so these appear as .pl and are not
excluded, confusing a number of the tests.
2.) Utilities and scripts are built with a .com extension on VMS,
but the corresponding entries in the known problems database have
no extension, so they don't match.
Nicholas Clark [Sat, 13 Aug 2011 12:05:40 +0000 (14:05 +0200)]
Check more than just the first word of the "Inconsistent C3" error message.
Father Chrysostomos [Fri, 12 Aug 2011 19:29:07 +0000 (12:29 -0700)]
perldelta for __FILE__()
Father Chrysostomos [Fri, 12 Aug 2011 16:10:04 +0000 (09:10 -0700)]
Test __FILE__() syntax
Father Chrysostomos [Mon, 8 Aug 2011 15:46:22 +0000 (08:46 -0700)]
Add __FILE__ and its minions to perlfunc
This takes the place of documenting __FILE__() syntax. By adding
these to perlfunc, they are covered by the description of the syntax
at the top of perlfunc. Hopefully this will appease those who think
we should not be teaching it to new bees.
Father Chrysostomos [Mon, 8 Aug 2011 15:40:44 +0000 (08:40 -0700)]
[perl #95546] Allow () after __FILE__, etc.
This commit makes the __FILE__, __LINE__ and __PACKAGE__ token parse
the same way as nullary functions.
It adds two extra rules to perly.y to allow the op to be created in
toke.c, instead of directly inside the parser.
Craig A. Berry [Fri, 12 Aug 2011 14:09:30 +0000 (09:09 -0500)]
Clean up MANIFEST before creating a new one.
This is a follow-up to
e4ac890e26c, which changed behavior from
appending to an existing MANIFEST to creating a new one. On VMS,
that would give us multiple versions, which probably wouldn't
matter except that the tests insist that there is one and only
one copy of every file they've created and they only clean up the
highest version.
The easiest way to handle this is to make sure we clean up first
before creating a new MANIFEST file.
Father Chrysostomos [Fri, 12 Aug 2011 13:24:56 +0000 (06:24 -0700)]
Revert "Oops! Update B::Deparse for the (l)stat proto change"
This reverts commit
db147d7ee1c1aca547b1d63ef7141e56821a3ae2.
This is no longer necessary, as of this commit’s grandparent.
Father Chrysostomos [Fri, 12 Aug 2011 05:19:50 +0000 (22:19 -0700)]
Change (l)stat’s prototype from * to ;*
Since the argument is optional, we need a semicolon.
This commit accomplishes that by setting the OA_OPTIONAL flag for the
appropriate entries in PL_opargs. This should not affect anything
else, as ck_ftst (the check routine for [l]stat) doesn’t even look at
PL_opargs.
It also has to tweak the prototype-generation logic slightly, because
PL_opargs also has OA_DEFGV set.
I think this is insignificant enough not to warrant a delta entry.
Father Chrysostomos [Fri, 12 Aug 2011 05:15:05 +0000 (22:15 -0700)]
Revert "[perl #95550] Remove prototypes from (l)stat"
It turns out this problem is more knotty than I initially realised.
stat had a prototype of (*), even though it could be called with no
arguments. Since the (*) prototype does not parse its argument the
same way that stat parses *its* argument, I thought that changing (*)
to (;*) would be no better, since it’s still not correct. So I simply
set the prototype to undef.
My thinking was faulty, for two reasons:
• The prototype serves to indicate the precedence, not just the types
of arguments. An undefined prototype on an overridable prefix func-
tion implies that it takes a list. So this causes problems for the
imminent &CORE::subs feature, as there is not yet a clean mechanism
for CVs to parse their arguments.
• The (*) prototype character does not parse the same way as *any*
built-in function with that character in its prototype. So stat is
no worse than any other built-in. It doesn’t make sense to remove
the prototype from stat without removing it from about 40 other
built-in functions; and that’s where pedantry conflicts with
usefulness.
This commit restores the (*) prototype to stat and lstat. The next
commit will give it a (;*) prototype, as that matches it more closely.
It’s not perfect, but it’s no worse that other built-ins with a * in
their prototypes.
Craig A. Berry [Fri, 12 Aug 2011 12:51:10 +0000 (07:51 -0500)]
Better st_ino_size probe in configure.com.
Follow-up to
adf2bd2837. This is being used for compile-time
comparisons; sizeof may be compile-time, but is apparently not
available before macro substitution, leading to problems like:
....^
%CC-I-IGNOREEXTRA, Spurious token(s) ignored on preprocessor directive line.
at line number 2837 in file MDA0:[SMOKE.blead]pp_sys.c;1
Gerard Goossen [Tue, 9 Aug 2011 18:35:06 +0000 (20:35 +0200)]
Move bareword checking from the peephole optimizer to finalize_optree. Fixes [perl #95998]
The bareword checking is moved from the peephole optimizer to finalize_optree.
newRANGE needs additional bareword checking because the constants may
be optimized away by 'gen_constant_list'.
The OPpCONST_STRICT flag is removed after giving an error about a
bareword to prevent giving multiple errors about the same bareword.
Gerard Goossen [Thu, 11 Aug 2011 07:34:32 +0000 (09:34 +0200)]
Move context propagation and finalize_optree from do_eval to newPROG
Aborting after errors found by finalize_optree in do_eval wasn't done
properly and would cause memory problems.
This patch moves the context propagation and finalize_optree to
newPROG such that the normal error handling is done.
The eval context blk_gimme is used to communicate the context.
Steffen Mueller [Thu, 11 Aug 2011 11:21:05 +0000 (13:21 +0200)]
API to explicitly select to export XSUB symbols or not
This adds a few additional macros to XSUB.h:
XS_INTERNAL and XS_EXTERNAL are versions of the XS macro
that explicitly use internal (static) linking or not.
XSPROTO_INTERNAL and XSPROTO_EXTERNAL are the obvious equivalents
for XSPROTO (which is apparently not public yet we support its
use in SWIG...).
The XS and XSPROTO macros themselves are not defined to not
use STATIC, but this may (should?) be changed in the future.
Steffen Mueller [Thu, 11 Aug 2011 09:33:11 +0000 (11:33 +0200)]
ExtUtils::ParseXS: Check that an XSUB with CODE&RETVAL has an OUTPUT
If an XS paragraph/function definition that has a CODE section using
RETVAL, then we need an OUTPUT section or else things will go sour.
This adds a check for that condition and produces a friendly error
message.
See CPAN RT #69536.
Nicholas Clark [Sun, 7 Aug 2011 19:09:03 +0000 (21:09 +0200)]
Simplify embedvar.h, removing a level of macro indirection for PL_* variables.
For the default (non-multiplicity) configuration, PERLVAR*() macros now
directly expand their arguments to tokens such as C<PL_defgv>, instead of
expanding to C<PL_Idefgv>. This removes over 350 lines from F<embedvar.h>,
which defined macros to map from C<PL_Idefgv> to C<PL_defgv> and so forth.
Chris 'BinGOs' Williams [Thu, 11 Aug 2011 09:07:10 +0000 (10:07 +0100)]
Synchronise Maintainers.pl for Storable and version
Tony Cook [Tue, 9 Aug 2011 10:31:24 +0000 (20:31 +1000)]
workaround a type handling bug in SystemTap Dtrace 1.2
It uses a construct similar to:
__typeof__((func)) x = func;
but hek_key is a char[1] so the above becomes:
char arg1[1] = func;
which is invalid.
Using a temporary allows an implicit conversion to const char * and
avoids possible bugs that might be hidden by an explicit cast.
Steffen Mueller [Thu, 11 Aug 2011 06:26:37 +0000 (08:26 +0200)]
ExtUtils::ParseXS version bump: release 3.03
Father Chrysostomos [Wed, 10 Aug 2011 19:23:51 +0000 (12:23 -0700)]
Rewrap some verbatim pod in Math::BigInt
I started to make Math::BigInt’s pod fit within 79 columns, but
soon petered out. At least this is better than nothing.
Father Chrysostomos [Wed, 10 Aug 2011 03:22:36 +0000 (20:22 -0700)]
Keep verbatim pod in various dist/* pods within 79 cols
Father Chrysostomos [Wed, 10 Aug 2011 01:06:38 +0000 (18:06 -0700)]
Keep verbatim pod in I18N:LT and IO.pm within 80 cols
Father Chrysostomos [Wed, 10 Aug 2011 00:56:07 +0000 (17:56 -0700)]
Keep verbatim pod in ExtUtils::Typemaps::OutputMap within 80 cols
Karl Williamson [Sat, 30 Jul 2011 18:33:31 +0000 (12:33 -0600)]
Add perldelta for /aa and \b commit
This adds an entry for commit
f2e96b5ddb6396417bc2fb71915c5025215060d6
Steffen Mueller [Wed, 10 Aug 2011 13:49:34 +0000 (15:49 +0200)]
Fix trivial test failure from
dbef30a62b2ca0b186
For the record: This was my (Steffen's) fault, not Mike's!
Steffen Mueller [Wed, 10 Aug 2011 13:26:01 +0000 (15:26 +0200)]
Add Mike Sheldrake to AUTHORS
Mike Sheldrake [Wed, 10 Aug 2011 06:15:15 +0000 (08:15 +0200)]
ExtUtils::ParseXS: Test All @INC Derived typemap Locations
The ExtUtils::ParseXS tests would sometime fail to locate some
core Perl typemaps in @INC. This fixes CPAN RT #70047.
Patch slightly modified by Steffen Mueller.
Includes the mandatory version bump to a development version.
Karl Williamson [Wed, 10 Aug 2011 04:08:07 +0000 (22:08 -0600)]
autodoc.pl: output to fit in 79 columns
Karl Williamson [Mon, 8 Aug 2011 17:32:48 +0000 (11:32 -0600)]
podcheck.t: Change verbatim line length max to 79
Some pagers reserve a column for their own use. This patch has
podcheck.t warn if a verbatim line will wrap when such a pager is used
in an 80 column terminal window. This effectively restores the
situation to what it was before commit
2cd46bfd6d03cd8826c5e968efdd36416191bc8f, but the message is now honest
about the situation, i.e., that 79 colummns are effectively the max
without a warning.
The point of this is to give a number to shoot for, 79, that will work
almost always (I believe though that there are pagers that reserve 2
columns in some cases), but of course the data file is continued to be
used to silence the warning if it isn't desired to get down to 79.
Father Chrysostomos [Tue, 9 Aug 2011 23:13:42 +0000 (16:13 -0700)]
Keep verbatim pod in ExtUtils::Typemaps within 80 cols
Father Chrysostomos [Tue, 9 Aug 2011 15:33:56 +0000 (08:33 -0700)]
Ignore another editor droppink
Father Chrysostomos [Tue, 9 Aug 2011 13:30:00 +0000 (06:30 -0700)]
Keep verbatim pod in ExtUtils::Installed within 80 cols
Father Chrysostomos [Tue, 9 Aug 2011 13:26:31 +0000 (06:26 -0700)]
Keep verbatim pod in Data::Dumper within 80 cols
Father Chrysostomos [Tue, 9 Aug 2011 13:23:10 +0000 (06:23 -0700)]
Keep verbatim pod in File::VMS/Win32 within 80 cols
Father Chrysostomos [Tue, 9 Aug 2011 13:19:50 +0000 (06:19 -0700)]
Keep verbatim pod in File::Mac/Unix within 80 cols
Father Chrysostomos [Tue, 9 Aug 2011 13:05:58 +0000 (06:05 -0700)]
Keep verbatim pod in File::Spec within 80 cols
Chris 'BinGOs' Williams [Tue, 9 Aug 2011 09:02:28 +0000 (10:02 +0100)]
Update Encode to CPAN version 2.44
[DELTA]
$Revision: 2.44 $ $Date: 2011/08/09 07:49:44 $
! Unicode/Unicode.xs
Addressed the following:
Date: Fri, 22 Jul 2011 13:58:43 +0200
From: Robert Zacek <zacek@avast.com>
To: perl5-security-report@perl.org
Subject: Unicode.xs!decode_xs n-byte heap-overflow
! Encode.pm encoding.pm
! lib/Encode/Alias.pm lib/Encode/Encoder.pm lib/Encode/Guess.pm
Applied: RT#69735: patch for use constant DEBUG =>
https://rt.cpan.org/Ticket/Update.html?id=69735
Nicholas Clark [Tue, 9 Aug 2011 10:13:56 +0000 (12:13 +0200)]
Refactor Porting/checkcfgvar.pl, simplifying the control flow.
Nicholas Clark [Tue, 9 Aug 2011 10:06:08 +0000 (12:06 +0200)]
In checkcfgvar.pl, eliminate the file-scope lexical %lst.
Nicholas Clark [Tue, 9 Aug 2011 09:47:50 +0000 (11:47 +0200)]
In checkcfgvar.pl, eliminate the file-scope lexical %MASTER_CFG.
Nicholas Clark [Tue, 9 Aug 2011 09:30:35 +0000 (11:30 +0200)]
In checkcfgvar.pl, inline and eliminate read_file() and config_h_SH_reader().
config_h_SH_reader() was called once in one place, to generate a closure
passed to read_file(). In turn, read_file()'s use of a callback to process
lines of the file that it opened concealed the near-linear flow of control.
use autodie; to simplify the error handling.
Nicholas Clark [Tue, 9 Aug 2011 08:51:09 +0000 (10:51 +0200)]
In checkcfgvar.pl, inline check_cfg() into its only caller.
Tony Cook [Wed, 20 Jul 2011 10:23:15 +0000 (20:23 +1000)]
work around a bug in dtrace - it strips const from function parameters
With usedtrace this caused:
- build failures under g++ (OS X)
- const qualification warnings with gcc (OS X)
The workaround simply adds const to char * parameters if not already
present.
The bug in dtrace was apparently reported to Sun in 2006:
http://opensolaris.org/jive/thread.jspa?threadID=53810
Mozilla ran into the same problem:
https://bugzilla.mozilla.org/show_bug.cgi?id=593483
Nicholas Clark [Tue, 9 Aug 2011 07:44:54 +0000 (09:44 +0200)]
Remove 5.8.x VOS specific code from Porting/checkcfgvar.pl.
Commit
3fd80bd61943d0f8 in 2002 removed vos/config.{alpha,gf}.def from
blead, but they were still present in maint-5.8, so the logic to process
them was retained, to minimise the differences in the Porting/* scripts.
maint-5.8 is EOL now, so these can be removed.
Nicholas Clark [Tue, 9 Aug 2011 07:25:07 +0000 (09:25 +0200)]
Add defaults for st_ino size/sign probes to uconfig64.sh
These were not added in
668fdbe135fd76c7 because Porting/checkcfgvar.pl was
not aware that uconfig64.sh needed testing.
Nicholas Clark [Tue, 9 Aug 2011 07:24:20 +0000 (09:24 +0200)]
Add uconfig64.sh to the list of files that Porting/checkcfgvar.pl checks.
Father Chrysostomos [Tue, 9 Aug 2011 05:15:52 +0000 (22:15 -0700)]
Make prototype("CORE::CORE") die once more.
Commit
b8c38f0a2a65 accidentally made prototype("CORE::CORE") return
undef instead of dying. This is the only case that reached the line
with the ‘Should not happen...’ comment.
This commit changes it to be handled earlier and also adds an asser-
tion to make sure that unreachable code really is unreachable (which
it should be now, I think, I hope...).
Gerard Goossen [Mon, 8 Aug 2011 20:18:03 +0000 (22:18 +0200)]
Only warn about "Statement unlikely to be reached" after an exec if exec is a statement.
Moving the OP_EXEC check to finalize_optree changed that it would also
warn if 'exec' is part of an expression. This patch changes the
behaviour to only warn if 'exec' is the whole statement, which
appears to be the behaviour before moving the check to finalize_optree.
Gerard Goossen [Sat, 6 Aug 2011 15:50:40 +0000 (17:50 +0200)]
Change aassign_common_vars to check using the optree without using the linked list.
Besides no longer depending on the op chain this also solves a bug
where the common vars where not detected because of logical operators.