Father Chrysostomos [Sun, 23 Jun 2013 14:06:49 +0000 (07:06 -0700)]
[perl #78194] Make foreach copy pad tmps
before aliasing them to $_.
This caused one to-do test in sub.t to pass, but the bug it is testing
for has not been fixed, so I added another one. I didn’t remove the
to-do test that started passing, because it is still a good test to
have (the only test we have for interactions betwen foreach, shared
hash keys, and recursion).
Father Chrysostomos [Sun, 23 Jun 2013 06:04:13 +0000 (23:04 -0700)]
Correct list.t descr in MANIFEST
We don’t use the term ‘array’ for lists any more. Also, mention
slices, since list slices are tested here.
Father Chrysostomos [Sun, 23 Jun 2013 01:46:00 +0000 (18:46 -0700)]
[perl #3105] Make 1..3 modification safe
This construct is optimised at compile time to an anonymous array with
an implicit @{} around it if both arguments are constant. Modifying
elements of that array produces wrong results the next time the same
code is executed.
If we mark each element of the array as PADTMP, then it will be
treated like an operator’s return value (which it is) and get copied
as appropriate.
Father Chrysostomos [Sat, 22 Jun 2013 07:26:12 +0000 (00:26 -0700)]
constant.t: Correct version
I didn’t have this done in time for 5.19.1.
Father Chrysostomos [Thu, 20 Jun 2013 21:32:15 +0000 (14:32 -0700)]
[perl #78194] Make sub calls copy pad tmps
before aliasing them to elements of @_.
Father Chrysostomos [Thu, 20 Jun 2013 21:13:20 +0000 (14:13 -0700)]
Increase $OptreeCheck::VERSION to 0.10
though I still don’t understand why it has a version at all.
Father Chrysostomos [Thu, 20 Jun 2013 13:04:59 +0000 (06:04 -0700)]
[perl #78194] Make grep/map copy pad tmps
before aliasing them to $_.
And make sure the copies go back on the stack for grep, since modi-
fying $_ in the grep block or expression is supposed to modify the
item returned.
Father Chrysostomos [Thu, 20 Jun 2013 12:25:01 +0000 (05:25 -0700)]
pad.c: cast before comparing signed with unsigned
Father Chrysostomos [Wed, 19 Jun 2013 03:34:21 +0000 (20:34 -0700)]
op.c: Stop copying constants under ithreads
This fixes bugs #21979, #89188, #109746, #114838 and #115388 and
mostly fixes #109744 and #105906 (other issues still remain in those
two tickets).
Because the PADTMP flag was doing double duty, indicating that a
pad slot was in use in addition to indicating a target, constants
could not be shared between pad slots, as freeing one const op (and
turning of its PADTMP flag in pad_free) would mark some other pad
slot as free.
I believe this may have been fixed already by change
3b1c21fabed,
which made const ops use pad_swipe (which removes the SV from the
pad) instead of pad_free (which marks it as available for reuse). But
the copying still happens.
In any case, as of the previous commit, whether a pad slot for a con-
stant is in use is now stored in the pad name. Slots in use for const
ops now have &PL_sv_no names.
So there is no longer any reason to copy the constants.
The difference can be observed thus:
Before:
$ ./perl -lIlib -MDevel::Peek -e 'sub foo(){42} Dump foo; Dump foo'
SV = IV(0x7f94ea02ef10) at 0x7f94ea02ef20
REFCNT = 2
FLAGS = (PADTMP,IOK,READONLY,pIOK)
IV = 42
SV = IV(0x7f94ea02eeb0) at 0x7f94ea02eec0
REFCNT = 1
FLAGS = (PADTMP,IOK,READONLY,pIOK)
IV = 42
After:
$ ./perl -lIlib -MDevel::Peek -e 'sub foo(){42} Dump foo; Dump foo'
SV = IV(0x7f894882ef10) at 0x7f894882ef20
REFCNT = 3
FLAGS = (IOK,READONLY,pIOK)
IV = 42
SV = IV(0x7f894882ef10) at 0x7f894882ef20
REFCNT = 3
FLAGS = (IOK,READONLY,pIOK)
IV = 42
Notice the different addresses.
There are still special cases for copying &PL_sv_undef, which I need
to tackle.
Since most constants created by ‘use constant’ have the PADMY flag on
(since they reside in lexical variables inside constant.pm) and PADMY
and PADTMP are exclusive, I have stop turning on PADTMP for constants.
It is no longer necessary now, since before its purpose was to mark
pad entries as being in use. That means many to-do tests pass.
Father Chrysostomos [Tue, 18 Jun 2013 23:51:57 +0000 (16:51 -0700)]
pad.c: Expand pad_push SVf_READONLY explanation
Father Chrysostomos [Sun, 16 Jun 2013 21:00:01 +0000 (14:00 -0700)]
pad.c: Use &PL_sv_no for const pad names
Currently &PL_sv_undef as a pad name can indicate either a free slot
available for use by pad_alloc or a slot used by an op target (or,
under ithreads, a constant or GV).
Currently pad_alloc distinguishes between free slots and unnamed slots
based on whether the value in the pad has PADMY or PADTMP set. If
neither is set, then the slot is free. If either is set, the slot
is in use.
This makes it rather difficult to distinguish between constants stored
in the pad (under ithreads) and targets. The latter need to be copied
when referenced, to give the impression that a new scalar is being
returned by an operator each time. (So \"$a" has to return a refer-
ence to a new scalar each time, but \1 should return the same one.)
Also, constants are shared between recursion levels. Currently, if
the value is marked READONLY or is a shared hash key scalar, it is
shared. But targets can also me shared hash keys, resulting in bugs.
It also makes it impossible for the same constant to be shared by mul-
tiple pad slots, as freeing one const op will turn off the PADTMP flag
while the other slot still uses it, making the latter appear to be
free. Hence a lot of copying occurs under ithreads. (Actually, that
may not be true any more since
3b1c21fabed, as freed const ops swipe
their constants from the pad. But right now, a lot of copying does
still happen.)
Also, XS modules may want to create const ops that return the same
mutable SV each time. That is currently not possible without
various workarounds including custom ops and references. (See
<https://rt.perl.org/rt3/Ticket/Display.html?id=105906#txn-1075354>.)
This commit changes pad_alloc and pad_free to use &PL_sv_no for con-
stants and updates other code to keep all tests passing. Subsequent
commits will actually use that information to fix bugs.
This will probably break PadWalker, but I think it is an acceptable
trade-off. The alternative would be to make PadnamePV forever more
complex than necessary, by giving it a special case for &PL_sv_no and
having it return NULL.
I gave PadnameLEN a special case for &PL_sv_undef, so it may appear
that I have simply shifted the complexity around. But if pad names
stop being SVs, then this exception will simply disappear, since the
global &PL_padname_undef will have 0 in its length field.
Father Chrysostomos [Sun, 16 Jun 2013 19:40:05 +0000 (12:40 -0700)]
Re(mov|writ)e two comments from pad.c:pad_alloc
The thing about "foreach" index vars was added in
bbce6d697 (insepar-
able changes from patch from perl5.003_08 to perl5.003_09, presuma-
bly the ‘Lexical scoping cleanup’ part). It is not valid, because
‘foreach’ doesn’t aliases a pad entry to a non-pad (not marked PADMY
or PADTMP) value until run time, and pad_alloc happens at compile
time. The real reason we need this loop is that entries that close
over unavailable variables are not marked PADMY. That may have been a
mistake, but it works because of this loop. The reason for the loop
also may have changed over time.
The comment about copying to sv is not valid, because it is used later
on in the same condition when compared to &PL_sv_undef. It was added
in commit
dd2155a49b.
Father Chrysostomos [Sun, 16 Jun 2013 06:17:59 +0000 (23:17 -0700)]
op.c:S_fold_constants: Add assertion
This code correctly handles a value returned by a folded constant that
is a target or a mortal.
If it is neither, then it takes ownership of a reference count (with-
out doing SvREFCNT_inc), so it ends up sharing a reference count with
whatever owned it before. That is only safe to do with immortals,
which is (afaict) the only other type of scalar that can get through
this code, so it is actually correct.
Changes elsewhere could easily break this, though, so add an
assertion.
Father Chrysostomos [Sun, 16 Jun 2013 04:52:07 +0000 (21:52 -0700)]
Change the tests for #3105 into to-dos
instead of testing for the incorrect behaviour
Father Chrysostomos [Sun, 16 Jun 2013 03:41:49 +0000 (20:41 -0700)]
Test readonliness of overload constants
including one to-do test
Father Chrysostomos [Sun, 16 Jun 2013 03:29:16 +0000 (20:29 -0700)]
To-do test for #109746
Father Chrysostomos [Sun, 16 Jun 2013 03:24:55 +0000 (20:24 -0700)]
Test (im)mutability of constants and constant-like subs
including many to-do tests
Father Chrysostomos [Sun, 16 Jun 2013 02:42:35 +0000 (19:42 -0700)]
Test !0 and !1 immutability and singletonness
The latter (for bug #114838) is a to-do test under ithreads.
Father Chrysostomos [Sun, 16 Jun 2013 02:29:27 +0000 (19:29 -0700)]
Test that literal numbers and strings are read-only
including ${\3}, which currently fails under ithreads (and is hence a
to-do test).
Father Chrysostomos [Sun, 16 Jun 2013 02:14:14 +0000 (19:14 -0700)]
To-do tests for perl #78194
plus a regular (not to-do) test for an lvalue sub case that already
works properly.
Father Chrysostomos [Sat, 15 Jun 2013 18:57:56 +0000 (11:57 -0700)]
ref.t: To-do test for retvals of folded ops
Father Chrysostomos [Sat, 15 Jun 2013 18:41:57 +0000 (11:41 -0700)]
sub.t: To-do test for recursive shared-hash-keys TARGs
This is only buggy under ithreads.
sub a {
for (${\""}.${\""}) {
$_ = $_[0] || __PACKAGE__;
print "$_\n";
a("road") unless $_[0];
print "$_\n";
}
}
a();
The outer call sets the scalar returned by ${\""}.${\""} to the cur-
rent package name.
The inner call sets it to "road".
Each call prints it twice, the outer call surrounding the inner call.
The output in 5.10-5.18 is:
main
road
road
road
because the inner call is clobbering the same scalar. If __PACKAGE__
is changed to "main", it works, and prints
main
road
road
main
(as the script above also prints in 5.8.8).
Tony Cook [Fri, 26 Jul 2013 01:17:02 +0000 (11:17 +1000)]
Tony Cook [Fri, 26 Jul 2013 01:09:11 +0000 (11:09 +1000)]
[perl #39739] Exporter::Heavy ignores custom $SIG{__WARN__} handlers
Tony Cook [Fri, 26 Jul 2013 01:00:23 +0000 (11:00 +1000)]
bump $Exporter::VERSION (and hence $Exporter::Heavy::VERSION)
Tony Cook [Thu, 18 Jul 2013 06:03:19 +0000 (16:03 +1000)]
[perl #39739] Exporter::Heavy ignores custom $SIG{__WARN__} handlers
Tony Cook [Thu, 18 Jul 2013 06:02:29 +0000 (16:02 +1000)]
[perl #39739] TODO test for Exporter respecting warning handlers
Tony Cook [Fri, 26 Jul 2013 00:54:13 +0000 (10:54 +1000)]
let Porting/cmpVERSION.pl know Exporter was moved to dist/
Chris 'BinGOs' Williams [Wed, 24 Jul 2013 20:31:18 +0000 (21:31 +0100)]
Update ExtUtils-MakeMaker to CPAN version 6.72
[DELTA]
6.72 Wed Jul 24 18:38:19 BST 2013
No changes from 6.71_01
6.71_01 Wed Jul 24 09:31:07 BST 2013
Bug Fixes:
* Resolved more regressions in parse_version code
Chris 'BinGOs' Williams [Wed, 24 Jul 2013 20:28:34 +0000 (21:28 +0100)]
Update Module-CoreList MANIFEST to include Utils.pm
Karl Williamson [Wed, 24 Jul 2013 15:15:01 +0000 (09:15 -0600)]
perlopentut: Fit verbatim lines into 79 columns
David Mitchell [Wed, 24 Jul 2013 14:20:22 +0000 (15:20 +0100)]
perlvar.pod: add a separate section on $& et al
Add a new separate section explaining the performance issues of $`, $&
and $'; plus descriptions of the various workarounds like @-, /p and COW,
and which perl version they were each introduced in.
Then in the entries for each individual var, strip out any commentary
about performance, and just include a link to the new performance
section.
David Mitchell [Wed, 24 Jul 2013 13:18:22 +0000 (14:18 +0100)]
English.pm: update perl version where perf fixed
It still said that the performance of $`, $&, $' was fixed in 5.18.
Update that to 5.20, since COW wasn't enabled by default in 5.18.
Chris 'BinGOs' Williams [Wed, 24 Jul 2013 07:04:25 +0000 (08:04 +0100)]
Update ExtUtils-MakeMaker to CPAN version 6.70
[DELTA]
6.70 Tue Jul 23 21:55:23 BST 2013
No changes from 6.69_09
6.69_09 Sun Jul 21 09:22:40 BST 2013
Bug Fixes:
* RT#86976 Fix version parsing bug introduced in 6.69_05
Part Deux :)
6.69_08 Wed Jul 17 00:36:28 BST 2013
Bug Fixes:
* RT#86976 Fix version parsing bug introduced in 6.69_05
6.69_07 Tue Jul 16 15:32:25 BST 2013
New features:
* RT#4550 report the file created after make dist
Bug Fixes:
* RT#66113 strip control characters from ABSTRACT
* RT#20662 Don't check for config.h if it doesn't exist
6.69_06 Fri Jul 12 14:49:32 BST 2013
Bug Fixes:
* RT#64163 clean_subdirs infinite loop if subdir already gone
* RT#79348 doesn't support miniperl in installation paths
Doc Fixes:
* Fix META_MERGE example
* RT#31053 Mention configure_requires in PREREQ_FATAL documentation
* RT#14680 Document TEST_FILES usage with 'make test'
* RT#21285 Document 'make veryclean'
6.69_05 Thu Jul 11 22:10:10 BST 2013
Bug Fixes:
* Resolve RT#9452 regression with
parse_version() (Victor Efimov)
* RT#28632 use LD and OPTIMIZE in recursive Makefile.PL
invocations (Niko Tyni)
6.69_04 Wed Jul 10 11:48:22 BST 2013
Cygwin Fixes:
* Revert RT#54703 and apply patch from RT#69401 to
resolve /cygdrive issues (Reini Urban)
6.69_03 Tue Jul 9 22:39:54 BST 2013
Bug Fixes:
* RT#61419 Avoid invisible interactive question when
rebuilding Makefile (Slaven Rezic)
* VERSION also now really handles v-strings correctly.
Cygwin Fixes:
* RT#54703 - Don't hardcode /cygdrive (Jerry Hedden)
Misc:
* Install into site when 5.12 or above
6.69_02 Tue Jul 2 13:12:51 BST 2013
Bug Fixes:
* [RT#86609] VERSION_FROM now handles v-strings correctly.
* VERSION also now handles v-strings correctly.
Misc:
* Updated bundled CPAN::Meta and removed Version::Requirements
6.69_01 Thu Jun 20 12:49:45 BST 2013
Win32 Fixes:
* resolve regression on Win32 introduced in 6.67_01
(bingos)
Nicholas Clark [Wed, 24 Jul 2013 07:36:18 +0000 (09:36 +0200)]
Merge work automating generation of lib/.gitignore and lib/ subdir cleanup.
This makes no changes to any installed code.
Nicholas Clark [Tue, 23 Jul 2013 08:16:08 +0000 (10:16 +0200)]
Generate the lib/ cleanup rules in the Win32 Makefiles from MANIFEST.
Nicholas Clark [Mon, 22 Jul 2013 20:10:09 +0000 (22:10 +0200)]
Generate the lib/ cleanup rules in Makefile.SH automatically from MANIFEST.
Nicholas Clark [Sat, 20 Jul 2013 19:18:05 +0000 (21:18 +0200)]
Re-order clean-up rules to give a line for regen/lib_cleanup.pl to key off.
The Win32 line C<-del /f *.def *.map> and the start of the Unix line
C<rm -f so_locations> are unlikely to change.
Nicholas Clark [Sat, 20 Jul 2013 19:04:16 +0000 (21:04 +0200)]
Remove the EXTUTILSDIR macro from the Win32 makefiles.
It hasn't been used since commit
e3160748789c8366 in Sept 2009 eliminated
the XSUBPP macro.
Nicholas Clark [Sat, 20 Jul 2013 19:02:56 +0000 (21:02 +0200)]
Delete obsolete clean rules from Makefile.SH
Rules to clean lib/ExtUtils/CBuilder/t and lib/ExtUtils/ParseXS/t haven't
been needed since the modules were moved to cpan/ and dist/
Nicholas Clark [Mon, 22 Jul 2013 19:23:11 +0000 (21:23 +0200)]
Move process() from Porting/pod_rules.pl to Porting/pod_lib.pl
And document it.
Nicholas Clark [Sat, 20 Jul 2013 20:46:34 +0000 (22:46 +0200)]
Some tidying of Porting/pod_rules.pl
Iterate over the files in sorted order, instead of hash iteration order.
This means that in TAP mode test failures will have consistent numbers.
Provide a description for the first test when outputting TAP.
Use clearer variable names in process(), and avoid using // as this code will
soon be exposed to pre-5.10
Nicholas Clark [Sat, 20 Jul 2013 20:08:37 +0000 (22:08 +0200)]
Extract the main processing loop of Porting/pod_rules/pl into process().
Nicholas Clark [Sat, 20 Jul 2013 14:55:37 +0000 (16:55 +0200)]
Move verify_contiguous() from Porting/pod_rules.pl to Porting/pod_lib.pl
And document it.
Nicholas Clark [Sat, 20 Jul 2013 14:46:02 +0000 (16:46 +0200)]
Refactor the use of verify_contiguous() in pod_rules.pl
Move the substitution from the callers in into verify_contiguous().
Pass in a regex object for the substitution.
Return the modified file contents from verify_contiguous().
Load Carp when verify_contiguous() is called, instead of at compile time.
Nicholas Clark [Sat, 20 Jul 2013 12:08:41 +0000 (14:08 +0200)]
Remove 3 redundant lines from .gitignore
These test files are no longer generated in directories beneath lib/
Nicholas Clark [Sat, 20 Jul 2013 10:50:21 +0000 (12:50 +0200)]
Generate lib/.gitignore from MANIFEST.
It's possible to programmatically determine almost all the files and
directories which will be created in lib/ by building the extensions.
Hence add a new script regen/lib_cleanup.pl to do this.
This saves having to manually update lib/.gitignore to reflect changes in
the build products of extensions, which has become a small but reoccurring
instance of scut-work.
Nicholas Clark [Mon, 22 Jul 2013 07:26:24 +0000 (09:26 +0200)]
On failure, regen_lib.pl now generates diagnostics, not just "not ok".
We have to stop using File::Compare's compare(), as it doesn't return
diagnostics about what went wrong.
Nicholas Clark [Sat, 20 Jul 2013 09:08:53 +0000 (11:08 +0200)]
Move all the "special case" build products from lib/.gitignore to .gitignore
These are all the build products that we can't programmatically infer will be
generated from extensions in ext, dist and cpan.
Nicholas Clark [Sat, 20 Jul 2013 08:33:00 +0000 (10:33 +0200)]
Make .gitignore and lib/.gitignore more consistent.
Move the ignore of lib/App/, lib/mro.pm, lib/TAP/, lib/Test/Harness.pm,
lib/File/DosGlob.pm, lib/inc/, Win32.pm, Win32API/ and Win32Core.pm from
.gitignore to lib/.gitignore, where they more logically belong.
Consistently use trailing / for ignored directories.
Add a leading / to the ignore of unicore/TestProp.pl
(The line was added by commit
3df51b85ce4a5664 in Nov 2009, and it's not
clear why it did not have a leading / from the start.)
Re-sort lib/.gitignore lexically.
Nicholas Clark [Sat, 20 Jul 2013 08:10:12 +0000 (10:10 +0200)]
Prune some .gitignore files.
Class::ISA was removed by
3df51b85ce4a5664 in April 2010.
Module::Pluggable was removed by commit
482cac4d574f8c6c in May 2013.
Module/Build/ConfigData.pm was moved from lib/ to cpan/ by commit
0b93a7997e668a67 in Nov 2009.
Pod::Plainer was removed by commit
afbe215fcafe7a92 in April 2010.
Shell was removed by commit
a1e75797c204ade8 in June 2011.
Switch was removed by commit
75108aefc8b50fcf in April 2010.
Tony Cook [Wed, 24 Jul 2013 07:31:03 +0000 (17:31 +1000)]
perldelta for
ea382fac4c7
The versioning for dist/bignum was a little confused, hopefully I've
unconfused it
Tony Cook [Wed, 24 Jul 2013 07:25:42 +0000 (17:25 +1000)]
[perl #118995] Fix bigrat's $MBI configuration
Tony Cook [Wed, 24 Jul 2013 07:16:13 +0000 (17:16 +1000)]
[perl #118955] bump $bignum::VERSION to 0.36
set all other modules in dist/bignum to 0.36 too, the CPAN dist has
them all at the same version
Nathan Trapuzzano [Wed, 24 Jul 2013 00:34:16 +0000 (20:34 -0400)]
Initialize BigInt's $MBI correctly with "use bigrat lib => '...'".
Nicholas Clark [Thu, 18 Jul 2013 14:57:00 +0000 (16:57 +0200)]
Refactor t/porting/regen.t to check everything (and the return values!).
Previously it was fire-and-forget for the 3 programs it ran (and for the
programs that regen.pl ran). Now we die if any program fails to return 0.
Also regen.t had an explicit list of programs to test. It turned out that it
was not testing regen/mk_invlists.pl. Now regen.t has a skip list of what
not to test, and everything not skipped it tested. This way any new
additions will not get missed.
This was implemented by refactoring regen.pl to read the list of programs it
runs from <DATA>, so that regen.t can open regen.pl to extract the same
list.
Nicholas Clark [Thu, 18 Jul 2013 13:10:29 +0000 (15:10 +0200)]
Syntax check regen/uconfig_h.pl using t/porting/utils.t
It's the only regen script that we can't run as part of the tests (because it
requires a Unix shell), but can syntax check (because it only uses core
modules).
In theory we could make it skip with --tap if $Config{sh} is not what we
expect, but to be robust this looks to be a problem. Firstly, $Config{sh}
can be undef, or something "non-Unix". To be useful a whitelist needs to be
(at least) (?:/usr)?/bin/sh, and potentially also ksh. But the output is not
valid TAP:
$ ./perl -Ilib regen/uconfig_h.pl --tap
Extracting uconfig.h-new (with variable substitutions)
ok - regen/uconfig_h.pl uconfig.h
and t/TEST would choke, so we'd need to capture it or otherwise comment out
that "Extracting" line which just adds both complexity and fragility.
So the right trade off appears to be just to syntax check it.
Chris 'BinGOs' Williams [Wed, 24 Jul 2013 06:55:36 +0000 (07:55 +0100)]
Missed this when updating Module-Build
Tony Cook [Wed, 24 Jul 2013 06:08:48 +0000 (16:08 +1000)]
Tony Cook [Wed, 24 Jul 2013 06:00:45 +0000 (16:00 +1000)]
[perl #118907] Do not call DESTROY on empty objects with STORABLE_attach
avoids creating temporary objects for STORABLE_attach when they aren't
needed.
Tony Cook [Wed, 24 Jul 2013 05:58:46 +0000 (15:58 +1000)]
[perl #118907] bump $Storable::VERSION
Tony Cook [Mon, 15 Jul 2013 04:17:25 +0000 (14:17 +1000)]
[perl #118907] fix some issues with patch
Vladimir Timofeev [Fri, 12 Jul 2013 20:40:23 +0000 (00:40 +0400)]
Restore Storable speed after previous fix.
Pull out getting stash by name from macro BLESS and SEEN.
So results of gv_stashpv may be reused by calling side. This allow
to not evaluate same things twice in retrieve_hook.
Vladimir Timofeev [Thu, 11 Jul 2013 23:14:19 +0000 (03:14 +0400)]
Do not call DESTROY for empty objects
Before this fix, deserialization process for object with STORABLE_attach
hook looks like:
1. create SV of needed type
2. lookup classname
3. bless SV to class
4. lookup for STORABLE_attach
5. destroy SV
6. return result of STORABLE_attach call
As a result DESTROY method of target class was called with empty, not
initialized object. This behaviour very bad especially for non
hash-based XS objects.
Fix it, by move blessing temprorary SV after STORABLE_attach hook check.
This commit slowdown deserialization of other objects (with
STORABLE_thaw hook). It will be fixed later.
Tony Cook [Wed, 24 Jul 2013 05:39:46 +0000 (15:39 +1000)]
[perl #118923] Add some edge cases to join.t
Tony Cook [Wed, 24 Jul 2013 05:37:37 +0000 (15:37 +1000)]
join() with an empty list and undef separator may not warn in the future
but keep the test to avoid it changing by accident
Tony Cook [Wed, 24 Jul 2013 05:36:42 +0000 (15:36 +1000)]
add Victor Efimov to AUTHORS
Victor Efimov [Tue, 16 Jul 2013 16:39:12 +0000 (20:39 +0400)]
Add some edge cases to join.t test
test what join return if called with empty LIST, also
test that it produce warning if separator is undef
Ricardo Signes [Wed, 24 Jul 2013 04:37:32 +0000 (21:37 -0700)]
perldelta: note the perlopentut rewrite
Ricardo Signes [Wed, 24 Jul 2013 04:34:36 +0000 (21:34 -0700)]
Merge branch 'perlopentut' into blead
Ricardo Signes [Wed, 24 Jul 2013 04:25:07 +0000 (21:25 -0700)]
perlopentut: standardize on no newline in die
it is nice to know from where an error originates!
James E Keenan [Fri, 12 Jul 2013 15:35:42 +0000 (17:35 +0200)]
perlopentut: Spelling and stylistic improvements only.
Ricardo Signes [Fri, 12 Jul 2013 14:55:59 +0000 (10:55 -0400)]
perlopentut: add copyright/author, remove history
Ricardo Signes [Fri, 12 Jul 2013 14:42:06 +0000 (10:42 -0400)]
perlopentut: correct perlfaq links
thanks to David Golden for pointing this out
Tom Christiansen [Fri, 12 Jul 2013 14:20:36 +0000 (10:20 -0400)]
Don't patch perlopentut: rewrite it completely
Patch made by rjbs, from <10107.
1361064602@chthon>
> Nearly [all of perlopentut] is non-simple. That is not a tutorial,
> and it is not just about open. It is more like "FMTEYEWTK About
> open() and I/O in Perl". If the goal is to create a document that
> teaches people how to use open() for the simple cases, then there
> is no hope for perlopentut. It cannot be turned into that,
> because that is not what it is. You have to start over.
Tony Cook [Tue, 23 Jul 2013 01:36:01 +0000 (11:36 +1000)]
Revert "Remove the non-inline function S_croak_memory_wrap from inline.h."
This reverts commit
43387ee1abcd83c3c7586b7f7aa86e838d239aac.
Which reverted parts of
f019c49e380f764c1ead36fe3602184804292711, but that
reversion may no longer be necessary.
See [perl #116989]
Neil Bowers [Sun, 21 Jul 2013 19:59:20 +0000 (20:59 +0100)]
For changelogs suggest name it Changes and follow CPAN::Changes::Spec
Father Chrysostomos [Wed, 24 Jul 2013 01:01:35 +0000 (18:01 -0700)]
Revert "perl5180delta: typo"
This reverts commit
cbd5ead563d5a5df04e771f407468c0d3bcdb9f7.
Tony Cook pointed out in
<
20130724003722.GA12260@mars.tony.develop-help.com> that I have no
idea what I am talking about.
(I did mean gigabyte.)
Father Chrysostomos [Tue, 23 Jul 2013 21:38:30 +0000 (14:38 -0700)]
pos.t: test something I almost broke
Father Chrysostomos [Tue, 23 Jul 2013 21:37:29 +0000 (14:37 -0700)]
fix typo in sv.c apidocs
sv_pos_u2b_flags has no offsetp parameter. This was copied from
sv_pos_u2b.
Father Chrysostomos [Sun, 21 Jul 2013 13:56:07 +0000 (06:56 -0700)]
sv.c: Remove overflow check in utf8 length cache
In order to make large values of pos() possible, the previous commit
enlarged the mg_len field of the magic struct. That field is also
used for cached utf8 length values. Since it is now large enough to
store any length the OS/compiler supports, the overflow never happens.
Father Chrysostomos [Sun, 21 Jul 2013 07:38:28 +0000 (00:38 -0700)]
[perl #72766] Allow huge pos() settings
This is part of #116907, too. It also fixes #72924 as a side effect;
the next commit will explain.
The value of pos($foo) was being stored as an I32, not allowing values
above I32_MAX. Change it to SSize_t (the signed equivalent of size_t,
representing the maximum string length the OS/compiler supports).
This is accomplished by changing the size of the entry in the magic
struct, which is the simplest fix.
Other parts of the code base can benefit from this, too.
We actually cast the pos value to STRLEN (size_t) when reading
it, to allow *very* long strings. Only the value -1 is special,
meaning there is no pos. So the maximum supported offset is
2**sizeof(size_t)-2.
The regexp engine itself still cannot handle large strings, so being
able to set pos to large values is useless right now. This is but one
piece in a larger puzzle.
Changing the size of mg->mg_len also requires that
Perl_hv_placeholders_p change its type. This function
should in fact not be in the API, since it exists
solely to implement the HvPLACEHOLDERS macro. See
<https://rt.perl.org/rt3/Ticket/Display.html?id=116907#txn-1237043>.
Father Chrysostomos [Sun, 21 Jul 2013 07:30:20 +0000 (00:30 -0700)]
Add sv_pos_b2u_flags
This, similar to sv_pos_u2b_flags, is a more friendly variant of
sv_pos_u2b that works with 2GB strings and actually returns a
value instead of modifying a passed-in value in place through
a pointer.
The next commit will use this.
Father Chrysostomos [Sun, 21 Jul 2013 02:02:13 +0000 (19:02 -0700)]
perl5180delta: typo
Karl Williamson [Tue, 23 Jul 2013 16:40:07 +0000 (10:40 -0600)]
_invlist_intersection() didn't work for NULL first param
It is supposed to accept a NULL first parameter (one of the operands to
the intersection). This adds a special case for it.
Karl Williamson [Tue, 23 Jul 2013 15:42:25 +0000 (09:42 -0600)]
sv.c: Remove duplicate dups
These dupes of two tinterpreter variables were already done a few lines
above; also move a third, related, dupe to where the others are done.
Karl Williamson [Sun, 21 Jul 2013 16:49:05 +0000 (10:49 -0600)]
Remove useless assignments
These aren't used after setting. They came from blindly copying code to
this.
Karl Williamson [Sat, 20 Jul 2013 19:21:14 +0000 (13:21 -0600)]
regcomp.c: Fix #define
cl_init_zero should not be defined as S_cl_init, just 'cl_init'. The S_
prefix is wrong should cl_init be changed to have a pTHX_.
Karl Williamson [Sat, 20 Jul 2013 19:16:55 +0000 (13:16 -0600)]
regcomp.c: Remove wrong/obsolete line
This line was made obsolete and wrong by commit
a0316a6cd4a14261beb22d95530d5763e8b6756b, which changed the format of
inversion lists. This hasn't caused problems because the code currently
is #ifdef'd out.
Karl Williamson [Tue, 23 Jul 2013 15:25:36 +0000 (09:25 -0600)]
regcomp.c: Add some asserts()
Now that inversion lists are their own scalar types, we can verify that
the parameters to their manipulation functions are indeed inversion
lists. This adds such assertions to the bottom level code that deals
with the bare metal of the scalars. Functions that call these (even if
only in other asserts) didn't have asserts added to them, as they call
these anyway.
Nicholas Clark [Tue, 23 Jul 2013 12:36:03 +0000 (14:36 +0200)]
Merge the install_lib.pl/installman/installperl refactoring into blead.
Nicholas Clark [Sun, 14 Jul 2013 09:44:20 +0000 (11:44 +0200)]
install_lib.pl's samepath() should not warn if $p1 does not exist.
If $p1 is a non-existent path, then the two paths can't be the same, so
samepath() should promptly return false.
Nicholas Clark [Sun, 14 Jul 2013 09:12:17 +0000 (11:12 +0200)]
In install_lib.pl, no need to Config->import for the relocatableinc setup.
require Config; within the BEGIN block instead of using it outside it to
save creating one implicit BEGIN block, and running its import twice.
Remove the require 5.004; as the require of Config will fail if running
with anything other than the version about to be installed.
Note in installperl and installman that install_lib.pl imports Config.
Nicholas Clark [Sat, 13 Jul 2013 18:50:44 +0000 (20:50 +0200)]
Move the wrapper for File::Path::mkpath() to install_lib.pl
installperl and installman call File::Path::mkpath with identical arguments
and options, so move the repeated code into a single place.
Nicholas Clark [Sat, 13 Jul 2013 16:33:53 +0000 (18:33 +0200)]
Move {safe_,}rename() from install{man,perl} into install_lib.pl
installman's rename() was identical to installperl's safe_rename() in all
but name (and whitespace), so de-duplicate by moving the code to
install_lib.pl
Tony Cook [Tue, 23 Jul 2013 01:48:54 +0000 (11:48 +1000)]
[perl #74798] fix the build for -Duseithreads
Peter Martini [Sun, 21 Jul 2013 22:45:45 +0000 (18:45 -0400)]
Fix missing single quote in a sed in hints/aix.sh
Karl Williamson [Tue, 23 Jul 2013 00:01:30 +0000 (18:01 -0600)]
epigraphs.pod: Fix too long verbatim lines
The new 5.19.2 epigraph is prose, so it can just be block-quoted
instead of verbatim.
This commit also fixes the 5.13.11 epigraph, which already had some long
lines wrapped.
Tony Cook [Tue, 23 Jul 2013 00:38:57 +0000 (10:38 +1000)]
perldelta for
1d5bb6ba43b89
Tony Cook [Tue, 23 Jul 2013 00:24:45 +0000 (10:24 +1000)]
[perl #116190] -F implies -a, either implies -n
Previously -F without -a was a no-op, and -a without -n or -p was a
no-op, with this change, if you supply -F then both -a and -n are
implied (you can still use -p for its extra behaviour), and if you
supply -a then -n is implied.