This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Jarkko Hietaniemi [Sat, 23 Aug 2014 12:53:37 +0000 (08:53 -0400)]
Test 9**9**9 for Inf and sin(9**9**9) for NaN.
Jarkko Hietaniemi [Sat, 23 Aug 2014 12:49:29 +0000 (08:49 -0400)]
Revert "Test 9**9**9 for Inf and sin(9**9**9) for NaN."
This reverts commit
3761cb2c37385299211e45c965fb0d727e13c80b.
Jarkko Hietaniemi [Sat, 23 Aug 2014 12:40:51 +0000 (08:40 -0400)]
The less-than-zero branch needs to be the default always.
Jarkko Hietaniemi [Sat, 23 Aug 2014 12:21:27 +0000 (08:21 -0400)]
Test 9**9**9 for Inf and sin(9**9**9) for NaN.
Jarkko Hietaniemi [Sat, 23 Aug 2014 12:14:20 +0000 (08:14 -0400)]
Do not test memcmp et al, now also Linux inlined it.
See perl #122595.
Jarkko Hietaniemi [Sat, 23 Aug 2014 00:38:25 +0000 (20:38 -0400)]
Old HP-UXen had a non-standard strtold().
Jarkko Hietaniemi [Fri, 22 Aug 2014 20:42:22 +0000 (16:42 -0400)]
Fix infnan.t Win32 failure.
Jarkko Hietaniemi [Fri, 22 Aug 2014 18:52:46 +0000 (14:52 -0400)]
Fix the PEEK_INFNAN (wrong macro arg name).
Also rename as INFNAN_PEEK, to match HEXFP_PEEK.
Add "send" pointer to INFNAN_PEEK to guard againt past-the-buffer peeking.
HEXFP_PEEK doesn't easily lend itself to "send" pointer
because of it's calling environment doesn't have one.
Jarkko Hietaniemi [Fri, 22 Aug 2014 16:33:37 +0000 (12:33 -0400)]
Remove obsolete comment.
Jarkko Hietaniemi [Fri, 22 Aug 2014 14:56:10 +0000 (10:56 -0400)]
If this format ever happens, it is probably left-aligned.
(Having unused bytes in the left/low/front makes no sense.)
Jarkko Hietaniemi [Fri, 22 Aug 2014 16:28:00 +0000 (12:28 -0400)]
Darwin can have libfoo.0.dylib instead of libfoo.dylib.0
Jarkko Hietaniemi [Fri, 22 Aug 2014 16:31:59 +0000 (12:31 -0400)]
For Darwin MacPorts add the gcc/g++ libdir.
Karl Williamson [Fri, 22 Aug 2014 18:12:10 +0000 (12:12 -0600)]
Bump version of POSIX.pm
Karl Williamson [Fri, 22 Aug 2014 16:41:07 +0000 (10:41 -0600)]
regcomp.c: Use symbolic constant instead of number
This case was missed in converting to symbolic form in
dcb20b364cef1eec53dfee5ed1078aa04ef59ed8
Karl Williamson [Thu, 21 Aug 2014 23:29:10 +0000 (17:29 -0600)]
Add and use macros for case-insensitive comparison
This adds to handy.h isALPHA_FOLD_EQ(c1,c2) which efficiently tests if
c1 and c2 are the same character, case-insensitively. For example
isALPHA_FOLD_EQ(c, 's') returns true if and only if <c> is 's' or 'S'.
isALPHA_FOLD_NE() is also added by this commit.
At least one of c1 and c2 must be known to be in [A-Za-z] or this macro
doesn't work properly. (There is an assert for this in the macro in
DEBUGGING builds). That is why the name includes "ALPHA", so you won't
forget when using it.
This functionality has been in regcomp.c for a while, under a different
name. I had thought that the only reason to make it more generally
available was potential speed gain, but recent gcc versions optimize to
the same code, so I thought there wasn't any point to doing so.
But I now think that using this makes things easier to read (and
certainly shorter to type in). Once you grok what this macro does, it
simplifies what you have to keep in your mind when reading logical
expressions with multiple operands. That something can be either upper
or lower case can be a distraction to understanding the larger point of
the expression.
Jarkko Hietaniemi [Thu, 21 Aug 2014 21:10:26 +0000 (17:10 -0400)]
Add some basic math tests.
Inspired by [perl #122571] where exp() and sin() were broken
in AIX with long doubles.
Jarkko Hietaniemi [Thu, 21 Aug 2014 20:30:04 +0000 (16:30 -0400)]
Implement POSIX::strtold().
Defined of course only with long doubles.
Jarkko Hietaniemi [Thu, 21 Aug 2014 17:03:53 +0000 (13:03 -0400)]
Introduce Perl_strtod (macro) to call strtold if long doubles.
Not that much effect since strtod is now only used to parse inf/nan
and then only if NV_INF + NV_NAN are missing. (Earlier strtod()
returned always the double inf/nan, not the long double inf/nan.)
Jarkko Hietaniemi [Fri, 22 Aug 2014 11:48:57 +0000 (07:48 -0400)]
Perl_isinf and Perl_isfinite enhancements.
Jarkko Hietaniemi [Fri, 22 Aug 2014 02:51:47 +0000 (22:51 -0400)]
Clean up the fpclass forest.
Jarkko Hietaniemi [Thu, 21 Aug 2014 21:48:12 +0000 (17:48 -0400)]
Add inf/nan tests.
Try to skip robustly if no such values exist.
Jarkko Hietaniemi [Thu, 21 Aug 2014 22:15:04 +0000 (18:15 -0400)]
Unify the Inf/-Inf/NaN also in basic NV stringify.
Jarkko Hietaniemi [Thu, 21 Aug 2014 20:57:06 +0000 (16:57 -0400)]
Unify inf/nan printf output to Inf, -Inf, and NaN.
(Bypassing the native strtod.)
Jarkko Hietaniemi [Thu, 21 Aug 2014 16:36:44 +0000 (12:36 -0400)]
Use grok_infnan() if NV_INF and NV_NAN are defined.
The native strtod() is still the fallback.
The send was one too short, but it was only used in one code path,
obviously not tested.
Also really allow the trailing weirdnesses for nan (like "nanq").
Karl Williamson [Thu, 21 Aug 2014 20:26:07 +0000 (14:26 -0600)]
perlrecharclass: Remove now-irrelevant text
v5.21 now uses the same definition of white-space that this gives, so
there is no need to repeat it here, and is misleading because it says
this is different from the other definition.
Karl Williamson [Thu, 21 Aug 2014 20:23:05 +0000 (14:23 -0600)]
perlop: Note that negative rep now warns
This doc change was missed in
b3211734a7d280a8b7c6acaaba333f8f6a314675
but it appears that this will not be reverted, so safe to go in now
without having to worry very much about synchronizing should there be a
reversion
Karl Williamson [Sun, 10 Aug 2014 00:07:48 +0000 (18:07 -0600)]
regcomp.c: Avoid function call overhead
We don't need to call a function to convert from UTF-8 when the value is
invariant in and out of UTF-8.
Karl Williamson [Sat, 9 Aug 2014 23:47:02 +0000 (17:47 -0600)]
regcomp.c: Swap 'else' clauses.
It's easier to comprehend a tiny else clause followed by a large one and
vice-versa. This is in preparation for further changes in future
commits.
Karl Williamson [Fri, 1 Aug 2014 16:04:16 +0000 (10:04 -0600)]
Avoid redundant text -in -Dr output
There is an optimization in regcomp.c which saves memory when used, but
which caused -Dr output to display the same code points twice.
I didn't add a test to ext/re/t/regop.t because this only happens for a
Unicode property, under certain circumstances, and that triggers a lot
of other regex patterns to be compiled which are subject to change, so
the test would frequently have to be updated. This only affects
debugging output anyway.
Karl Williamson [Fri, 1 Aug 2014 15:58:02 +0000 (09:58 -0600)]
regcomp.c: Reorder cases: in switch
This makes it slightly more reader-friendly
Karl Williamson [Fri, 1 Aug 2014 15:09:41 +0000 (09:09 -0600)]
Move _get_regclass_nonbitmap_data() to regcomp.c
This function, though mostly used by regexec.c and previously contained
therein, relies on the particular data structure in regcomp.c, so it
makes sense to move it adjacent to the code that generates the
structure. Future commits will add function calls to this function that
are (currently) only in regcomp.c, and so will tie it tighter to that
file.
This just moves the code with surrounding #ifdef, adds a couple of blank
lines, removes some trailing white space, and adjusts the comments. No
other changes were made.
Karl Williamson [Mon, 30 Jun 2014 21:03:14 +0000 (15:03 -0600)]
regex: Use #define for number of bits in ANYOF
ANYOF nodes (for bracketed character classes) currently are for code
points 0-255. This is the first step in the eventual making that size
configurable. This also renames a static function, as the domain may
not necessarily be 'latin1'
Karl Williamson [Fri, 1 Aug 2014 15:46:12 +0000 (09:46 -0600)]
Use constant now defined for ESC
This avoids a runtime translation
Jarkko Hietaniemi [Thu, 21 Aug 2014 19:04:47 +0000 (15:04 -0400)]
Partial revert of
c6d2504a: do not use isfinite().
Instead return to a well-defined hack that has served us for years.
Immediate reason: VMS. It has isfinite(), but due to messy
reasons it doesn't currently get the prototype.
Jarkko Hietaniemi [Thu, 21 Aug 2014 14:14:56 +0000 (10:14 -0400)]
The quest for the hexfp exponent continues.
Jarkko Hietaniemi [Thu, 21 Aug 2014 13:54:27 +0000 (09:54 -0400)]
Do not anchor the matches, because of sprintf padding.
Karl Williamson [Thu, 21 Aug 2014 18:10:39 +0000 (12:10 -0600)]
pp_sys.c: Generalize -B, -T for EBCDIC, clean up
There was discussion about extending these to work for Latin1,
(http://nntp.perl.org/group/perl.perl5.porters/214950 and following)
but in the end it was decided that this is a heuristic, and perturbing
that might break things. So this patch keeps the same criteria as
before, but refactors things so it isn't ASCII-platform-centric.
However, the version it replaces checked for utf8ness piece-meal,
leading to possibly incorrect results, which this fixes. If a buffer
isn't entirely UTF-8, then it can't be UTF-8. So this uses
is_utf8_string() instead of reimplementing the utf8ness checks, and does
it for the buffer as a whole.
And, there was an inapproptiate test for ALPHA under locale that this
removes. The test for locale non-strange characters is that they be
either printable or space (things like \t are space but not printable).
Karl Williamson [Thu, 21 Aug 2014 17:55:48 +0000 (11:55 -0600)]
unicode_constants.h: Add definitions for ESC and VT
These will be used in future commits
Karl Williamson [Thu, 21 Aug 2014 17:49:15 +0000 (11:49 -0600)]
perlfunc: Update -B, -T descriptions
These descriptions were way out-of_date.
David Mitchell [Thu, 21 Aug 2014 15:50:39 +0000 (16:50 +0100)]
Revert "cpan/Time-HiRes/t/itimer.t: better diagnostics"
This reverts commit
65dd9533e90d8e1ea84c091ff43133132c667a1c.
That commit was just temporary to help debug a smoke issue.
Since Time::Hires is a CPAN-first module, back the patch out from blead,
and leave it to the module's owner whether they want to add it back in.
David Mitchell [Thu, 21 Aug 2014 15:22:35 +0000 (16:22 +0100)]
dump.c: eliminate DUMP_OP_FLAGS/PRIVATE macros
With the MAD code, these macros were each used in two places to
symbolically dump op_flags and op_private. Now that the MAD code
has been removed, they are each only used once, so inline them.
Chris 'BinGOs' Williams [Thu, 21 Aug 2014 10:35:53 +0000 (11:35 +0100)]
Update Pod-Perldoc to CPAN version 3.24
[DELTA]
3.24 - Tue Aug 19 03:38:07 UTC 2014
* Release 3.24
Make sure when we open a filehandle for reading
or writing, we set ':encoding(UTF-8)' on it
everywhere. Closes RT#98019.
3.23_01 - Sat Aug 16 16:47:45 UTC 2014
* Test release to test UTF8 filehandles.
* Happy CPAN Day!
Chris 'BinGOs' Williams [Thu, 21 Aug 2014 10:34:14 +0000 (11:34 +0100)]
Update Socket version in Maintainers.pl
Chris 'BinGOs' Williams [Thu, 21 Aug 2014 10:32:26 +0000 (11:32 +0100)]
Update Test-Harness to CPAN version 3.33
[DELTA]
3.33
- Various documentation fixes (Leon Timmermans, Justin Cook)
Chris 'BinGOs' Williams [Thu, 21 Aug 2014 10:07:03 +0000 (11:07 +0100)]
Update experimental to CPAN version 0.010
[DELTA]
0.010 2014-08-19 17:47:20+02:00 Europe/Amsterdam
Add returning 1's to evals in tests
0.009 2014-08-16 13:43:53+02:00 Europe/Amsterdam
Hardcode features for perl < 5.15.7
Jarkko Hietaniemi [Thu, 21 Aug 2014 02:48:05 +0000 (22:48 -0400)]
IEEE quadruple exponents were off.
Peter Martini [Thu, 21 Aug 2014 11:23:39 +0000 (07:23 -0400)]
Module::CoreList version number bump
Peter Martini [Thu, 21 Aug 2014 06:35:17 +0000 (02:35 -0400)]
Version bump addendum; changed a 5.21.1 to .3
The note on backwards compatibility notes that this
may not be binary compatible with version 5.21.1 or earlier.
That should float to always be one subversion behind the current,
so bumping it to 5.21.3.
Peter Martini [Thu, 21 Aug 2014 06:32:55 +0000 (02:32 -0400)]
Bump version number from 5.21.3 to 5.21.4
Peter Martini [Thu, 21 Aug 2014 06:02:48 +0000 (02:02 -0400)]
New perldelta.
Chris 'BinGOs' Williams [Thu, 21 Aug 2014 09:50:39 +0000 (10:50 +0100)]
Module-CoreList CPAN version synchronisation
Peter Martini [Thu, 21 Aug 2014 05:39:04 +0000 (01:39 -0400)]
Epigraph for 5.21.3
Peter Martini [Thu, 21 Aug 2014 05:17:36 +0000 (01:17 -0400)]
Merge branch 'release-5.21.3' into blead
Peter Martini [Thu, 21 Aug 2014 02:47:01 +0000 (22:47 -0400)]
Scowl. 19 should have been '[VERSION]'
And I should have noticed that before I hit 'send'!
Peter Martini [Wed, 20 Aug 2014 20:20:05 +0000 (16:20 -0400)]
perldelta: cleanup per JHI's comment
Peter Martini [Wed, 20 Aug 2014 08:23:26 +0000 (04:23 -0400)]
Add new release to perlhist
Peter Martini [Wed, 20 Aug 2014 08:21:39 +0000 (04:21 -0400)]
Final perldelta change for 5.21.3
Peter Martini [Wed, 20 Aug 2014 08:21:14 +0000 (04:21 -0400)]
Update Module::CoreList for 5.21.3
Peter Martini [Wed, 20 Aug 2014 07:49:31 +0000 (03:49 -0400)]
perldelta suggested by Module-CoreList
Peter Martini [Wed, 20 Aug 2014 07:40:53 +0000 (03:40 -0400)]
perldelta: document the ExtUtils move to cpan/
Peter Martini [Wed, 20 Aug 2014 07:15:28 +0000 (03:15 -0400)]
perldelta: fix my bad pod
Jarkko Hietaniemi [Wed, 20 Aug 2014 13:45:50 +0000 (09:45 -0400)]
perldelta for hexadecimal floats.
Alexandre (Midnite) Jousset [Wed, 20 Aug 2014 19:24:21 +0000 (21:24 +0200)]
magic.t: android: bypass two $0 tests and add one
"ps" on Android has different syntaxes depending on the tool used.
It can be toolbox or busybox. Bypass the "ps" tests and enable
the /proc/$$/cmdline one.
Brian Fraser [Wed, 20 Aug 2014 18:25:18 +0000 (20:25 +0200)]
Android hints: Always append /system/lib and /vendor/lib in libpth
These are the canonical directories for libraries on Android.
This is only mildly important for native builds, since
whatever toolchain was installed will likely provide
their own /lib, but is quite important for cross builds.
Brian Fraser [Wed, 20 Aug 2014 17:21:30 +0000 (19:21 +0200)]
Android hints: define d_procselfexe and procselfexe if needed
Only affects cross-compile builds; currently the tests
in Configure for this feature will be run on the host,
not the target system, which makes the detection of the
feature unreliable.
Since we know that /proc/self/exe exists, just define it
and set $procselfexe to that.
Brian Fraser [Wed, 20 Aug 2014 17:19:13 +0000 (19:19 +0200)]
Configure: Improve the d_prctl_set_name detection for Android
On some versions of Android (e.g., 4.2.2, API level 17)
the header that defines the constants used for this test
will not work if unistd.h isn't already included.
Jarkko Hietaniemi [Wed, 20 Aug 2014 15:31:15 +0000 (11:31 -0400)]
Mention the possibility of fp rounding modes' effects.
Jarkko Hietaniemi [Wed, 20 Aug 2014 15:19:39 +0000 (11:19 -0400)]
Try addressing perl #122578, low-order fp diffs.
Jarkko Hietaniemi [Wed, 20 Aug 2014 13:48:26 +0000 (09:48 -0400)]
Pass $ENV{HARNESS_TIMER} to Test::Harness from t/harness.
(One would think it worked as-is, but didn't. Maybe T::H resets it somehow.)
Jarkko Hietaniemi [Wed, 20 Aug 2014 13:45:50 +0000 (09:45 -0400)]
perldelta for hexadecimal floats.
Jarkko Hietaniemi [Mon, 18 Aug 2014 16:41:41 +0000 (12:41 -0400)]
Separate grok_infnan() from grok_number().
Remaining issues:
(1) would need tests, but there are two problems: [a] generating inf/nan
reliably and testing for it from Perl level is hard (see items (2) and
(3) below), and [b] the behavior of various systems with especially NaN
differs (some platforms might throw SIGFPEs).
(2) toke.c:scan_number() will not call this code (via grok_number)
because "NaN" or "Inf" do not look at all like floats to it.
(3) Even as we now recognize these forms, the native strtod()
might not (problem of cross-portability of these exceptional
forms: Win32 outputs e.g. "1.#INF", what Linux reading this should do,
or conversely Linux outputs "Inf", what should Win32 do?)
Jarkko Hietaniemi [Mon, 18 Aug 2014 15:31:50 +0000 (11:31 -0400)]
Perl_signbit should return non-zero for -0.
Jarkko Hietaniemi [Mon, 18 Aug 2014 14:55:13 +0000 (10:55 -0400)]
Win32 apparently has _isnan() and _finite(), and _fpclass().
(At least, if one believes the Oracle of Google.)
Jarkko Hietaniemi [Mon, 18 Aug 2014 13:12:09 +0000 (09:12 -0400)]
Use Perl_isfinite().
Also kill obsolete/wrong comment: Perl_frexp is not casting its
argument to NV, and if USE_LONG_DOUBLE Perl_frexp is frexpl.
And if we do have long double and don't have frexpl, it is unclear
what should we do? (in this particular case, casting to double might
be the best possible thing to do anyway.)
Jarkko Hietaniemi [Mon, 18 Aug 2014 12:23:17 +0000 (08:23 -0400)]
Perl_isinf enhancements.
Try isfinitel first, and require Perl_isnan.
Jarkko Hietaniemi [Mon, 18 Aug 2014 12:56:48 +0000 (08:56 -0400)]
OSX does have isfinite(), and 10.9+ prefers it over finite().
isfinite() is a macro+inline while Configure tests it as a library symbol.
Jarkko Hietaniemi [Mon, 18 Aug 2014 12:55:23 +0000 (08:55 -0400)]
Perl_isfinite() enhancements.
Use isfinitel() if available, prefer C99 isfinite() over BSD finite().
Jarkko Hietaniemi [Mon, 18 Aug 2014 13:57:06 +0000 (09:57 -0400)]
Configure for isfinitel / isinfl.
Jarkko Hietaniemi [Tue, 19 Aug 2014 22:44:30 +0000 (18:44 -0400)]
Add todo comment about special hexfp values.
Jarkko Hietaniemi [Wed, 20 Aug 2014 02:16:54 +0000 (22:16 -0400)]
Quadruple float BE test triggering had a typo.
Jarkko Hietaniemi [Mon, 18 Aug 2014 16:56:51 +0000 (12:56 -0400)]
Reduce double-double %a to single-double for now.
How to exactly handle the second double is unknown, so for
now extract the mantissa bits only from the first double.
(Known platforms aix-ppc and linux-ppc.)
Jarkko Hietaniemi [Mon, 18 Aug 2014 21:04:06 +0000 (17:04 -0400)]
double-double needs the first mantissa bits of doubles.
Jarkko Hietaniemi [Mon, 18 Aug 2014 19:27:58 +0000 (15:27 -0400)]
Modify the hexfp exponent explicitly in each long double case.
Jarkko Hietaniemi [Mon, 18 Aug 2014 12:13:18 +0000 (08:13 -0400)]
Comment: scan_num also handles hexadecimal floats now.
H.Merijn Brand [Wed, 20 Aug 2014 09:07:25 +0000 (11:07 +0200)]
Configure backports cause reorder
Peter Martini [Wed, 20 Aug 2014 07:15:28 +0000 (03:15 -0400)]
perldelta: fix my bad pod
syber [Fri, 8 Aug 2014 17:06:10 +0000 (21:06 +0400)]
Make S_method_common use gv_stashpvn instead of copypasted cache usage
The previous commit copied the PL_stashcache handling code from
S_method_common() to gv_stashpvn(), so now we can call that function
directly rather than doing it ourselves.
syber [Fri, 8 Aug 2014 15:03:03 +0000 (19:03 +0400)]
Make gv_stashpvn() use PL_stashcache
perl has a stash name lookup cache, which is currently just used for
looking up up class names in Some::Class->method calls. This means
that a lookup of the class name 'A::B::C' gets reduced from doing
several stash lookups (e.g. $::{'A::'}{'B::'}{'C::'}) to a single
cache lookup (e.g. $PL_stashcache{'A::B::C::'}, so to speak).
Make gv_stashpvn() use this cache too, which means that all package
name lookups benefit, not just class method calls. Among other things,
this also indirectly affects bless operations both from Perl (OP_BLESS)
and XS.
Peter Martini [Wed, 20 Aug 2014 06:55:31 +0000 (02:55 -0400)]
perldelta: finished the stragglers
Cleaned up remaining XXX entries, checked formatting,
all that's left is contributors.
Peter Martini [Wed, 20 Aug 2014 06:42:00 +0000 (02:42 -0400)]
perldelta for 7e0dd61, MurmurHash64[AB]
Peter Martini [Wed, 20 Aug 2014 06:39:44 +0000 (02:39 -0400)]
perldelta for f04d2c3
Peter Martini [Wed, 20 Aug 2014 06:33:15 +0000 (02:33 -0400)]
perldelta: put fatal perldiags in the right spot
Peter Martini [Wed, 20 Aug 2014 06:29:48 +0000 (02:29 -0400)]
perldelta: No deprecations or perf enhancements
Peter Martini [Wed, 20 Aug 2014 06:22:45 +0000 (02:22 -0400)]
perldelta for 842a9d2, [perl #122460]
Peter Martini [Wed, 20 Aug 2014 06:16:34 +0000 (02:16 -0400)]
perldelta: platform specific notes
Peter Martini [Wed, 20 Aug 2014 05:53:59 +0000 (01:53 -0400)]
perldelta: document grok_atou
Peter Martini [Wed, 20 Aug 2014 05:49:31 +0000 (01:49 -0400)]
perldelta for f57000b
Peter Martini [Wed, 20 Aug 2014 05:32:35 +0000 (01:32 -0400)]
perldelta: Added documentation changes
Peter Martini [Wed, 20 Aug 2014 05:05:48 +0000 (01:05 -0400)]
perldelta remove (most) boilerplate
Peter Martini [Wed, 20 Aug 2014 04:53:26 +0000 (00:53 -0400)]
perldelta for Safe changes
Safe was bumped to 2.38 after a mechanism to replace subs was
discovered and fixed.