This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
8 years agopp_entersub: remove extraneous SAVETMPS
David Mitchell [Fri, 26 Jun 2015 11:17:59 +0000 (12:17 +0100)]
pp_entersub:  remove extraneous SAVETMPS

The branch that handles "no cv, try autoload" does a SAVETMPS.
This serves no purpose, since we will shortly be doing another SAVETMPS
anyway with no intervening ENTER.

8 years agopp_goto: SvREFCNT_dec(oldcv) *after* undef test
David Mitchell [Thu, 25 Jun 2015 15:08:02 +0000 (16:08 +0100)]
pp_goto: SvREFCNT_dec(oldcv) *after* undef test

pp_goto does a LEAVE, then checks that the new CV hasn't been undefed
by the LEAVE. If it has, it croaks.

Move the decrementing of the old CV's ref count and depth to *after*
this check, since the POPSUB done during the croak unwind will do the
decrement also. Otherwise the old sub will be doubly freed.

8 years agopp_goto(): reorder LEAVE_SCOPE for consistency
David Mitchell [Thu, 25 Jun 2015 14:18:25 +0000 (15:18 +0100)]
pp_goto(): reorder LEAVE_SCOPE for consistency

pp_leavesub (via POPSUB()) does a LEAVE_SCOPE before decrementing the CV's
ref count and depth; pp_goto does it after. Reorder it for consistency
with leavesub.

At this point I make no assertion as to which way round is the most
correct.

8 years agopp_goto: use cx->blk_oldscopesp
David Mitchell [Thu, 25 Jun 2015 14:08:37 +0000 (15:08 +0100)]
pp_goto: use cx->blk_oldscopesp

POPSUB() does:

    LEAVE_SCOPE(PL_scopestack[cx->blk_oldscopesp - 1])

while pp_goto(), which manually does the relevant actions from POPSUB(),
does:

    LEAVE_SCOPE(PL_scopestack[PL_scopestack_ix - 1])

For consistency, make pp_goto() use cx->blk_oldscopesp instead.  In fact
at that point they should both hold the same value (and I've added an
assert to that effect), since we should have just popped any nested
scopes.

8 years agoSvREFCNT_inc(cv) recursive subs
David Mitchell [Thu, 25 Jun 2015 11:05:50 +0000 (12:05 +0100)]
SvREFCNT_inc(cv) recursive subs

A CXt_SUB context frame owns 1 reference count to the CV being called,
but only if it's the bottom-level call to that CV; recursive calls don't
count.

This commit changes it so that every CXt_SUB frame owns a reference count.

This removes a lot of "if (CvDEPTH(cv) < 2)" type tests from the code and
makes things generally simpler and less bug-prone.

For ordinary (non-recursive) sub calls it will now be slightly faster, as
it no longer has to do the CvDEPTH check on sub entry and exit; for subs
being recursed into, it will probably be slightly slower, as although it
no longer has to the CvDEPTH check on entry and exit, it now has to do a
refcnt ++/-- instead.

This also means that a deeply recursing sub will have a very high ref
count; but there is no new additional danger of overflow, as sv_refcnt is
U32 while xcv_depth is I32: so the latter will still overflow earlier
anyway.

8 years agoeliminate an SAVEFREESV(cv) from PUSHSUB
David Mitchell [Thu, 25 Jun 2015 09:48:58 +0000 (10:48 +0100)]
eliminate an SAVEFREESV(cv) from PUSHSUB

When a CXt_SUB context is pushed, the reference count of the CV is
increased (and is effectively owned by that context frame). It is
decremented when the context frame is popped.

There was an issue in that the POPSUB was done before the LEAVE,
which meant that at sub exit, the sub could be freed before stuff that
referred to that sub was done (such as lexicals being cleaned up by
SAVEt_CLEARSV).

This was fixed by perl-5.005_02-2095-gb0d9ce3, which split POPSUB
into POPSUB and LEAVESUB with the latter responsible for the decrement.
So for example code might do POPSUB; LEAVE; LEAVSUB.

However this wasn't sufficient, because a similar thing happened during
die, for example

    sub d {die}
    my $f;
    $f = sub {my $x=1; $f = 0; d};
    eval{ $f->() };

since all *all* the CXt_SUB contexts were popped with POPSUB/LEAVSUB
*before* LEAVE was called.

I fixed this with perl-5.8.0-3206-gb36bdec, by adding another increment to
the CV and doing a SAVEFREESV(cv), both in PUSHSUB. This meant that
the save stack would hold at least one reference to the CV while being
unwound.

However, v5.19.3-139-g2537512 then changed things so that POPSUB also
did a LEAVE. This means that now, die unwinds the context stack and the
save stack in lockstep, so my second fix is now redundant. So this commit
undoes it, saving an rc++/-- and SAVEFREE(cv) per sub call.

