This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
9 years agoHave a Perl_isfinitel() separate from USE_LONG_DOUBLE.
Jarkko Hietaniemi [Thu, 11 Sep 2014 22:37:55 +0000 (18:37 -0400)]
Have a Perl_isfinitel() separate from USE_LONG_DOUBLE.

(Also correct uses of HAS_C99.)

9 years agoperl #122747: localize PL_curpm to null in _core_swash_init
Yves Orton [Thu, 11 Sep 2014 19:55:08 +0000 (21:55 +0200)]
perl #122747: localize PL_curpm to null in _core_swash_init

Set PL_curpm to null before we do any swash intialization
in _core_swash_init(). This "hides" the current regop from the
swash code, with the intent of prevent weird reentrancy bugs
when the swashes are initialized.

Long term you could argue that we should just not use the regex
engine to initialize a swash, and then this would be unnecessary.

Thanks to FC for the suggestion!

9 years agoWrap long pod lines in B::Op_private for real
Father Chrysostomos [Thu, 11 Sep 2014 06:51:24 +0000 (23:51 -0700)]
Wrap long pod lines in B::Op_private for real

I forgot to re-run podcheck.t with PERL_POD_PEDANTIC set last time.

9 years agoperldiag: Rewrap for better splain output
Father Chrysostomos [Thu, 11 Sep 2014 06:18:30 +0000 (23:18 -0700)]
perldiag: Rewrap for better splain output

Also correct C<(...)> when it should be (C<...>).

9 years agoUpdate rv2cv flags comment following 211a4342c9
Father Chrysostomos [Wed, 10 Sep 2014 23:46:56 +0000 (16:46 -0700)]
Update rv2cv flags comment following 211a4342c9

9 years agoAlso protect against elen < 0.
Jarkko Hietaniemi [Wed, 10 Sep 2014 23:42:38 +0000 (19:42 -0400)]
Also protect against elen < 0.

9 years agoNote where B::Op_private’s pod is to be edited
Father Chrysostomos [Wed, 10 Sep 2014 23:11:52 +0000 (16:11 -0700)]
Note where B::Op_private’s pod is to be edited

9 years agoWrap long lines in B::Op_private pod
Father Chrysostomos [Wed, 10 Sep 2014 23:06:47 +0000 (16:06 -0700)]
Wrap long lines in B::Op_private pod

9 years agoIncrease $IO::VERSION to 1.34
Father Chrysostomos [Wed, 10 Sep 2014 21:06:01 +0000 (14:06 -0700)]
Increase $IO::VERSION to 1.34

9 years agoIO.xs: OP_SIBLING is too new
Father Chrysostomos [Wed, 10 Sep 2014 21:05:16 +0000 (14:05 -0700)]
IO.xs: OP_SIBLING is too new

and IO is living a double life, so we must #define it for older
perls.

9 years agoundef doesn't accept args for macros.
Jarkko Hietaniemi [Wed, 10 Sep 2014 18:50:32 +0000 (14:50 -0400)]
undef doesn't accept args for macros.

9 years agodarwin data sections can have wild prefixes and suffixes.
Jarkko Hietaniemi [Wed, 10 Sep 2014 18:02:44 +0000 (14:02 -0400)]
darwin data sections can have wild prefixes and suffixes.

9 years agoRemove obsolete comment.
Jarkko Hietaniemi [Wed, 10 Sep 2014 15:40:05 +0000 (11:40 -0400)]
Remove obsolete comment.

9 years agoUse the Perl_ math in time64.c, too.
Jarkko Hietaniemi [Wed, 10 Sep 2014 15:25:58 +0000 (11:25 -0400)]
Use the Perl_ math in time64.c, too.

9 years agoNo need to print an int as a %0.f
Jarkko Hietaniemi [Wed, 10 Sep 2014 15:18:04 +0000 (11:18 -0400)]
No need to print an int as a %0.f

The note about %lld being broken is probably quite obsolete.

9 years agohexfp: Fix zero in IEEE 754 quadruples, cleanups, safety.
Jarkko Hietaniemi [Wed, 10 Sep 2014 13:42:00 +0000 (09:42 -0400)]
hexfp: Fix zero in IEEE 754 quadruples, cleanups, safety.

Cleanups: define auxiliary symbols depending on what kind of
long doubles we have, making the code itself somewhat less noisy.

Safety: for double-double the overflow checks were wrong since
the maximum number of bits (and therefore result) is much larger.

9 years ago[MERGE] add regen/op_private and B::Op_private
David Mitchell [Wed, 10 Sep 2014 13:32:25 +0000 (14:32 +0100)]
[MERGE] add regen/op_private and B::Op_private

The series of commits in this branch automate the generation of the
defines, labels etc of op_private flags.

