Father Chrysostomos [Fri, 19 Aug 2011 17:57:41 +0000 (10:57 -0700)]
Invert the list of &-able functions in gv.c
The list of those that do not support &CORE::foo() syntax is now
shorter than the list of those that do. In subsequent commits
it will get even shorter.
Father Chrysostomos [Thu, 25 Aug 2011 15:34:15 +0000 (08:34 -0700)]
Make sure coresubs.t tests all &-able funcs
Leo Lapworth [Thu, 25 Aug 2011 10:08:23 +0000 (11:08 +0100)]
replace old bookmarks.cpan link with perl.org and learn.perl.org
Nicholas Clark [Thu, 25 Aug 2011 10:06:53 +0000 (12:06 +0200)]
Merge the refactored makedef.pl into blead.
This eliminates global.sym
Nicholas Clark [Thu, 25 Aug 2011 10:04:23 +0000 (12:04 +0200)]
Note the demise of global.sym in perldelta.
Nicholas Clark [Sun, 21 Aug 2011 15:50:26 +0000 (17:50 +0200)]
In embed.pl, inline walk_table() into its only caller.
Nicholas Clark [Sun, 21 Aug 2011 15:37:41 +0000 (17:37 +0200)]
Eliminate global.sym, as makedef.pl can generate it internally.
global.sym was a file listing the exported symbols, generated by regen/embed.pl
from embed.fnc and regen/opcodes, which was only used by makedef.pl
Move the code that generates global.sym from regen/embed.pl to makedef.pl,
and thereby eliminate the need to ship a 907 line generated file.
Nicholas Clark [Sun, 21 Aug 2011 14:48:51 +0000 (16:48 +0200)]
Add regen/embed_lib.pl, for the code that processes embed.fnc and regen/opcodes
Move setup_embed() and the helper functions add_level() and current_group()
to it from regen/embed.pl
Nicholas Clark [Sun, 21 Aug 2011 14:27:15 +0000 (16:27 +0200)]
In embed.pl, move processing embed.fnc and regen/opcodes into a function.
Nicholas Clark [Sun, 21 Aug 2011 13:47:56 +0000 (15:47 +0200)]
In embed.pl, refactor the handling of varargs *_nocontext wrappers.
This is what commit
125218eb5a6d12e7 should have been. :-)
Nicholas Clark [Sun, 21 Aug 2011 12:58:21 +0000 (14:58 +0200)]
In makedef.pl, move handling of $ARGS{TARG_DIR} to the open statements.
This simplifies the code, and eliminates 5 lexicals used solely to hold
filename constants.
Nicholas Clark [Sun, 21 Aug 2011 12:30:14 +0000 (14:30 +0200)]
In makedef.pl, defaulting $ARGS{TARG_DIR} to '' simplifies the code.
Nicholas Clark [Sun, 21 Aug 2011 12:06:33 +0000 (14:06 +0200)]
Test the TARG_DIR argument to makedef.pl too.
Nicholas Clark [Sun, 21 Aug 2011 11:40:33 +0000 (13:40 +0200)]
In makedef.pl, no need to store 'config.h' in a variable.
Unlike the other files opened by makedef.pl, config.h is always opened in the
current directory, so the filename doesn't modifying if $ARGS{TARG_DIR} is set.
Nicholas Clark [Sun, 21 Aug 2011 11:29:26 +0000 (13:29 +0200)]
In embed.pl, simplify the code that parses regen/opcodes.
As @embed is sorted later, the order that we add entries to it doesn't matter.
Hence add them immediately, avoiding the need to iterate over the "seen" hash.
Nicholas Clark [Sun, 21 Aug 2011 11:09:46 +0000 (13:09 +0200)]
embed.pl was relying on embed.fnc starting with a pre-processor directive.
Fix this subtle bug, and add comments.
Steffen Mueller [Thu, 25 Aug 2011 06:19:40 +0000 (08:19 +0200)]
ExtUtils::ParseXS: Accept overridden input typemaps
This restores the ability to have code like this:
ret_type*
foo(bar, baz)
int bar
ThereIsNoTypemapForThisType* baz = somefunc($arg);
CODE:
...
Looks strange and indeed, it is. But it's documented in perlxs
to work, so we can't get away with breaking it. The heuristics
for determining whether to allow this use case is checking for
ST\( or \$arg being found in the initialization. That should take
care of all valid use of this feature and still die horribly in
cases where this is used by mistake (instead of a PREINIT block, etc).
Steffen Mueller [Sun, 21 Aug 2011 20:07:50 +0000 (22:07 +0200)]
ExtUtils::ParseXS: Explicitly require current version of submodules
Since there have been certain problems with parts of ExtUtils::ParseXS
being shadowed by older installations of the module, this commit adds
an explicit $VERSION to all submodules and requires them to have the
same version as the main module. This doesn't actually fix any problem,
but makes them more apparent as early as possible instead of failing
with obscure compile errors when bad C is generated from the original
XS.
Father Chrysostomos [Thu, 25 Aug 2011 07:23:48 +0000 (00:23 -0700)]
perldelat update
Father Chrysostomos [Thu, 25 Aug 2011 06:55:46 +0000 (23:55 -0700)]
perldelta: Move an entry under Testing
Father Chrysostomos [Fri, 19 Aug 2011 15:27:14 +0000 (08:27 -0700)]
Enable ampersand calls to CORE subs with $$$ prototypes
This applies to functions that just take plain scalar arguments, all
of which are mandatory. Functions that take optional arguments are
not supported yet. truncate() is not supported yet, either (its $$
prototype is not entirely veracious).
This commit enables those functions to be called via &CORE::foo() syn-
tax or through references.
You can now encrypt a string like this: "string"->CORE::crypt($salt).
Each function’s op tree is like this:
$ ./perl -Ilib -MO=Concise,CORE::atan2 -e 'BEGIN{\&CORE::atan2}'
CORE::atan2:
3 <1> leavesub[1 ref] K/REFC,1 ->(end)
2 <@> atan2[t1] sK ->3
- <0> ex-pushmark s ->1
1 <$> coreargs(IV 100) s ->2
-e syntax OK
This commit adds code to ck_fun to skip the argument check if
coresubs is present. Otherwise we get a ‘Not enough arguments for
atan2’ error.
Father Chrysostomos [Fri, 19 Aug 2011 05:19:25 +0000 (22:19 -0700)]
Simplify the CORE::__FOO__ op-generation code
It just happens that the (caller)[...] offsets for file and line are
the same as the keyword numbers. KEY___PACKAGE__ is 3 and (caller)[0]
returns the package, so keyword_number % 3 can be used for the offset
instead of an unwieldy switch block.
Father Chrysostomos [Fri, 19 Aug 2011 05:09:17 +0000 (22:09 -0700)]
Move coresub op-creation from gv.c to op.c
For functions that take handles as arguments, this code will need to
call static functions in op.c, like is_handle_constructor.
While we could make is_handle_constructor into a non-static function
and call it from gv.c, that seems backwards, as it would result in a
lot of op-manipulation code in the middle of gv.c.
So this commit creates a new function in op.c, called coresub_op,
which is only called from gv.c, from the &CORE::sub code.
Father Chrysostomos [Thu, 25 Aug 2011 06:31:28 +0000 (23:31 -0700)]
Allow ampersand calls to CORE subs with (_) proto
This commit adds all subs with a (_) prototype to the list of those
that can be called with ampersand syntax or through references. These
have bodies like this:
$ ./perl -Ilib -MO=Concise,CORE::abs -e 'BEGIN{\&CORE::abs}'
CORE::abs:
3 <1> leavesub[1 ref] K/REFC,1 ->(end)
2 <1> abs[t1] sK/1 ->3
1 <$> coreargs(IV 111) s ->2
-e syntax OK
coreargs fetches the caller’s $_ if there are no arguments passed.
Father Chrysostomos [Thu, 18 Aug 2011 22:55:59 +0000 (15:55 -0700)]
Add find_rundefsv2 function
Subs in the CORE package with a (_) prototype will use this.
This accepts a CV and a sequence number, so that one can
use it to find the $_ in the caller’s scope. It only uses
the topmost call of a subroutine that is being called recur-
sively, so it’s not really a general-purpose function. But
it suffices for &CORE::abs and friends.
Father Chrysostomos [Thu, 25 Aug 2011 05:39:28 +0000 (22:39 -0700)]
Test CORE::break’s prototype (just that this time)
Gerard Goossen [Tue, 16 Aug 2011 07:22:14 +0000 (09:22 +0200)]
Move making inplace sort and reverse away from the peephole optimiser to scalarvoid.
Why: The in place assignment is not just an optimisation but has
significant different behaviour and thus doesn't belong in the
peephole optimiser. Also the optree changes are unified and simpler.
Father Chrysostomos [Thu, 25 Aug 2011 06:15:17 +0000 (23:15 -0700)]
Revert "Test CORE::break’s prototype"
This reverts commit
e52d58aa5bea245b66786b4c9029e849a2be69d3.
I don’t quite know how I managed it, but I really screw up
this time! Two completely unrelated commits ended up getting
merged into one, so, to avoid confusion down the road, I’m
reverting it, only to reapply it shortly....
Father Chrysostomos [Thu, 25 Aug 2011 05:48:26 +0000 (22:48 -0700)]
&CORE::break
This is another nullary function that I forgot to give a body
to make it callable via &break syntax.
Father Chrysostomos [Thu, 25 Aug 2011 05:39:28 +0000 (22:39 -0700)]
Test CORE::break’s prototype
Father Chrysostomos [Thu, 25 Aug 2011 05:16:07 +0000 (22:16 -0700)]
[perl #71154] undef &$coderef consistency
$ perl -le' undef &{$x=sub{}}; $x->()'
Not a CODE reference at -e line 1.
undeffing an anonymous subroutine used to turn the ANON flag off,
causing it to bypass the condition apparently written for this situa-
tion in pp_entersub.
This commit stops cv_undef from turning off that flag, so now we get:
$ ./perl -le' undef &{$x=sub{}}; $x->()'
Undefined subroutine called at -e line 1.
Eric Brine [Thu, 25 Aug 2011 03:10:43 +0000 (20:10 -0700)]
Trim dead code in do_kv.
A small piece of code in do_kv has three bugs:
- TARG could have been returned as an lvalue, so its refcount
could be greater than 1, resulting in data getting clobbered.
(See RT#20933 for previously fixed occurrence of this bug).
- LvTARG is refcounted, so it's buggy to just NULL it.
- TARG is returned without being initialised.
The first two bugs disappeared recently when we stopped putting
the lvalues in TARG for that op. The third remains.
However, it seems that code is never called. It can only be
called by putting NULL (not undef) on the Perl stack. I don't
see how that's possible here. The test suite never reaches that
code, so it seems it's just dead code.
Leo Lapworth [Wed, 24 Aug 2011 13:26:55 +0000 (14:26 +0100)]
Remove nvi (site no loger works) and put vim above Vile
Leo Lapworth [Wed, 24 Aug 2011 13:24:21 +0000 (14:24 +0100)]
Remove Elvis editor as link broken
Leo Lapworth [Wed, 24 Aug 2011 13:22:49 +0000 (14:22 +0100)]
Fix broken link
Leo Lapworth [Wed, 24 Aug 2011 13:18:21 +0000 (14:18 +0100)]
Remove a2ps as link does not work and even gnu.org uses the same link
Father Chrysostomos [Thu, 25 Aug 2011 01:04:26 +0000 (18:04 -0700)]
Make $class->method work when $class is tied
This little script:
sub TIESCALAR{bless[]}
sub FETCH{warn "fetching"; "main"}
sub bolgy { warn 'bolgy' }
tie my $a, "";
$a->bolgy;
Gives these outputs with various versions of perl:
$ pbpaste|perl5.6.2
fetching at - line 2.
fetching at - line 2.
bolgy at - line 3.
$ pbpaste|perl5.8.8
fetching at - line 2.
fetching at - line 2.
fetching at - line 2.
Can't call method "bolgy" without a package or object reference at - line 5.
$ pbpaste|perl5.8.9
fetching at - line 2.
fetching at - line 2.
fetching at - line 2.
fetching at - line 2.
bolgy at - line 3.
$ pbpaste|perl5.10.0
fetching at - line 2.
fetching at - line 2.
fetching at - line 2.
fetching at - line 2.
Can't call method "bolgy" without a package or object reference at - line 5.
$ pbpaste|perl5.10.1 # also 5.12.x
fetching at - line 2.
fetching at - line 2.
fetching at - line 2.
fetching at - line 2.
bolgy at - line 3.
$ pbpaste|perl5.14.0
fetching at - line 2.
fetching at - line 2.
fetching at - line 2.
fetching at - line 2.
fetching at - line 2.
fetching at - line 2.
Can't locate object method "bolgy" via package "main" (perhaps you forgot to load "main"?) at - line 5.
It’s worse than ever in 5.14.
What’s happening is that S_method_common is hanging on to the pointer
returned by SvPV, while continuing to call get-magic again and again.
So the pointer becomes invalid. I think it’s only by accident that
it worked in some versions.
This commit stops S_method_common from calling get-magic so many
times, solving both problems.
I’m afraid this conflicts with ongoing work to make method lookup
UTF8-clean, but I wanted to make a patch that could be backported.
Father Chrysostomos [Wed, 24 Aug 2011 21:33:31 +0000 (14:33 -0700)]
gmagic.t: Correct two test names
Father Chrysostomos [Wed, 24 Aug 2011 21:28:45 +0000 (14:28 -0700)]
Un-todo gmagic.t tests that now pass
Gerard Goossen [Wed, 24 Aug 2011 21:26:51 +0000 (14:26 -0700)]
[perl #97088] Prevent double get-magic in various cases
This patch prevents get-magic from executing twice during autovivifi-
cation when the op doing the autovivification is not directly nested
inside the dereferencing op.
This can happen in cases like this:
${ (), $a } = 1;
Previously (as of 5.13.something), the outer op was marked with the
OPpDEREFed flag, which indicated that get-magic had already been
called by the vivifying op (calling get-magic during vivification is
inevitable):
$ perl5.14.0 -MO=Concise -e '${ $a } = 1'
8 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 2 -e:1) v:{ ->3
7 <2> sassign vKS/2 ->8
3 <$> const[IV 1] s ->4
6 <1> rv2sv sKRM*/DREFed,1 ->7 <-- right here
- <@> scope sK ->6
- <0> ex-nextstate v ->4
5 <1> rv2sv sKM/DREFSV,1 ->6
4 <#> gv[*a] s ->5
-e syntax OK
But in the ${()...} example above, there is a list op in the way that
prevents the flag from being set inside the peephole optimizer. It’s
not even possible to set it correctly in all cases, as in this exam-
ple, which would need it both set and not set depending on which
branch of the ternary operator is executed:
${ $x ? delete $a[0] : $a[0] } = 1
Instead of setting the OPpDEREFed flag, we now make a non-magic copy
of the SV in vivify_ref (the first time get-magic is executed).
Gerard Goossen [Wed, 24 Aug 2011 11:39:55 +0000 (13:39 +0200)]
Add tests for autovivication combined with get-magic, some of which are TODO.
Father Chrysostomos [Wed, 24 Aug 2011 18:10:22 +0000 (11:10 -0700)]
Add missing files from Archive::Extract 0.56
Nicholas Clark [Tue, 23 Aug 2011 12:10:58 +0000 (14:10 +0200)]
For microperl, prefix generateuudmap and the 3 generated headers with u.
Without this, the main Makefile and Makefile.micro interfere with each other,
as they both generate the same 5 files, and both think that they can delete
them with their respective clean targets.
Nicholas Clark [Tue, 23 Aug 2011 11:47:59 +0000 (13:47 +0200)]
Group 3 headers as $(generated_headers) in microperl's Makefile.
Commit
9387abf86b0530ac missed this.
Father Chrysostomos [Wed, 24 Aug 2011 01:15:48 +0000 (18:15 -0700)]
Call get-magic once for defined ${...}
This example:
sub TIESCALAR { bless[]}
sub FETCH { warn "fetching"; "\cTAINT" }
tie my $a, "";
defined $$a;
prints ‘fetching’ three times in 5.8.8, five times (!) in 5.10-12,
four times in 5.14, and three times in blead as of
ed996e63f6. Now it
only happens once.
It was commit
7a5fd60d4c that increased the number of fetches in 5.10,
but I haven’t checked which commits reduced it in 5.14.
Chip Salzenberg [Tue, 23 Aug 2011 23:51:28 +0000 (16:51 -0700)]
SVTYPEMASK must be cast to (svtype) when comparing to SvTYPE()
Father Chrysostomos [Tue, 23 Aug 2011 21:54:34 +0000 (14:54 -0700)]
Stop readline($foo) from autovivifying
Currently <$foo> does not autovivify, but readline($foo) does, due to
the way pp_readline calls pp_rv2gv directly, with PL_op still holding
a pp_readline op, whose flags may have completely different meanings.
readline uses the OPf_SPECIAL flag to distinguish <$foo> from readline
($foo). rv2gv uses it to determine whether to autovivify; hence the
discrepancy.
Father Chrysostomos [Tue, 23 Aug 2011 21:36:46 +0000 (14:36 -0700)]
close($undef) should not croak_no_modify
Commit
ac53db4c3f7e fixed bug #31767 (open $1 not dying), but put the
SvREADONLY check in the wrong spot, causing this bug:
$ perl -lwe 'no warnings "once"; close $x; close $+'
Name "main::x" used only once: possible typo at -e line 1.
Use of uninitialized value $x in ref-to-glob cast at -e line 1.
Modification of a read-only value attempted at -e line 1.
It shouldn’t be dying if I’m not trying to modifying it.
Father Chrysostomos [Tue, 23 Aug 2011 21:10:49 +0000 (14:10 -0700)]
Call get-magic once for implicit rv2gv in close(), etc.
This commit stops an implicit rv2gv from calling get-magic twice. As
a side-effect, it also squelches the duplicate warning emitted by
‘close undef’ (bug #97482).
is_gv_magical_sv is modified not to call get-magic on the sv passed to
it. It is not in the public API, and the only two callers (rv2gv and
softrefxv) have already called get-magic before calling it.
Chris 'BinGOs' Williams [Tue, 23 Aug 2011 19:03:52 +0000 (20:03 +0100)]
Update Archive-Extract to CPAN version 0.56
[DELTA]
Changes for 0.56 Tue Aug 23 15:55:52 2011
============================================
* Amend the MSWin32 fixes for 'unzip' to
work with Cygwin-based tools too.
Florian Ragwitz [Tue, 23 Aug 2011 16:35:58 +0000 (18:35 +0200)]
Upgrade Pod::Simple from version 3.18 to 3.19
Father Chrysostomos [Tue, 23 Aug 2011 16:43:29 +0000 (09:43 -0700)]
So much for ‘correcting’ a test!
I forgot to change it back to test a built-in symbol.
Father Chrysostomos [Tue, 23 Aug 2011 16:32:41 +0000 (09:32 -0700)]
readdir.t: Remove erroneous comments; correct test
In commit
99fc7eca4 I wrote some erroneous comments and modified a
test such that it no longer tested what I was supposed to test.
I did not realise that the bug only affected globs for built-in varia-
bles, specifically those that pop into existence when looked at:
$ perl5.10.1 -e '$x = "y"; readdir $x'
Bad symbol for dirhandle at -e line 1.
$ perl5.10.1 -e '$x = "."; readdir $x'
Bus error
In commit
99fc7eca4, I actually removed the ultimate cause of the bug,
restoring the 5.8.x behaviour of not dying with ‘Bad symbol’, because
there *is* a symbol, even if it’s not a valid handle.
This commit removes the erroneous comments and makes the test less
sensitive to output, since it’s just supposed to be testing that no
crash happens.
Father Chrysostomos [Tue, 23 Aug 2011 16:21:41 +0000 (09:21 -0700)]
Remove null checks from pp_rv2gv
sv can no longer be null at these points, as of commit
99fc7eca4,
which fixed buggy code that
7a5fd60d4 added (which resulted in
various interesting bugs and workarounds over the past few years.)
Nicholas Clark [Tue, 23 Aug 2011 14:08:55 +0000 (16:08 +0200)]
Run regen/uconfig_h.pl as part of the regen and regen_headers targets.
regen/uconfig_h.pl can't be run (by default) by regen.pl, as regen.pl needs
to be cross-platform, whilst regen/uconfig_h.pl relies on having a Bourne
Shell. However, if one has managed to extract Makefile from Makefile.SH,
that's clear proof that one has a working Bourne Shell available :-)
Nicholas Clark [Fri, 19 Aug 2011 10:15:38 +0000 (12:15 +0200)]
Add t/porting/globvar.t, to sanity test globvar.sym on a *nix platform.
This adds to makedef.pl a new platform, "test".
Hopefully this change will catch most problems that previously had resulted
in build failures on Win32.
Nicholas Clark [Fri, 19 Aug 2011 10:12:16 +0000 (12:12 +0200)]
Handle PL_sh_path better in globvar.sym and makedef.pl
PL_sh_path needs some form of special case because it is conditionally
defined either in perlvar.h or perl.h, but globvar.sym mentions all symbols
unconditionally, and undef -DPERL_GLOBAL_STRUCT perlvar.h is parsed as an
unconditional skip list.
Nicholas Clark [Fri, 19 Aug 2011 19:04:50 +0000 (21:04 +0200)]
Group 3 headers as $(generated_headers) in the *nix, VMS and Win32 makefiles.
uudmap.h bitcount.h mg_data.h are all generated by generate_uudmap, and all
need to be deleted as part of the clean targets, so it makes sense to
reference all 3 together using a single makefile macro.
Father Chrysostomos [Tue, 23 Aug 2011 07:25:57 +0000 (00:25 -0700)]
perlfunc: List all prototypes for lstat
Matthew Horsfall (alh) [Tue, 23 Aug 2011 01:26:26 +0000 (21:26 -0400)]
Strip S<> formatting codes from diagnostics output
Update spacing
Don't break S<20 questions> across lines, update test to be accurate
Father Chrysostomos [Mon, 22 Aug 2011 20:43:59 +0000 (13:43 -0700)]
[perl #95530] BigRat int(-1/2) == 0
Math::BigRat was trying to copy the sign of a BigRat object into a
BigInt object when converting to an integer, but without taking into
account that the number might be rounded toward zero. This resulted
in a 0 BigInt with a negative sign, which is not actually a valid
BigInt object, as it does not support negative zero.
Chris 'BinGOs' Williams [Mon, 22 Aug 2011 19:47:29 +0000 (20:47 +0100)]
Sync Module-CoreList version in Maintainers.pl with version on CPAN
Father Chrysostomos [Mon, 22 Aug 2011 16:42:32 +0000 (09:42 -0700)]
Only list non-static undocumented funcs in perlintern
Father Chrysostomos [Mon, 22 Aug 2011 16:33:00 +0000 (09:33 -0700)]
Revise perlintern’s descr of undocumented funcs
Father Chrysostomos [Mon, 22 Aug 2011 15:38:27 +0000 (08:38 -0700)]
perlfaq: remove 1 link; correct another
A link from the document to itself is not useful.
C<perldoc> should be L<perldoc>.
Matthew Horsfall [Mon, 1 Aug 2011 00:18:57 +0000 (20:18 -0400)]
Add quick note to perlfaq main page about searching the perlfaq
Chris 'BinGOs' Williams [Mon, 22 Aug 2011 12:45:56 +0000 (13:45 +0100)]
Update Archive-Extract to CPAN version 0.54
[DELTA]
Changes for 0.54 Mon Aug 22 11:52:18 2011
============================================
* Resolve issues on MSWin32 when 'unzip' is
found in PATH
Karl Williamson [Sun, 21 Aug 2011 17:49:28 +0000 (11:49 -0600)]
Remove user-defined casing feature
This feature was deprecated in 5.14 and scheduled to remove in 5.16. A
CPAN module was written to provide better functionality without the
significant drawbacks of this implementation.
Tony Cook [Mon, 22 Aug 2011 14:16:42 +0000 (00:16 +1000)]
skip a test that requires Cwd under miniperl
Tony Cook [Mon, 22 Aug 2011 13:44:19 +0000 (23:44 +1000)]
skip the defined *+ and *- tests on miniperl
using either attempts to load Tie::Hash::NamedCapture which may not be
available in miniperl.
H.Merijn Brand [Mon, 22 Aug 2011 13:41:26 +0000 (15:41 +0200)]
Fix Configure's csym test for gcc's link time optimisation
This introduces a volatile into the test program so gcc cannot optimise
out the symbol itself as being unused.
Nicholas Clark [Mon, 22 Aug 2011 04:38:32 +0000 (06:38 +0200)]
boot_Win32CORE needs to be XS_EXTERNAL() following commit
ab1478f7146843f7.
Win32CORE.c is shipped as a C file, not built by ExtUtils::ParseXS, so needs
to be manually updated to reflect the change of default in XSUB.h
Father Chrysostomos [Mon, 22 Aug 2011 05:51:56 +0000 (22:51 -0700)]
Add tests for defined(*builtin)
This commit tests that GVs containing built-in variables that are usu-
ally created lazily pop into existence when looked at, as the fact
they didn’t exist is something we want to hide.
Father Chrysostomos [Mon, 22 Aug 2011 05:14:55 +0000 (22:14 -0700)]
Make rv2gv return autovivified magic GVs
There is special code in pp_rv2gv to deal with the case of built-in
variables that are created on the fly. It basically pretends that
they have always existed, even in rvalue context.
Normally, defined(*{"foo"}) will not actually create the *foo glob,
but will simply return false. defined(*{">"}), however is supposed
to return true because of the $> variable; its popping into existing
when looked at being an implementation detail. That is the whole pur-
pose of is_gv_magical_sv in gv.c.
Prior to this commit, however, defined(*{">"}) would autovivify the
GV, but then return *false*!
It was simply a matter of faulty logic in this part of pp_rv2gv:
SV * const temp = MUTABLE_SV(gv_fetchsv(sv, 0, SVt_PVGV));
if (!temp
&& (!is_gv_magical_sv(sv,0)
|| !(sv = MUTABLE_SV(gv_fetchsv(sv, GV_ADD,
SVt_PVGV))))) {
RETSETUNDEF;
}
sv = temp;
The autovivification happens in the second gv_fetchsv call. But after
the new GV is assigned to sv and the condition proves false, we reach
the sv = temp assignment which clobbers it.
Father Chrysostomos [Mon, 22 Aug 2011 03:43:21 +0000 (20:43 -0700)]
Make defined(${'$'}) return true
Commit
0e219455 made $$ into a magical variable that is not created
on startup.
Usually perl pretends that built-in vars created on the fly have
always existed. But commit
0e219455 did not add $$ to the list of
such variables in is_gv_magical_sv. So defined ${'$'} started return-
ing false.
Father Chrysostomos [Mon, 22 Aug 2011 03:21:11 +0000 (20:21 -0700)]
Remove obsolete paragraph from perlintern/is_gv_magical_sv
This paragraph, added in 2004 by commit
b9b0e72c, was made obsolete in
2008 by commit
9d8f40c4.
Father Chrysostomos [Mon, 22 Aug 2011 03:09:44 +0000 (20:09 -0700)]
Add tests for unlink
Father Chrysostomos [Mon, 22 Aug 2011 02:58:43 +0000 (19:58 -0700)]
Make unlink with implicit $_ work once more
I broke this with commit
ea5703f4. unlink is the only op that has the
OA_DEFGV flag and no scalar or file arguments.
Commit
ea5703f4 changed the OA_DEFGV logic in ck_fun to generate a
new $_ op for the first optional parameter, instead of just the first
parameter, to avoid special-casing unpack. But lists are not marked
with OA_OPTIONAL. So this commit changes it to check for list parame-
ters as well.
Abigail [Sun, 21 Aug 2011 21:57:37 +0000 (23:57 +0200)]
Mention the 5.14 and 5.15 tracks.
This was done for other previous tracks as well.
Steffen Mueller [Sun, 21 Aug 2011 11:35:43 +0000 (13:35 +0200)]
Changelog/version bump for ExtUtils::ParseXS
Upgrade version in Maintainers.pl.
Steffen Mueller [Sun, 21 Aug 2011 11:35:14 +0000 (13:35 +0200)]
Make sure to strip trailing semicolons from inputmap
If we don't get that right, there may be additional semicolons in
the output C code. Those will be interpreted as empty statements
which is a problem for strict/old compilers which require strict
separation of declarations and other code.
Reported by Torsten Schoenfeld, diagnosed by Thorsten and Jan Dubois.
Nicholas Clark [Sun, 21 Aug 2011 12:55:28 +0000 (14:55 +0200)]
Fix C++ build following commit
ab1478f7146843f7.
For C++,
ab1478f7146843f7 inadvertently defined XS_INTERNAL as
extern "C" static ...
which C++ compilers rightfully choke on.
Nicholas Clark [Sun, 21 Aug 2011 12:37:22 +0000 (14:37 +0200)]
Bump $ExtUtils::ParseXS::VERSION following commit
948e998797279292.
Ricardo Signes [Sun, 21 Aug 2011 11:43:21 +0000 (07:43 -0400)]
add the 5.15.2 epigraph
Steffen Mueller [Thu, 18 Aug 2011 11:20:35 +0000 (13:20 +0200)]
Make the use of XS_EXTERNAL fall back to XS
If XSUB.h/perl doesn't define the new XS_EXTERNAL macro that we
use for emitting non-static XSUBs for the boot functions, we have
XS_EXTERNAL just fall back to the standard XS macro.
Steffen Mueller [Fri, 12 Aug 2011 17:13:09 +0000 (19:13 +0200)]
Perldelta for static XSUBs
Steffen Mueller [Fri, 12 Aug 2011 15:28:33 +0000 (17:28 +0200)]
Make XSUBs static by default
At the same time, do not include "STATIC" in XSPROTO and
get rid of the XSPROTO_INTERNAL and XSPROTO_EXTERNAL macros
because of that. This allows Devel::PPPort to continue doing
its evil typedef'ing magic using XSPROTO.
Steffen Mueller [Fri, 12 Aug 2011 15:27:00 +0000 (17:27 +0200)]
Exlicitly enable exporting of some XSUB symbols
These are used in other compilation units. The declarations there
use the XS_EXTERNAL macro to indicate an non-static XSUB that is
taken from another object file.
Steffen Mueller [Fri, 12 Aug 2011 15:13:03 +0000 (17:13 +0200)]
New XS keyword: EXPORT_XSUB_SYMBOLS
This can be used to enable/disable the exporting of XSUB symbols.
Technically and at least as far as the documentation change is
concerned, this change goes together with the upcoming change
to XSUB.h to make not exporting the XSUB symbols the default.
It's harmless if a bit useless without that.
In the original plan for making XSUBs "static", there wouldn't have
been a public and easy way to make XSUBs exported from XS code
without resorting to manually redefining macros. But since even in
just the core set of modules, simple things break, I think it's best
to expose this bit of choice.
Father Chrysostomos [Sun, 21 Aug 2011 08:37:42 +0000 (01:37 -0700)]
Refactor unpack’s newDEFSVOP logic; correct prototype
unpack is the only op that takes an implicit $_ for its second argu-
ment. (For others it’s the first.)
Instead of special-casing unpack with its own ck_ routine, we can sim-
ply modify the logic in ck_fun to apply OA_DEFGV to the first optional
argument, not just the first argument.
Currently OA_DEFGV is not set in PL_opargs[OP_UNPACK], which means the
automatically-generated prototype is ($;$), instead of ($_).
This commit sets the flag on the op, changes it to use ck_fun
directly, and updates ck_fun and the prototype-generation code accord-
ingly. I couldn’t put this in multiple commits, as the changes are
interdependent.
Father Chrysostomos [Sun, 21 Aug 2011 08:26:37 +0000 (01:26 -0700)]
Correct test in defins.t
defined(FILE) does not work. This test ‘passed’ for me, even when
I broke it.
Father Chrysostomos [Sun, 21 Aug 2011 06:49:11 +0000 (23:49 -0700)]
Test unpack with no args
to make sure subsequent commits don’t break things.
Dominic Hargreaves [Sat, 20 Aug 2011 14:44:13 +0000 (15:44 +0100)]
[perl #96000] Apply standard copyright license statement
The original authors have agreed to alter the licensing of these
files, in order to remove a potentially problematic invariant
title clause:
From: Doug MacEachern <dougm@…..com>
To: Jon Orwant <orwant@….com>
Cc: Jesse Vincent <jesse@fsck.com>
Subject: Re: [fwd] [perl #96000] Restrictive licensing term on pod/perlembed.pod, pod/perlmodinstall.pod
Message-ID: <
1dc71b53-12e2-45d3-af62-
f6d169147921@ox.local>
In-Reply-To: <CAJs5hDaW+k6mf_NBj-6hPyr4rGvkEjhVtXyJ8ziLXyXimcvgHA@mail.gmail.com>
Any license changes to perlembed.pod are fine with me.
Or just revert to the original version of the document: "Look at perlmain.c, and do something like that." ;)
Best,
-Doug
----- Original Message -----
> From: "Jon Orwant" <orwant@….com>
> To: "Jesse Vincent" <jesse@fsck.com>
> Cc: dougm@….com
> Sent: Sunday, July 31, 2011 7:38:49 PM
> Subject: Re: [fwd] [perl #96000] Restrictive licensing term on pod/perlembed.pod, pod/perlmodinstall.pod
>
> Sure, happy to relicense.
>
>
> Jon
>
>
> On Sun, Jul 31, 2011 at 4:03 PM, Jesse Vincent < jesse@fsck.com >
> wrote:
>
>
> Hi Doug & Jon,
>
> I know it's been forever since you last touched the perl core-
>
> It looks like the Debian folks would like us to relax the licensing
> terms on docs that bear your copyrights.
>
> Would you be willing to relicense the contributions you made to the
> two
> documents listed below under the same terms as the rest of Perl?
>
> Thanks!
> Jesse
> --
Ricardo Signes [Sun, 21 Aug 2011 00:38:03 +0000 (20:38 -0400)]
update TOC for perl5153delta
Ricardo Signes [Sun, 21 Aug 2011 00:29:58 +0000 (20:29 -0400)]
create perldelta.pod for 5.12.3
Ricardo Signes [Sat, 20 Aug 2011 18:58:36 +0000 (14:58 -0400)]
add new release to perlhist
Ricardo Signes [Sat, 20 Aug 2011 18:25:58 +0000 (14:25 -0400)]
remove boilerplate text from perldelta
Ricardo Signes [Sat, 20 Aug 2011 18:11:18 +0000 (14:11 -0400)]
update perldelta for release;
In particular, note the addition of the coreargs opcode in perldelta
We might have no need of this entry in the perl5160 delta, but for
those brave enough to read 5.15.2 delta, it may be of interest.
Ricardo Signes [Sat, 20 Aug 2011 18:57:02 +0000 (14:57 -0400)]
WIP
Ricardo Signes [Sat, 20 Aug 2011 18:56:49 +0000 (14:56 -0400)]
Update Module::CoreList for 5.x.y