8 years ago[perl #126544] correct the first example in the fcntl documentation
Tony Cook [Wed, 3 Feb 2016 04:23:19 +0000 (15:23 +1100)]
[perl #126544] correct the first example in the fcntl documentation

8 years agoperldelta for 23c4e91245a4
Tony Cook [Wed, 3 Feb 2016 03:52:00 +0000 (14:52 +1100)]
perldelta for 23c4e91245a4

8 years ago[perl #125540] handle already being at EOF while not finding a heredoc terminator
Tony Cook [Wed, 20 Jan 2016 04:35:13 +0000 (15:35 +1100)]
[perl #125540] handle already being at EOF while not finding a heredoc terminator

In some cases, S_scan_heredoc() can already be at end of file and
PL_rsfp is NULL.  If we're on the final line and that line has no
newline we'd assert or crash.

Now, if we don't find that newline, we obviously can't find the
terminator, so go straight to reporting the missing terminator.

I considered setting s to PL_bufend, but that would just be more
work to print the same message.

8 years agoClarify sprintf() handling of + and space flags
Tony Cook [Wed, 3 Feb 2016 00:35:28 +0000 (11:35 +1100)]
Clarify sprintf() handling of + and space flags

Also with contribution by Chas. Owens.

For: RT #125471

8 years agoperldelta for 8452c1a03e174
Tony Cook [Tue, 2 Feb 2016 06:04:17 +0000 (17:04 +1100)]
perldelta for 8452c1a03e174

8 years ago[perl #127351] add isaelem magic on *Foo::ISA = arrayref
Tony Cook [Tue, 26 Jan 2016 04:53:34 +0000 (15:53 +1100)]
[perl #127351] add isaelem magic on *Foo::ISA = arrayref

8 years ago[perl #127351] TODO tests for arrayref assigned to *Foo::ISA issues
Tony Cook [Tue, 26 Jan 2016 04:22:46 +0000 (15:22 +1100)]
[perl #127351] TODO tests for arrayref assigned to *Foo::ISA issues

8 years agoop.c: update comment about compiler warnings
Lukas Mai [Mon, 1 Feb 2016 22:42:08 +0000 (23:42 +0100)]
op.c: update comment about compiler warnings

8 years agoREADME.android: make the POD a bit nicer
Lukas Mai [Mon, 1 Feb 2016 22:11:57 +0000 (23:11 +0100)]
README.android: make the POD a bit nicer

8 years ago[perl #127426] fixes for 126045 patch, restrict to MSVC, add casts
Tony Cook [Mon, 1 Feb 2016 02:22:53 +0000 (13:22 +1100)]
[perl #127426] fixes for 126045 patch, restrict to MSVC, add casts

8 years agoperldelta for 6f6d1bab334
Tony Cook [Mon, 1 Feb 2016 00:43:50 +0000 (11:43 +1100)]
perldelta for 6f6d1bab334

8 years ago[perl #126045] part revert e9b19ab7 for vc2003 and earlier
Tony Cook [Thu, 28 Jan 2016 04:08:01 +0000 (15:08 +1100)]
[perl #126045] part revert e9b19ab7 for vc2003 and earlier

This avoids an internal compiler error on VC 2003 and earlier

8 years agoPerlIO::encoding: explicitly cast char * to STDCHAR *
Lukas Mai [Sun, 31 Jan 2016 12:14:29 +0000 (13:14 +0100)]
PerlIO::encoding: explicitly cast char * to STDCHAR *

This should avoid the "pointer targets in assignment differ in
signedness" warning that pops up in some configurations.

8 years agoTweaks to podlators integration.
Craig A. Berry [Sat, 30 Jan 2016 23:25:05 +0000 (17:25 -0600)]
Tweaks to podlators integration.

It's only perlpodstyle that we can't build the man page for since
it lives in the top-level pod/ directory. Plus there was a new test
that I had missed in the integration.

8 years agoensure isASCII argument is an integer
Lukas Mai [Fri, 29 Jan 2016 23:46:59 +0000 (00:46 +0100)]
ensure isASCII argument is an integer

This catches bugs such as the one fixed in commit dcf88e34.

8 years agoperlop: fix broken example by deleting it [perl #119667]
Lukas Mai [Sat, 30 Jan 2016 23:40:36 +0000 (00:40 +0100)]
perlop: fix broken example by deleting it [perl #119667]

8 years agoutil.c: fix/simplify unused arg logic in my_vsnprintf
Lukas Mai [Sat, 30 Jan 2016 23:16:53 +0000 (00:16 +0100)]
util.c: fix/simplify unused arg logic in my_vsnprintf

8 years agomg.c: move declaration of i closer to its use
Lukas Mai [Sat, 30 Jan 2016 23:14:11 +0000 (00:14 +0100)]
mg.c: move declaration of i closer to its use

This should avoid the "unused variable 'i'" warning that pops up in some
configurations.

8 years agoVMS does have the siginfo_si_* fields.
Craig A. Berry [Sat, 30 Jan 2016 20:37:01 +0000 (14:37 -0600)]
VMS does have the siginfo_si_* fields.

At least they are in the siginfo struct, though oddly, SA_SIGINFO
doesn't exist so they won't do much good.  However, adding them
now means that if SA_SIGINFO shows up in the future they will be
tested immediately and not overlooked.

8 years agoUpdate utils commands in configure.com.
Craig A. Berry [Sat, 30 Jan 2016 20:34:25 +0000 (14:34 -0600)]
Update utils commands in configure.com.

We don't have psed any more but we do have json_pp and perlthanks.

8 years agoIntegrate podlators 4.05.
Craig A. Berry [Thu, 28 Jan 2016 19:44:07 +0000 (13:44 -0600)]
Integrate podlators 4.05.

8 years agoEscape t/test.pl got vs expected strings
Karl Williamson [Fri, 11 Sep 2015 18:37:27 +0000 (12:37 -0600)]
Escape t/test.pl got vs expected strings

This is so that controls, etc. are visible.

See http://nntp.perl.org/group/perl.perl5.porters/230927

8 years agoAdd STATICs to S_ functions.
Jarkko Hietaniemi [Fri, 29 Jan 2016 23:33:47 +0000 (18:33 -0500)]
Add STATICs to S_ functions.

8 years agoDo not export no text symbols starting with S_.
Jarkko Hietaniemi [Fri, 29 Jan 2016 23:24:51 +0000 (18:24 -0500)]
Do not export no text symbols starting with S_.

8 years agoperlhacktips: fix / properly break example of bad pointer access
Lukas Mai [Sat, 30 Jan 2016 00:02:03 +0000 (01:02 +0100)]
perlhacktips: fix / properly break example of bad pointer access

8 years agoFix umask for mkstemp(3) calls
Niko Tyni [Thu, 21 Jan 2016 16:17:32 +0000 (18:17 +0200)]
Fix umask for mkstemp(3) calls

With commit v5.21.0-67-g60f7fc1, perl started setting umask to 0600
before calling mkstemp(3), and then restoring it afterwards. This is
wrong as it tells open(2) to strip the owner read and write bits from
the given mode before applying it, rather than the intended negation of
leaving only those bits in place.

On modern systems which call open(2) with mode 0600 in mkstemp(3),
this clears all the created temporary file permissions. However,
any systems that use mode 0666 in mkstemp(3) (like ancient versions
of glibc) now create a file with permissions 0066, leaving world
read and write permission regardless of current umask.

Using umask 0177 instead fixes this.

Bug: https://rt.perl.org/Ticket/Display.html?id=127322

8 years agoregexec.c: Macro needs param to be dereferenced
Karl Williamson [Fri, 29 Jan 2016 18:53:10 +0000 (11:53 -0700)]
regexec.c: Macro needs param to be dereferenced

This is a potential bug, but didn't show up, as real addresses are
always going to be larger than 128, and hence the macro here would show
false, and the code only used true to short circuit some other code, so
it always would take the long way.

8 years agoutf8.c: Add cast to suppress a warning message
Karl Williamson [Fri, 29 Jan 2016 17:32:26 +0000 (10:32 -0700)]
utf8.c: Add cast to suppress a warning message

This is showing up in HP-UX, e.g.
http://perl5.test-smoke.org/report/43423

8 years agoSkip SA_SIGINFO uid/pid test on POSIX-deficient OS X versions
Dagfinn Ilmari Mannsåker [Fri, 29 Jan 2016 10:39:31 +0000 (10:39 +0000)]
Skip SA_SIGINFO uid/pid test on POSIX-deficient OS X versions

8 years agoperlretut: typo correction
Herbert Breunung [Thu, 28 Jan 2016 23:07:23 +0000 (18:07 -0500)]
perlretut: typo correction

8 years agofix op/infnan.t test fails with NAN conversion on VC 6
Daniel Dragan [Tue, 26 Jan 2016 07:27:49 +0000 (02:27 -0500)]
fix op/infnan.t test fails with NAN conversion on VC 6

fixes
ok 443 - NAN is NaN numerically (by not being NaN)
ok 444 - NAN value stringifies as NaN
ok 445 - nan is NaN numerically (by not being NaN)
not ok 446 - nan value stringifies as NaN
ok 447 - qnan is NaN numerically (by not being NaN)
not ok 448 - qnan value stringifies as NaN
ok 449 - SNAN is NaN numerically (by not being NaN)
not ok 450 - SNAN value stringifies as NaN
ok 451 - NanQ is NaN numerically (by not being NaN)
not ok 452 - NanQ value stringifies as NaN
ok 453 - NANS is NaN numerically (by not being NaN)
not ok 454 - NANS value stringifies as NaN
ok 455 - 1.\#QNAN is NaN numerically (by not being NaN)
not ok 456 - 1.\#QNAN value stringifies as NaN
ok 457 - +1\#SNAN is NaN numerically (by not being NaN)
not ok 458 - +1\#SNAN value stringifies as NaN
ok 459 - -1.\#NAN is NaN numerically (by not being NaN)
not ok 460 - -1.\#NAN value stringifies as NaN
ok 461 - 1\#IND is NaN numerically (by not being NaN)
not ok 462 - 1\#IND value stringifies as NaN
ok 463 - 1.\#IND00 is NaN numerically (by not being NaN)
not ok 464 - 1.\#IND00 value stringifies as NaN
ok 465 - NAN(123) is NaN numerically (by not being NaN)
not ok 466 - NAN(123) value stringifies as NaN
ok 467 - NaN is not lt zero
ok 468 - NaN is not == zero
ok 469 - NaN is not gt zero
ok 470 - NaN is not lt NaN
ok 471 - NaN is not gt NaN

Caused by commit 230ee21f3e from ~5.23.5. Add special casing for VC6.

The NV to IV casts on VC are a function call called __ftol, skip executing
the NV to IV casts if the logic test tests will follow "TARGn" branch
because the NV and IV values are !=.

8 years agoUpgrade Encode from version 2.79 to 2.80
Steve Hay [Wed, 27 Jan 2016 08:28:33 +0000 (08:28 +0000)]
Upgrade Encode from version 2.79 to 2.80

8 years agoext/POSIX/lib/POSIX.pod: Make verbatim line fit in 79 cols
Karl Williamson [Thu, 28 Jan 2016 02:49:44 +0000 (19:49 -0700)]
ext/POSIX/lib/POSIX.pod: Make verbatim line fit in 79 cols

8 years agoutf8.c: Add missing 'STATIC' to declaration
Karl Williamson [Thu, 28 Jan 2016 02:38:57 +0000 (19:38 -0700)]
utf8.c: Add missing 'STATIC' to declaration

8 years ago[perl #127183] Non-canonical hexadecimal floats are parsed prematurely
Jarkko Hietaniemi [Tue, 26 Jan 2016 03:17:09 +0000 (22:17 -0500)]
[perl #127183] Non-canonical hexadecimal floats are parsed prematurely

5.22.1 regression from 5.22.0.

Rewriting the hexfp fractional digits parsing to handle the
trickiness of having to ignore both the leading and trailing
zero bits when determining how many bits were actually given.

8 years agofix a race condition in parallel builds with Visual C
Daniel Dragan [Tue, 26 Jan 2016 10:24:07 +0000 (05:24 -0500)]
fix a race condition in parallel builds with Visual C

On older VCs a "gmake -j2 ..\generate_uudmap.exe ..\perlglob.exe" will
generate warnings, on newer VCs, a fatal error in 1 or the other cl.exe
process. This is because both cl.exes are trying to lock and write to
vc*0.pdb, the same file. Add PDBOUT option so uudmap and perlglob have
their own pdb files named after themselves and they cant conflict in a
parallel build.

8 years agofix link failure of APItest.dll on VC 6
Daniel Dragan [Tue, 26 Jan 2016 05:02:56 +0000 (00:02 -0500)]
fix link failure of APItest.dll on VC 6

alloca is the newer "standardized" name which modern VCs support.
In VC 6, only _alloca exists, which is the prestandardized name, use it to
fix a linker failure.

8 years agoRevert "[perl #126632] more diagnostics"
Tony Cook [Tue, 26 Jan 2016 21:54:15 +0000 (08:54 +1100)]
Revert "[perl #126632] more diagnostics"

This reverts commit ef18391745841fb1df298cec3a3001be4237fb3d.

This commit was intended only to diagnose Jenkins build issues, I now
have better access to Jenkins (and the new diagnostics didn't tell me
much anyway.)

8 years agoProbe for and expose more fields for SA_SIGINFO
Dagfinn Ilmari Mannsåker [Tue, 12 Jan 2016 14:47:07 +0000 (14:47 +0000)]
Probe for and expose more fields for SA_SIGINFO

These are all specified by POSIX/SUSv3, but not all platforms have them,
as mentioned in POSIX.pm.

We can only test the pid, uid and code fields, since they are the only
ones that are defined for a user-sent signal.

8 years agoAdd SA_SIGINFO 'code' constants to POSIX
Dagfinn Ilmari Mannsåker [Fri, 15 Jan 2016 14:45:01 +0000 (14:45 +0000)]
Add SA_SIGINFO 'code' constants to POSIX

Mention them in the sigaction documentation, and document the 'addr'
field.

8 years agoperlipc.pod: Fix typo
Steve Hay [Tue, 26 Jan 2016 08:43:06 +0000 (08:43 +0000)]
perlipc.pod: Fix typo

8 years agoUse vmstrnenv() to look up PERL5LIB/PERLLIB on VMS.
Craig A. Berry [Tue, 26 Jan 2016 02:45:39 +0000 (20:45 -0600)]
Use vmstrnenv() to look up PERL5LIB/PERLLIB on VMS.

We have, for a long time, only considered logical names when
looking for values of PERL5LIB. However, this makes us miss values
stored in the environ array (such as when happens when Perl is
invoked from bash) or as DCL symbols.

So make looking up PERL5LIB and PERLLIB use the lower level routine
that will look up values using the same search order as all other
environment handling in Perl, while still handling a list of paths
as a search list logical if that's where the value is stored.

N.B.  There is no change to the default path separator here, only
to lookup method.

8 years agoLimit index arg to logicals in vmstrnenv().
Craig A. Berry [Tue, 26 Jan 2016 02:19:55 +0000 (20:19 -0600)]
Limit index arg to logicals in vmstrnenv().

vmstrnenv looks in the environ array, the DCL symbol table, and/or
the logical names pointed to by LNM$FILE_DEV, depending on the
setting of PERL_ENV_TABLES.  Its index parameter, however, only
makes sense with logical names, and when returning one element of
a search list logical. So return 0 indicating a failed lookup when
passed a non-zero index and what we found is not a logical name.

Without this, the natural idiom of iterating over index values to
get the elements of a search list could get us stuck in an endless
loop if the item we are looking for does exist but is not a
logical name.

8 years ago[perl #126632] more diagnostics
Tony Cook [Mon, 25 Jan 2016 21:37:37 +0000 (08:37 +1100)]
[perl #126632] more diagnostics

Some of this will be removed once we work out what's going on.

8 years agoMove email alias from AUTHORS to checkAUTHORS.pl
Dagfinn Ilmari Mannsåker [Mon, 25 Jan 2016 16:29:25 +0000 (16:29 +0000)]
Move email alias from AUTHORS to checkAUTHORS.pl

Ed J is already in AUTHORS with a real email address, mark the
noreply.github.com one as an alias of that.

8 years ago[perl #121351] Remove non-doio.c uses of PL_statbuf
Dagfinn Ilmari Mannsåker [Sun, 17 Jan 2016 15:52:30 +0000 (15:52 +0000)]
[perl #121351] Remove non-doio.c uses of PL_statbuf

These are the last remaining uses outside the interwoven mess in
S_openn_cleanup, openn_setup, and their callers in doio.c.

8 years agoPorting/Miantainers.pl update following changes in 273df2b189...538ad527dc
Steve Hay [Mon, 25 Jan 2016 13:47:54 +0000 (13:47 +0000)]
Porting/Miantainers.pl update following changes in 273df2b189...538ad527dc

(ExtUtils::CBuilder was also modified, but we probably don't need to keep
tabs on the changes there since it's upstream => blead anyway:
t/porting/customized.dat only lists changed files under cpan/, and EU::CB
already had (unlisted) modified files.)

8 years agoUpgrade Encode from version 2.78 to 2.79
Steve Hay [Mon, 25 Jan 2016 08:49:24 +0000 (08:49 +0000)]
Upgrade Encode from version 2.78 to 2.79

This removes two of the blead "customizations", which were actually only
differences in the "$Id:" line, but the third (encoding.pm) has to stay
because the file hasn't otherwise changed so removing the "customization"
would be a change with no $VERSION bump, which causes
t/porting/cmp_version.t to fail. Sigh.

8 years ago[perl #126632] improve diagnostics for the comctl32 test
Tony Cook [Mon, 25 Jan 2016 10:18:16 +0000 (21:18 +1100)]
[perl #126632] improve diagnostics for the comctl32 test

8 years agoperldelta for 273df2b1892a ... 273df2b1892
Tony Cook [Mon, 25 Jan 2016 01:21:48 +0000 (12:21 +1100)]
perldelta for 273df2b1892a ... 273df2b1892

8 years agoAdd parallel build and MSVC support for the gmake makefile
Tony Cook [Mon, 25 Jan 2016 01:05:26 +0000 (12:05 +1100)]
Add parallel build and MSVC support for the gmake makefile

8 years agobump $XS::APItest::VERSION
Tony Cook [Mon, 25 Jan 2016 01:00:53 +0000 (12:00 +1100)]
bump $XS::APItest::VERSION

8 years agoXS DLLs shouldn't have comctl32.dll manifest in them, they dont link to it
Daniel Dragan [Wed, 20 Jan 2016 15:38:21 +0000 (10:38 -0500)]
XS DLLs shouldn't have comctl32.dll manifest in them, they dont link to it

The manifestdependency flag caused on VC 2005 and up for all XS DLLs to
include a manifest that references common controls v6 DLL, even though
nothing but perl5**.dll and perl-static.exe would ever link to
comctl32.dll. VC 2005 to VC 2008 put manifests in all DLLs since those
VC version's CRTs require manifests to load, all other VCs generate
.rsrc section free, and manifest free, DLLs by default. The
/manifestdependency flag passed to VC linker for all XS DLL, was causing
52 KB of bloat in disk size of the DLLs, and perhaps a little bit of CPU
to parse the manifest XML when the XS DLL is loaded.

Add a test to make sure the manifest for V6 isn't accidentally broken and
V5 gets loaded instead.

Note this commit leaves a little bit of unequal handling of the comctl
manifest between VC and GCC builds. VC >= 2005 builds with this patch will
add a manifest to perl523.dll and build helpers (not installed)
perlglob.exe and generate_uudmap.exe while GCC builds only manifest
perl.exe and wperl.exe.

With a VC 2013 32b build, before
C:\p523\src>dir /s *.dll
              55 File(s)      7,858,688 bytes

After
C:\p523\src>dir /s *.dll
              55 File(s)      7,805,440 bytes

8 years agowin32/GNUmakefile collapse shell echos into one liners
Daniel Dragan [Mon, 4 Jan 2016 19:20:14 +0000 (14:20 -0500)]
win32/GNUmakefile collapse shell echos into one liners

Previously each line was 1 shell process launch. By grouping all the echos
together, CPU and IO are saved by doing alot less cmd.exe process launches.
makefile.mk does the same thing already. See #126632 for benchmark details.

8 years agoadd MSVC support to win32/GNUmakefile
Daniel Dragan [Wed, 20 Jan 2016 17:03:32 +0000 (12:03 -0500)]
add MSVC support to win32/GNUmakefile

-copy things from makefile.mk to GNUmakefile
-rework CFG_VARS to escape "s. Previously on gmake GCC builds, all "s
 inside the CFG_VARS vars were dropped from Config_heavy.pl due to
 command line parsing (dmake uses --cfgsh-option-file and a temp file,
 nmake escapes). Due to gmake's very poor temp file handling, keep it as
 a cmd line and dont convert it to a temp file. What vars to escape was
 modeled on the nmake makefile.

8 years agoadd parallelness to win32/GNUmakefile
Daniel Dragan [Tue, 5 Jan 2016 11:05:32 +0000 (06:05 -0500)]
add parallelness to win32/GNUmakefile

-.UPDATEALL is dmake only, doesn't exist in gmake, create more targets
 instead
GNUmakefile:1319: warning: overriding recipe for target '.UPDATEALL'
GNUmakefile:1024: warning: ignoring old recipe for target '.UPDATEALL'
-fix ok/nok targets on dmake and gmake
-dont delete old mini config.h, the copy overwrites it, for dmake and gmake
 1 less process to run this way
-modify whitespace and comments between 2 makesfiles so there are less
 delta lines if the 2 are diffed, this aids in diagnostics
-remove perlmainst.c/perlmain.c build products, just use runperl.c directly
 1 less disk file to create and later clean and git status and 2 less nodes
 in the make graph to traverse, also better for C debugger, since
 "runperl.c" is around after a git clean of the source tree, and runperl.c
 is in every single callstack in perl.
-remove copying mini config.h to CORE dir, pointless since (mini) config.h
 isn't an input to config_h.PL, remove the exit 1 from commit 137443ea0a
 from 5.003, rewriting config.h is not a reason to stop the build with a
 fatal error, vivify CORE dir or else sub copy() fails
-deshell UNIDATAFILES/mktables, 1 less cmd.exe process and 1 less .bat file
 written to disk for gmake (dmake always uses cmd.exe ATM)
-combining mini config.h AKA $(MINIDIR)\.exists shell append lines is for
 another commit
-perlglob.exe is not installed, it doesn't need to be rebased, it is only
 needed for module building, removing the dep makes the dep graph simpler
-rename PERLIMPLIB so the lib is built in its final location in CORE dir
 this removes an extra xcopy process run. Since perl dll's .a/.lib
 is not longer in the root of the source tree, change the 2 tests and
 ExtUtils::CBuilder::Platform::Windows to look at the uninstalled final
 location dir, not the root dir
-fix typo 0.282224->0.280224 in dist/ExtUtils-CBuilder/Changes
-for GCC PERLEXPLIB must be used, passing "perldll.def" on cmd line to g++
 means all data globals with EXTCONST are exported (which have dllexport
 on their declaration) instead of just what is in perldll.def and
 globvar.sym, INTERN/EXTERN.h could be revised to fix that, but I am not
 doing that at this time. Also drop linking GCC perl523.dll from 3
 processes to just 1 process like with VC builds. Removing 2nd run of
 dlltool fixes a race condition where libperl523.a was generated twice.
 This caused a race condition failure where linking a XS DLL failed
 because the GCC linker of the XS DLL saw a partially written
 libperl523.a.
-Relocation was tested with $(LINK32) -v -mdll -o $@
 -Wl,--disable-auto-image-base -Wl,--image-base -Wl,0x400000
 $(BLINK_FLAGS) $(PERLDLL_OBJ) $(shell @type Extensions_static)
 $(LIBFILES) $(PERLEXPLIB)
 to g++ linker to force an address conflict and verified with VMMap
 (unrelocated perl523.dll has ~40KB private memory, relocated has ~240KB
 private memory on Win 7 32b), historically there are problems with
 dllexport and dlltool and relocation problems with mingw
-$(COREDIR)\ppport.h in gmake is separate lines since gmake normally
 launches processes directly, not through the shell, so it is more
 efficent to keep it as multiple lines for gmake, while dmake likes to
 burn CPU and IO between each line, and runs each line through cmd.exe
-disable parallel building in make_ext.pl by not passing MAKEFLAGS env
 var to any subprocess, EUMM is not ready for parallelness inside a module
 building on Win32
-have harness proc and child .t procs share same disk perl.exe and
 perl523.dll files, this way they share memory pages, makefile.mk does
 the same thing

8 years agobackport EUMM commits
Daniel Dragan [Wed, 23 Dec 2015 06:10:59 +0000 (01:10 -0500)]
backport EUMM commits

-commit "Cache is_make_type" and "Optimise is_make_type RE" stops 40
 executions of "gmake.exe -v" process for each Makefile.PL run, these 40
 make process launches make it it very difficult to debug make_ext.pl
 and the make tool with a system call logger, see Perl RT #123440 ticket
 for details

-commit "Win32 gmake needs SHELL to be specified" allows Win32 perl to be
 built with gmake, if msysgit is in the PATH env var, without this patch
 gmake will use bash as the shell instead of cmd.exe and no EUMM modules
 can be built during a Win32 perl build, since bash and cmd.exe command
 line strings are not compatible with each other, see Perl RT #123440
 ticket for details

8 years agot/echo.t needs SHELL env for Win32 gmake
bulk88 [Sun, 27 Dec 2015 20:31:13 +0000 (15:31 -0500)]
t/echo.t needs SHELL env for Win32 gmake

Win32 gmake prefers "sh.exe" (IE bash) over "cmd.exe" if it finds sh.exe
in PATH. Win32 Git usually comes with sh.exe. Running sh.exe causes
problems and isn't a supported build config for native (not Cygwin)
Win32 perl. See also
https://rt.perl.org/Public/Bug/Display.html?id=123440#txn-1374997

Fixes
---------------------------------
ok 8 - something.txt exists
not ok 9 - contents#   Failed test 'contents'
#   at t/echo.t line 69.
#          got: '$
# '
#     expected: '$something$
# '
# Testing variables escaped
# Temp dir: C:\Users\Owner\AppData\Local\Temp\gGwL2kl3Oh
ok 10 - make: variables escaped

8 years agoWin32 gmake needs SHELL to be specified
Sisyphus [Tue, 30 Dec 2014 01:56:58 +0000 (12:56 +1100)]
Win32 gmake needs SHELL to be specified

Signed-off-by: Ed J <mohawk2@users.noreply.github.com>
8 years agoOptimise is_make_type RE
Ed J [Mon, 19 Jan 2015 13:09:09 +0000 (13:09 +0000)]
Optimise is_make_type RE

8 years agoCache is_make_type
Ed J [Mon, 19 Jan 2015 00:17:31 +0000 (00:17 +0000)]
Cache is_make_type

8 years agoPutting the core into corelist
Chris 'BinGOs' Williams [Sun, 24 Jan 2016 00:27:45 +0000 (00:27 +0000)]
Putting the core into corelist

8 years agoTODO long-failing argv.t tests on VMS.
Craig A. Berry [Sat, 23 Jan 2016 19:15:42 +0000 (13:15 -0600)]
TODO long-failing argv.t tests on VMS.

This has to do with the fact that redirection is handled by Perl,
not by DCL.

8 years agoregen/mk_invlists.pl: add braces round subobject initialisers
Aaron Crane [Thu, 21 Jan 2016 14:41:56 +0000 (14:41 +0000)]
regen/mk_invlists.pl: add braces round subobject initialisers

This suppresses many clang warnings saying "suggest braces around
initialization of subobject" when the generated charclass_invlists.h
is included.

8 years agoperldelta for 08b3e84fbb1c
Tony Cook [Thu, 21 Jan 2016 01:06:04 +0000 (12:06 +1100)]
perldelta for 08b3e84fbb1c

8 years ago[perl #127122] warn on unless (assignment) when syntax warnings are on
Tony Cook [Sun, 3 Jan 2016 23:17:22 +0000 (10:17 +1100)]
[perl #127122] warn on unless (assignment) when syntax warnings are on

Previously the assignment was hidden by the not op wrapped around the
condition, but newCONDOP() is sufficiently flexible that it isn't
needed.

8 years agoperldelta for e9e9e546c676
Tony Cook [Thu, 21 Jan 2016 00:49:17 +0000 (11:49 +1100)]
perldelta for e9e9e546c676

8 years ago[perl #126991] treat cop_line as unsigned in caller() (since it is)
Tony Cook [Mon, 4 Jan 2016 03:05:32 +0000 (14:05 +1100)]
[perl #126991] treat cop_line as unsigned in caller() (since it is)

8 years agoadd 5.23.8 placeholders to Module::CoreList
Tony Cook [Wed, 20 Jan 2016 23:48:43 +0000 (10:48 +1100)]
add 5.23.8 placeholders to Module::CoreList

8 years agomore version bumping
Stevan Little [Wed, 20 Jan 2016 22:26:35 +0000 (23:26 +0100)]
more version bumping

8 years agomanual tweak
Stevan Little [Wed, 20 Jan 2016 22:26:24 +0000 (23:26 +0100)]
manual tweak

8 years agobumping version
Stevan Little [Wed, 20 Jan 2016 22:22:12 +0000 (23:22 +0100)]
bumping version

8 years agoFix Module-CoreList version in Changes file
Chris 'BinGOs' Williams [Wed, 20 Jan 2016 22:32:01 +0000 (22:32 +0000)]
Fix Module-CoreList version in Changes file

8 years agonew perldelta
Stevan Little [Wed, 20 Jan 2016 22:18:56 +0000 (23:18 +0100)]
new perldelta

8 years agoupdating the epigraph and release schedule
Stevan Little [Wed, 20 Jan 2016 22:06:58 +0000 (23:06 +0100)]
updating the epigraph and release schedule

8 years agoadd in the Known Issue, thanks again to BinGOs++ origin/release-5.23.7 v5.23.7
Stevan Little [Wed, 20 Jan 2016 19:58:53 +0000 (20:58 +0100)]
add in the Known Issue, thanks again to BinGOs++

8 years agoAdding the new version to Perl history
Stevan Little [Wed, 20 Jan 2016 19:51:59 +0000 (20:51 +0100)]
Adding the new version to Perl history

8 years agomauke++ && BinGOs++
Stevan Little [Wed, 20 Jan 2016 19:51:33 +0000 (20:51 +0100)]
mauke++ && BinGOs++

8 years agoremove the last of the boiler plate
Stevan Little [Wed, 20 Jan 2016 18:27:12 +0000 (19:27 +0100)]
remove the last of the boiler plate

8 years agoupdate module core list in perldelta
Stevan Little [Wed, 20 Jan 2016 18:23:08 +0000 (19:23 +0100)]
update module core list in perldelta

8 years agosorry, this is not correct, it was a small change to the test, I misread the commit...
Stevan Little [Wed, 20 Jan 2016 18:20:59 +0000 (19:20 +0100)]
sorry, this is not correct, it was a small change to the test, I misread the commit at first

8 years agoUpdate %Module::CoreList::released with new date
Stevan Little [Wed, 20 Jan 2016 15:38:10 +0000 (16:38 +0100)]
Update %Module::CoreList::released with new date

8 years agoupdated Module::CoreList (version has already been bumped in Changes and on modules...
Stevan Little [Wed, 20 Jan 2016 15:36:14 +0000 (16:36 +0100)]
updated Module::CoreList (version has already been bumped in Changes and on modules, this just adds the data)

8 years agofirst run through for the perldelta, more to come
Stevan Little [Wed, 20 Jan 2016 15:13:15 +0000 (16:13 +0100)]
first run through for the perldelta, more to come

8 years agoupdating copyright to 2016
Stevan Little [Tue, 19 Jan 2016 22:09:08 +0000 (23:09 +0100)]
updating copyright to 2016

8 years agoapparently that was now to best to deprecate an email address, this one is better
Stevan Little [Tue, 19 Jan 2016 22:59:03 +0000 (23:59 +0100)]
apparently that was now to best to deprecate an email address, this one is better

8 years agoupdating my own email, that address is no longer valid
Stevan Little [Tue, 19 Jan 2016 20:09:12 +0000 (21:09 +0100)]
updating my own email, that address is no longer valid

8 years agoUse lookup table for /\b{gcb}/ instead of switch stmt
Karl Williamson [Tue, 19 Jan 2016 06:14:10 +0000 (23:14 -0700)]
Use lookup table for /\b{gcb}/ instead of switch stmt

This changes the handling of Grapheme Cluster Breaks to be entirely via
a lookup table generated by regen/mk_invlists.pl.

This is easier to maintain and follow, as the generation of the table
follows the text of Unicode's UAX29 precisely, and loops can be used to
set every class up instead of having to name each explicitly, so it will
be easier to add new rules.  And the runtime switch statement is
replaced by a single line.

My gcc compiler optimized the previous version to an array lookup, but
this commit does it for not so clever compilers.

8 years agot/re/uniprops.t: Fix bug in diagnostic output
Karl Williamson [Tue, 19 Jan 2016 06:01:07 +0000 (23:01 -0700)]
t/re/uniprops.t: Fix bug in diagnostic output

An 'ord' was missing, so a warnings was raised.  This file is generated
by mktables

8 years agoAdd qr/\b{lb}/
Karl Williamson [Mon, 18 Jan 2016 21:25:02 +0000 (14:25 -0700)]
Add qr/\b{lb}/

This adds the final Unicode boundary type previously missing from core
Perl: the LineBreak one.  This feature is already available in the
Unicode::LineBreak module, but I've been told that there are portability
and some other issues with that module.  What's added here is a
light-weight version that is lacking the customizable features of the
module.

This implements the default Line Breaking algorithm, but with the
customizations that Unicode is expecting everybody to add, as their
test file tests for them.  In other words, this passes Unicode's fairly
extensive furnished tests, but wouldn't if it didn't include certain
customizations specified by Unicode beyond the basic algorithm.

The implementation uses a look-up table of the characters surrounding a
boundary to see if it is a suitable place to break a line.  In a few
cases, context needs to be taken into account, so there is code in
addition to the lookup table to handle those.

This should meet the needs for line breaking of many applications,
without having to load the module.

The algorithm is somewhat independent of the Unicode version, just like
the other boundary types.  Only if new rules are added, or existing ones
modified is there need to go in and change this code.  Otherwise,
running regen/mk_invlists.pl should be sufficient when a new Unicode
release is done to keep it up-to-date, again like the other Unicode
boundary types.

8 years agoMake tables for Perl-tailored Unicode Line_Break property
Karl Williamson [Sat, 16 Jan 2016 05:46:58 +0000 (22:46 -0700)]
Make tables for Perl-tailored Unicode Line_Break property

This is in preparation for adding qr/\b{lb}/.  This just generates the
tables, and is a separate commit because otherwise the diff listing is
confusing, as it doesn't realize there are only additions.  So, even
though the difference listing for this commit for the generated header
file is wildly crazy, the only changes in reality are the addition of
some tables for Line Break.

8 years agoregen/mk_invlists.pl: Use property's real values
Karl Williamson [Thu, 14 Jan 2016 23:33:59 +0000 (16:33 -0700)]
regen/mk_invlists.pl: Use property's real values

A future commit will tailor a property to use fewer values than Unicode
provides.  Currently we look at the official property, and croak if not
all the property values are there.  This commit instead looks at the
tailored property, the one that actually is being output.

8 years agomktables: Add field to constructor
Karl Williamson [Thu, 14 Jan 2016 22:08:58 +0000 (15:08 -0700)]
mktables: Add field to constructor

This allows a default value to be specified, to prepare for a later
commit.

8 years agoregen/mk_invlists.pl: Internal housekeeping
Karl Williamson [Sat, 16 Jan 2016 05:27:48 +0000 (22:27 -0700)]
regen/mk_invlists.pl: Internal housekeeping

This moves the name of a synthetic enum value to a better place in the
code.  The list it had been in is for a specific purpose that is not
applicable to synthetic values, though it worked.

But the new place is more logical, and can take advantage of the
previous commit which makes things in this place more predictable.