9 years agoadd missing op_private labels to Concise etc
David Mitchell [Fri, 5 Sep 2014 16:40:07 +0000 (17:40 +0100)]
add missing op_private labels to Concise etc

Concise wasn't decoding a few op_private bits. I spotted this during my
jumbo regen/op_private commit, but deferred fixing them up to a separate
commit since they change the output expected in a bunch of Concise tests.

Specifically, these have now been added:

    OPpHINT_STRICT_REFS  => STRICT
    OPpITER_DEF          => DEF
    OPpEVAL_RE_REPARSING => REPARSE

9 years agoAssert valid op_private bits in op_free()
David Mitchell [Fri, 5 Sep 2014 16:12:27 +0000 (17:12 +0100)]
Assert valid op_private bits in op_free()

On debugging builds, when freeing an op, check that that there are
no bits set in op_private that we're not aware of (as defined by
PL_op_private_valid[[]).

If breakage is bisected to this commit, it either means that something
should be added to regen/op_private (if the op having that bit set is in
fact legitimate), or fixing the op generation code if not.

9 years agomask VMS hints bits in COPs
David Mitchell [Fri, 5 Sep 2014 16:06:47 +0000 (17:06 +0100)]
mask VMS hints bits in COPs

A couple of VMS-specific hints bits are stored in op_private on COPs.
Currently these are added using NATIVE_HINTS, which is defined as
PL_hints >> 24.
Since other hints have started using the top byte of PL_hints, this
has the possibility of inadvertently setting other bits in cop->op_private.
So mask out the bits we don't want. We need this before the next commit,
which will assert valid bits on debugging builds.

(This is VMS-specific, and has been applied blind)

9 years agoAutomate processing of op_private flags
David Mitchell [Tue, 2 Sep 2014 16:11:42 +0000 (17:11 +0100)]
Automate processing of op_private flags

Add a new config file, regen/op_private, which contains all the
information about the flags and descriptions for the OP op_private field.

Previously, the flags themselves were defined in op.h, accompanied by
textual descriptions (sometimes inaccurate or incomplete).

For display purposes, there were short labels for each flag found in
Concise.pm, and another set of labels for Perl_do_op_dump() in dump.c.
These two sets of labels differed from each other in spelling (e.g.
REFC verses REFCOUNT), and differed in completeness and accuracy.

With this commit, all the data to generate the defines and the labels is
derived from a single source, and are generated automatically by 'make
regen'. It also contains complete data on which bits are used for what by
each op. So any attempt to add a new flag for a particular op where that
bit is already in use, will raise an error in make regen.  This compares
to the previous practice of reading the descriptions in op.h and hoping
for the best.

It also makes use of data in regen/opcodes: for example, regen/op_private
specifies that all ops flagged as 'T' get the OPpTARGET_MY flag.

Since the set of labels used by Concise and Perl_do_op_dump() differed,
I've standardised on the Concise version. Thus this commit changes the
output produced by Concise only marginally, while Perl_do_op_dump() is
considerably different. As well as the change in labels (and missing
labels), Perl_do_op_dump() formerly had a bug whereby any unrecognised
bits would not be shown if there was at least one recognised bit.
So while Concise displayed (and still does) "LVINTRO,2", Perl_do_op_dump()
has changed:

    - PRIVATE = (INTRO)
    + PRIVATE = (LVINTRO,0x2)

Concise has mainly changed in that a few op/bit combinations weren't being
shown symbolically, and now are. I've avoiding fixing the ones that would
break tests; they'll be fixed up in the next few commits.

A few new OPp* flags have been added:

    OPpARG1_MASK
    OPpARG2_MASK
    OPpARG3_MASK
    OPpARG4_MASK
    OPpHINT_M_VMSISH_STATUS
    OPpHINT_M_VMSISH_TIME
    OPpHINT_STRICT_REFS

The last three are analogues for existing HINT_* flags. The former four
reflect that many ops some of the lower few bits of op_private to indicate
how many args the op expects. While (for now) this is still displayed as,
e.g. "LVINTRO,2", the definitions in regen/op_private now fully account
for which ops use which bits for the arg count.

There is a new module, B::Op_private, which allows this new data to be
accessed from Perl. For example,

    use B::Op_private;
    my $name  = $B::Op_private::bits{aelem}{7}; # OPpLVAL_INTRO
    my $value = $B::Op_private::defines{$name}; # 128
    my $label = $B::Op_private::labels{$name};  # LVINTRO

There are several new constant PL_* tables. PL_op_private_valid[]
specifies for each op number, which bits are valid for that op. In a
couple of commits' time, op_free() will use this on debugging builds to
assert that no ops gained any private flags which we don't know about.
In fact it was by using such a temporary assert repeatedly against the
test suite, that I tracked down most of the inconsistencies and errors in
the current flag data.

The other PL_op_private_* tables contain a compact representation of all
the ops/bits/labels in a format suitable for Perl_do_op_dump() to decode
Op_private. Overall, the perl binary is about 500 bytes smaller on my
system.

9 years agobetter document OA_ flags
David Mitchell [Thu, 21 Aug 2014 19:16:48 +0000 (20:16 +0100)]
better document OA_ flags

Its a bit confusing which bits in PL_opargs are used for what,
and which flags in regen/opcodes map to which OA_* value

9 years agofix 'make' header dependency generation
David Mitchell [Wed, 10 Sep 2014 13:10:06 +0000 (14:10 +0100)]
fix 'make' header dependency generation

'make depend' was being run before build-time generated headers
were created (with generate_uudmap). This meant that the 'cc -E' which the
dependency analysis ran would fail for some source files, since it
couldn't find some of the headers. It would thus fail to find any further
dependencies for that file after that point.

In particular, globals.o wasn't being marked as dependent on opcode.h,
even though opcode.h contains the definitions of some global vars.

The fix is simple. Make the 'depend' target depend on $(generated_headers).

9 years agoregen after backport truncl probe
H.Merijn Brand [Wed, 10 Sep 2014 06:36:13 +0000 (08:36 +0200)]
regen after backport truncl probe

+ fix copy/paste miss in Glossary

9 years agoop.c: ck_rvconst: Remove ‘double’ gv lookup
Father Chrysostomos [Wed, 10 Sep 2014 05:51:38 +0000 (22:51 -0700)]
op.c: ck_rvconst: Remove ‘double’ gv lookup

I put double in quotes because this gv lookup only happens once.

I tried commenting out the loop and leaving just the body.  All tests
passed.  Then I tried leaving the loop, but asserting that it only
iterates once.  All tests passed.

The arguments to gv_fetchsv are such that it will always add a glob
and return it, so the !gv condition always evaluates to false.  (The
glob is not added when noexpand is true, but the loop condition con-
tains !noexpand to prevent a second iteration in that case.)

9 years agoIncrease $overload::VERSION to 1.23
Father Chrysostomos [Wed, 10 Sep 2014 02:25:47 +0000 (19:25 -0700)]
Increase $overload::VERSION to 1.23

9 years agoRemove redundant check from overload.pm
Father Chrysostomos [Wed, 10 Sep 2014 02:22:30 +0000 (19:22 -0700)]
Remove redundant check from overload.pm

I added this in ca6102577e.  It is silly to check ref $sub a few
lines after $sub = \&....

9 years agoComment tweaks.
Jarkko Hietaniemi [Wed, 10 Sep 2014 01:08:44 +0000 (21:08 -0400)]
Comment tweaks.

9 years agoWhitespace only.
Jarkko Hietaniemi [Wed, 10 Sep 2014 01:02:30 +0000 (21:02 -0400)]
Whitespace only.

I cannot stand looking at the inconsistent spaces any more.

9 years agoFloating point should always output more than nothing.
Jarkko Hietaniemi [Wed, 10 Sep 2014 00:26:44 +0000 (20:26 -0400)]
Floating point should always output more than nothing.

9 years agoIf USE_LONG_DOUBLE, NVff is PERL_PRIldbl.
Jarkko Hietaniemi [Wed, 10 Sep 2014 00:25:16 +0000 (20:25 -0400)]
If USE_LONG_DOUBLE, NVff is PERL_PRIldbl.

9 years agohexfp: 0 is 0x0p+0.
Jarkko Hietaniemi [Wed, 10 Sep 2014 00:22:00 +0000 (20:22 -0400)]
hexfp: 0 is 0x0p+0.

9 years agoSeparate S_my_atof_infnan().
Jarkko Hietaniemi [Wed, 10 Sep 2014 00:20:33 +0000 (20:20 -0400)]
Separate S_my_atof_infnan().

9 years agoPOSIX math: log1p is more subtle.
Jarkko Hietaniemi [Wed, 10 Sep 2014 00:15:09 +0000 (20:15 -0400)]
POSIX math: log1p is more subtle.

-Inf on -1, NaN on < -1.

9 years agoRename the 'nv' as 'fv' since it's not NV.
Jarkko Hietaniemi [Tue, 9 Sep 2014 23:32:19 +0000 (19:32 -0400)]
Rename the 'nv' as 'fv' since it's not NV.

To avoid constant confusion.  It actually most of the time explicitly
a "long double".

9 years agoPOSIX math: log1p (emulation) needs arg > -1.0.
Jarkko Hietaniemi [Tue, 9 Sep 2014 20:44:44 +0000 (16:44 -0400)]
POSIX math: log1p (emulation) needs arg > -1.0.

9 years agoComment tweaks.
Jarkko Hietaniemi [Tue, 9 Sep 2014 20:42:23 +0000 (16:42 -0400)]
Comment tweaks.

9 years agoSort the Perl_ math wrappers for easier eyeballing.
Jarkko Hietaniemi [Tue, 9 Sep 2014 20:30:24 +0000 (16:30 -0400)]
Sort the Perl_ math wrappers for easier eyeballing.

9 years agoPOSIX math: log1p emulation was wrong.
Jarkko Hietaniemi [Tue, 9 Sep 2014 17:02:19 +0000 (13:02 -0400)]
POSIX math: log1p emulation was wrong.

While at it, add quartic term to both expm1 and log1p.

9 years agoSkip warnable const folding outside warnings scope
Father Chrysostomos [Tue, 9 Sep 2014 13:13:43 +0000 (06:13 -0700)]
Skip warnable const folding outside warnings scope

Constant folding is not supposed to warn.  If it would produce a warn-
ing, then it is skipped and the warning is deferred to run time.

This means the -w flag can affect constant folding:

$ ./perl -Ilib -MO=Concise -le 'use constant u=>undef; $a = u+1'
6  <@> leave[1 ref] vKP/REFC ->(end)
1     <0> enter ->2
2     <;> nextstate(main 132 -e:1) v:{ ->3
5     <2> sassign vKS/2 ->6
3        <$> const[NV 1] s/FOLD ->4
-        <1> ex-rv2sv sKRM*/1 ->5
4           <#> gvsv[*a] s ->5
-e syntax OK
$ ./perl -Ilib -MO=Concise -lwe 'use constant u=>undef; $a = u+1'
8  <@> leave[1 ref] vKP/REFC ->(end)
1     <0> enter ->2
2     <;> nextstate(main 132 -e:1) v:{ ->3
7     <2> sassign vKS/2 ->8
5        <2> add[t2] sK/2 ->6
3           <$> const[NULL ] s*/FOLD ->4
4           <$> const[PVNV 1] s ->5
-        <1> ex-rv2sv sKRM*/1 ->7
6           <#> gvsv[*a] s ->7
-e syntax OK

But the problem here is that the flag could be turned on at run time,
so if the folding happens because -w is off, then the behaviour
changes due to folding.  It’s fine to do the folding here only when
warnings are lexically disabled, as that overrides any setting of -w.

9 years agoRename S_infnan_copy as S_infnan_2pv.
Jarkko Hietaniemi [Tue, 9 Sep 2014 13:51:44 +0000 (09:51 -0400)]
Rename S_infnan_copy as S_infnan_2pv.

9 years agoAdd gtags and ctags files into .gitignore
Jarkko Hietaniemi [Tue, 9 Sep 2014 12:32:26 +0000 (08:32 -0400)]
Add gtags and ctags files into .gitignore

9 years ago[perl #122728] Make sub(){undef} inlinable
Father Chrysostomos [Tue, 9 Sep 2014 05:54:10 +0000 (22:54 -0700)]
[perl #122728] Make sub(){undef} inlinable

9 years agoStop barewords from trumping subs with (*) proto
Father Chrysostomos [Tue, 9 Sep 2014 05:37:46 +0000 (22:37 -0700)]
Stop barewords from trumping subs with (*) proto

The splat prototype was allowing barewords to take precedence over
sub calls, if those sub calls did not parenthesize the argument list.

But it was rather buggy and inconsistent:

$ perl -le 'sub splat(*){print @_} sub foo; splat main::foo'
foo

What happened to main::?

$ perl -le 'package Foo; sub splat(*){print @_} sub foo; splat foo'
Foo::foo

Where did the prefix come from?

And constant subroutines were exempt from this, but whether a subrou-
tine is constant may change between versions:

$ perl5.14.4 -le 'sub splat(*){print @_} sub foo(){"x"x3}; splat foo'
foo
$ perl5.18.1 -le 'sub splat(*){print @_} sub foo(){"x"x3}; splat foo'
xxx

because infix x is now subject to constant folding.

Also:

$ perl5.18.1 -le 'sub splat(*){print @_} BEGIN {$::{foo}=*bar}sub bar; splat foo'
bar

I know this is a naughty example, because it’s fiddling with the sym-
bol table, but if the splat gets confused by that, then something is
quite wrong with its implementation.

Furthermore, one of the stated purposes of prototypes is to enable
custom subroutines to mimic the syntax of built-in functions.  But
*all* the built-in functions that take filehandles allow subroutines
to take precedence over barewords.

This commit allows all subroutines as arguments to the * prototype
to take precedence over barewords, just as constant subroutines
have till now.

This also fixes #35129, because the mechanism that was accidentally
swallowing arguments is now gone.

9 years agoGet mkdir.t working under miniperl *again*
Father Chrysostomos [Tue, 9 Sep 2014 03:15:58 +0000 (20:15 -0700)]
Get mkdir.t working under miniperl *again*

In commit ca7cc9e26e, I got mkdir.t to pass under miniperl when
Errno.pm has not been generated yet.

The way I did it, though, causes the test to fail under miniperl if
Errno.pm *has* been generated.  The ‘require’ call that tests to
see whether Errno can load ends up resetting $! before we test the
value in %!.

Also, we don’t need require inside a string eval.

9 years agohexfp: double-double correct test goldens.
Jarkko Hietaniemi [Tue, 9 Sep 2014 03:00:12 +0000 (23:00 -0400)]
hexfp: double-double correct test goldens.

9 years agohexfp: Implement double-double hexdigit extraction.
Jarkko Hietaniemi [Tue, 9 Sep 2014 02:48:35 +0000 (22:48 -0400)]
hexfp: Implement double-double hexdigit extraction.

(as instructed by sisyphus@)

9 years agorelease schedule: add managers for 5.21.6, 5.21.8
Ricardo Signes [Tue, 9 Sep 2014 02:23:33 +0000 (22:23 -0400)]
release schedule: add managers for 5.21.6, 5.21.8

9 years agoDocument the IBM admission of weirdness of AIX long doubles.
Jarkko Hietaniemi [Mon, 8 Sep 2014 21:14:01 +0000 (17:14 -0400)]
Document the IBM admission of weirdness of AIX long doubles.

Also skip the infnan test in AIX + long doubles because given
the IBM documentation it ain't gonna happen.

9 years agoNot nice to die in the middle of a test.
Jarkko Hietaniemi [Mon, 8 Sep 2014 20:35:47 +0000 (16:35 -0400)]
Not nice to die in the middle of a test.

9 years agoThe recent pad changes needed dVAR love.
Jarkko Hietaniemi [Mon, 8 Sep 2014 20:14:17 +0000 (16:14 -0400)]
The recent pad changes needed dVAR love.

(for -DPERL_GLOBAL_STRUCT and  -DPERL_GLOBAL_STRUCT_PRIVATE)

9 years agoPOSIX math: AIX fixes.
Jarkko Hietaniemi [Mon, 8 Sep 2014 20:02:53 +0000 (16:02 -0400)]
POSIX math: AIX fixes.

AIX doesn't seemingly really have the long double math interfaces.

9 years agoPOSIX math: stupidness in 9e010b89
Jarkko Hietaniemi [Mon, 8 Sep 2014 17:39:50 +0000 (13:39 -0400)]
POSIX math: stupidness in 9e010b89

9 years agoPOSIX math: implement lround().
Jarkko Hietaniemi [Mon, 8 Sep 2014 14:56:52 +0000 (10:56 -0400)]
POSIX math: implement lround().

Somehow had missed this so far, but probably because in Perl terms
it is very similar to round(), and very similar to rint().

The API variations are fascinating: round(), roundl(), lround(), lroundl(),
llround(), llroundl().

9 years agoPOSIX math: NV_NAN can be the right answer for nan().
Jarkko Hietaniemi [Mon, 8 Sep 2014 14:38:20 +0000 (10:38 -0400)]
POSIX math: NV_NAN can be the right answer for nan().

9 years agoPOSIX math: HP-UX support varies depending on HP cc.
Jarkko Hietaniemi [Mon, 8 Sep 2014 14:37:39 +0000 (10:37 -0400)]
POSIX math: HP-UX support varies depending on HP cc.

9 years agoop.c: Calculate hash for CvNAME_HEK
Father Chrysostomos [Sat, 30 Aug 2014 17:26:58 +0000 (10:26 -0700)]
op.c: Calculate hash for CvNAME_HEK

I assumed when I wrote that code that share_hek would calculate the
hash, like most hash functions; but this internal function assumes
the caller does it.

Hence, CVs were not sharing their heks with other types of thingies
that have heks.  A CV named foo and a GV named foo would cause two
heks of the same name to be present in the shared string table.

9 years ago5df8ece2 didn't really allow one to keep long doubles.
Jarkko Hietaniemi [Sun, 7 Sep 2014 02:13:03 +0000 (22:13 -0400)]
5df8ece2 didn't really allow one to keep long doubles.

(It undefed the symbol, but stripped the flags and libs.)

9 years agomodfl emulation via truncl (C99) and copysignl.
Jarkko Hietaniemi [Sun, 7 Sep 2014 02:01:01 +0000 (22:01 -0400)]
modfl emulation via truncl (C99) and copysignl.

(We've had emulation for broken modfl before,
 but it used aintl, which is not that common.)

9 years agoConfigure: scan for truncl.
Jarkko Hietaniemi [Sun, 7 Sep 2014 01:55:03 +0000 (21:55 -0400)]
Configure: scan for truncl.

(C99 version of aintl)

9 years agoPrecompute hash for require() arg
Father Chrysostomos [Mon, 8 Sep 2014 01:08:35 +0000 (18:08 -0700)]
Precompute hash for require() arg

Arguments to require() get lookup up in %INC, so if we precompute the
hash at compile time (where possible) then require() should be faster
at run time.

My unsophisticated tests show a 2-3% increase in speed, but that may
just be noise.

9 years agoFix documented return type for PAD_SV
Peter Martini [Mon, 8 Sep 2014 00:34:29 +0000 (20:34 -0400)]
Fix documented return type for PAD_SV

It should be SV *, just like PAD_SVl, since (except under DEBUGGING)
it is actually the same macro.

9 years agoAdd perldelta entry for Getopt::Std.
James E Keenan [Sun, 7 Sep 2014 23:37:21 +0000 (19:37 -0400)]
Add perldelta entry for Getopt::Std.

List updated modules in more ASCII-betical order.

9 years agoCorrect typo reported by Hauke D. (RT #41359)
James E Keenan [Sun, 7 Sep 2014 23:26:53 +0000 (19:26 -0400)]
Correct typo reported by Hauke D. (RT #41359)

Increment $VERSION for Getopt::Std.

9 years agoperldelta for 7950e9cf39
Father Chrysostomos [Sun, 7 Sep 2014 19:35:40 +0000 (12:35 -0700)]
perldelta for 7950e9cf39

9 years agoperldelta: Move compile-time const deref checking
Father Chrysostomos [Sun, 7 Sep 2014 19:15:32 +0000 (12:15 -0700)]
perldelta: Move compile-time const deref checking

This is a change in behaviour, so it should be more prominent than the
bug fixes, but it is not a backward-incompatible change (some code no
longer dies that used to), nor it is really a new feature.  Putting it
in Diagnostics is the best I can come up with.

9 years agoperldelta: Move a bug fix
Father Chrysostomos [Sun, 7 Sep 2014 19:10:49 +0000 (12:10 -0700)]
perldelta: Move a bug fix

to the bug fix section.  Oops.

9 years agoperldelta for 7950e9cf3
Father Chrysostomos [Sun, 7 Sep 2014 19:08:09 +0000 (12:08 -0700)]
perldelta for 7950e9cf3

9 years agoperldelta for a14c24d0
Father Chrysostomos [Sun, 7 Sep 2014 19:02:27 +0000 (12:02 -0700)]
perldelta for a14c24d0

9 years agoperldelta for 7bdb4ff09
Father Chrysostomos [Sun, 7 Sep 2014 18:20:17 +0000 (11:20 -0700)]
perldelta for 7bdb4ff09

9 years agoperldelta for 64ff300b/#122669
Father Chrysostomos [Sun, 7 Sep 2014 18:15:41 +0000 (11:15 -0700)]
perldelta for 64ff300b/#122669

9 years agoAdd epigraph for 5.20.1-RC2
Steve Hay [Sun, 7 Sep 2014 17:32:29 +0000 (18:32 +0100)]
Add epigraph for 5.20.1-RC2

9 years ago5.20.1-RC2 today
Steve Hay [Sun, 7 Sep 2014 16:21:33 +0000 (17:21 +0100)]
5.20.1-RC2 today

9 years agoRemove GV_ADDINEVAL
Father Chrysostomos [Sun, 7 Sep 2014 05:42:19 +0000 (22:42 -0700)]
Remove GV_ADDINEVAL

This flag does absolutely nothing.  The use of 8 as a flag to pass to
gv_fetchpv was added in this commit:

commit 93233ece75d8fe98a77377e72c4d6004c5ea8691
Author: Chip Salzenberg <chip@pobox.com>
Date:   Tue Mar 3 04:39:49 1998 +0000

    [win32] merge problematic maintpatch to op.c
            #77:  "Eliminate double warnings under C<package;>"
          Files:  gv.c op.c toke.c

But nothing in gv.c made use of it at the time.

Later it was changed into a #define in commit 0f303493c6.  Subse-
quently more uses were added in 77ca0c92 and f558d5af04.

It still does nothing.  Nothing outside the perl core references it.

9 years agomro.c: Don’t inline sv_sethek
Father Chrysostomos [Sun, 7 Sep 2014 00:38:29 +0000 (17:38 -0700)]
mro.c: Don’t inline sv_sethek

This code actually long predates sv_sethek.  But now that we have it,
we can call it, reducing the size of mro.o.

9 years agoregcomp.c: Don't doubly do 'use encoding'
Karl Williamson [Fri, 5 Sep 2014 16:15:09 +0000 (10:15 -0600)]
regcomp.c: Don't doubly do 'use encoding'

When reparsing, values have already been converted (if necessary) to
native, so don't do it again.

9 years agoregcomp.c: Remove extraneous tests
Karl Williamson [Fri, 5 Sep 2014 15:45:27 +0000 (09:45 -0600)]
regcomp.c: Remove extraneous tests

These two messages used to be warnings, but are now errors, so there is
no need to test which pass they are being output in.

9 years agoAllow \N{named seq} in qr/[...]/
Karl Williamson [Fri, 5 Sep 2014 15:09:28 +0000 (09:09 -0600)]
Allow \N{named seq} in qr/[...]/

This commit changes the regex handler to properly match in many
instances a \N{named sequence} in a bracketed character class.

A named sequence is one which consists of a string of multiple
characters but given one name.  Unicode has hundreds of them, like LATIN
CAPITAL LETTER A WITH MACRON AND GRAVE.  These are encoded by Unicode
when there is some user community that thinks of the conglomeration as a
single unit, but there was no prior standard that had it so, and it is
possible to encode it in Unicode using other means, typically a sequence
of a base character followed by some combining marks.  (If there had not
been such a prior standard, 8859-1, things like LATIN CAPITAL LETTER A
WITH GRAVE would have been put into Unicode this way too.)  If they did
not do it this way, they would run out of availble code points much
sooner.

Not having these as single characters adds a burden to the programmer
having to deal with them.  Hiding this detail as much as possible makes
it easier to program.  This commit hides this in one more place than
previously.

It takes advantage of the infrastructure added some releases ago dealing
with the fact that the match of some single characters
case-insensitively can be 2 or even 3 characters.

  "ss" =~ /[ß]/i;

is the most prominent example.

We earlier discovered that /[^ß]/ leads to unexpected behavior, and
using one of these sequences as an endpoint in a range is also unclear
as to what is meant.  This commit leaves existing behavior for those
cases.  That behavior is to use just the first code point in the
sequence for regular [...], and to generate a fatal syntax error for
(?[...]).

9 years agoregcomp.c: Extract out functionality into a function
Karl Williamson [Sun, 7 Sep 2014 03:30:14 +0000 (21:30 -0600)]
regcomp.c: Extract out functionality into a function

This is in preparation for it being called from a 2nd place.  The code
was merely moved and outdented, and comments moved within the function
and added to.

9 years agoregcomp.c: White-space only
Karl Williamson [Thu, 4 Sep 2014 02:00:28 +0000 (20:00 -0600)]
regcomp.c: White-space only

Properly indent code in blocks newly formed by the previous commit

9 years agoregcomp.c: Refactor func so caller handles anomalies
Karl Williamson [Thu, 4 Sep 2014 01:52:05 +0000 (19:52 -0600)]
regcomp.c: Refactor func so caller handles anomalies

S_grok_bslash_N() is refactored to not know about the strictness level
required by the caller, and to return things instead so that the caller
can decide what action to take.

This is in preparation for some changes in the caller's behavior in
future commits.

This has the effect of changing the parsing position or where a problem
occurs shown in a warning message.

9 years agoregcomp.c: Comment clarifications, nits
Karl Williamson [Thu, 4 Sep 2014 00:28:25 +0000 (18:28 -0600)]
regcomp.c: Comment clarifications, nits

9 years agoregcomp.c: Refactor one area to use common subroutine
Karl Williamson [Wed, 3 Sep 2014 23:31:39 +0000 (17:31 -0600)]
regcomp.c: Refactor one area to use common subroutine

By using the inline function append_utf8_from_native_byte(), the details
of this conversion are hidden from here.  Since that routine advances
the parsing pointer with each byte, this has to be slightly refactored.

9 years agoPATCH: [perl #122671] Many warnings in regcomp.c can occur twice
Karl Williamson [Tue, 2 Sep 2014 02:00:01 +0000 (20:00 -0600)]
PATCH: [perl #122671] Many warnings in regcomp.c can occur twice

This solves the problem by moving the warnings to be output only in
pass2 of compilation.  The problem arises because almost all of pass1
can be repeated under certain circumstances described in the ticket and
the added comments of this patch.

9 years agorecomp.c: output given warning in only one pass
Karl Williamson [Tue, 2 Sep 2014 00:54:03 +0000 (18:54 -0600)]
recomp.c: output given warning in only one pass

Otherwise, it will be output multiple times.  This warning was untested
for as well.

9 years agoregcomp.c: Vertically stack ternary
Karl Williamson [Mon, 1 Sep 2014 22:44:38 +0000 (16:44 -0600)]
regcomp.c: Vertically stack ternary

for legibility

9 years agoregcomp.c: Don't prematurely skip error checking
Karl Williamson [Mon, 1 Sep 2014 20:57:49 +0000 (14:57 -0600)]
regcomp.c: Don't prematurely skip error checking

The assertion in the comment changed by this commit was true only for
pass1 of the regex compilation; not pass2.  This makes it true in both
passes by moving it, and the code it was about past some error checking.
This error checking was executed in pass1, but not pass2.  It also
changes the warning to only be done in the second pass, part of
[perl #122671].  A future commit will fix the others

9 years agoregcomp.c: Move comment closer to code it applies to
Karl Williamson [Mon, 1 Sep 2014 20:48:02 +0000 (14:48 -0600)]
regcomp.c: Move comment closer to code it applies to

9 years agoregcomp.c: Remove unnecessary cast
Karl Williamson [Fri, 29 Aug 2014 03:12:39 +0000 (21:12 -0600)]
regcomp.c: Remove unnecessary cast

The macro does the appropriate cast, and this is slightly more legible.

9 years agoregcomp.c: Make macro a lookup
Karl Williamson [Tue, 26 Aug 2014 21:34:25 +0000 (15:34 -0600)]
regcomp.c: Make macro a lookup

The recently introduced macro isMNEMONIC_CNTRL has a look-up and several
tests in it, which occupy time and space.  Since it was only used for
debugging, that did not matter much, but future commits will use it in
more mainline code.  This commit changes it to be a single look-up,
using up one of the spare bits available for that purpose in
PL_charclass.  There are enough available bits that we aren't likely to
run out, really ever.  (We can always add a 2nd word of bits if
necessary.)

9 years agoregcomp.c: Extract functionality into a static function
Karl Williamson [Tue, 26 Aug 2014 23:29:31 +0000 (17:29 -0600)]
regcomp.c: Extract functionality into a static function

This is in preparation for it being used in more than one place in a
future commit.

9 years agomake_ext.pl: Typo in error message
Father Chrysostomos [Sat, 6 Sep 2014 17:21:00 +0000 (10:21 -0700)]
make_ext.pl: Typo in error message

9 years agot/uni/parser.t: Make a test more robust
Father Chrysostomos [Sat, 6 Sep 2014 04:58:31 +0000 (21:58 -0700)]
t/uni/parser.t: Make a test more robust

It was checking that *tèst returns a true value, which is somewhat
redundant.  I think ‘is’ was meant, rather than ‘ok’, considering what
was the test name (*main::tèst).

9 years agoop.h: Correct PERL_LOADMOD_IMPORT_OPS comment
Father Chrysostomos [Sat, 6 Sep 2014 03:30:01 +0000 (20:30 -0700)]
op.h: Correct PERL_LOADMOD_IMPORT_OPS comment

This description, added in ec6d81aba, is misleading.

9 years agonumeric.c: Comment tweak
Karl Williamson [Fri, 5 Sep 2014 15:34:26 +0000 (09:34 -0600)]
numeric.c: Comment tweak

9 years agoSync up with meta after backports
H.Merijn Brand [Sat, 6 Sep 2014 19:58:22 +0000 (21:58 +0200)]
Sync up with meta after backports

This includes the inevitable reordering and some typo fixes

Note to committers that change Configure: when you add scans, thos will
only be included if used/referenced. You can force those in by adding a
reference in metaconfig.h

9 years agoLong double might have INFINITYL or NANL.
Jarkko Hietaniemi [Sat, 6 Sep 2014 18:12:05 +0000 (14:12 -0400)]
Long double might have INFINITYL or NANL.

9 years agoThe .i target should depend at least on perl.h and config.h.
Jarkko Hietaniemi [Sat, 6 Sep 2014 18:08:20 +0000 (14:08 -0400)]
The .i target should depend at least on perl.h and config.h.

While at it, do the same for the .s target.

9 years agoNV_INF/NV_NAN fallback where int32 is coerced to IEEE754 float.
Jarkko Hietaniemi [Sat, 6 Sep 2014 18:05:33 +0000 (14:05 -0400)]
NV_INF/NV_NAN fallback where int32 is coerced to IEEE754 float.

This is the second-to-last fallback.  The last one uses explicit
1/0.0 and 0/0.0 which may cause consternation with some compilers.

9 years agoPOSIX math: Add the opengroup URL for math.h
Jarkko Hietaniemi [Sat, 6 Sep 2014 11:49:03 +0000 (07:49 -0400)]
POSIX math: Add the opengroup URL for math.h