| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Unlike other pod handling routines, autodoc requires the line following
an =head1 to be non-empty for its text to be included in the paragraph
started by the heading. If you fail to do this, silently the text will
be omitted from perlapi. I went through the source code, and where it
was apparent that the text was supposed to be in perlapi, deleted the
empty line so it would be, with some revisions to make more sense.
I added =cuts where I thought it best for the text to not be included.
|
|
|
|
|
|
|
| |
This commit allows one to specify to enable locale-awareness for only a
specified subset of the locale categories. Thus you could make a
section of code LC_MESSAGES aware, with no locale-awareness for the
other categories.
|
|
|
|
|
| |
The second test won't be true unless the first one is (but not vice
versa), so no need to test the first.
|
|
|
|
|
| |
The previous commit added a block around this code, so indent
correspondingly.
|
|
|
|
|
| |
I haven't found a test case this fails for in v5.20, but I'm sure there
is one. But two commits from now would fail if this wasn't done.
|
|
|
|
|
|
|
| |
Used by linters (static checkers), and also good for human readers.
Even though "FALL THROUGH" seems to be the most common, e.g BSD lint
manual only knows "FALLTHROUGH" (or "FALLTHRU").
|
|
|
|
|
| |
Indent and reflow to 79 columns as a result of the previous commit's
adding a block around this code.
|
|
|
|
|
|
|
|
|
|
|
| |
This uses the macros added in the previous commit to make sure the
current LC_NUMERIC locale is correct during the operation being done;
restoring it to its prior condition afterwards. Outside of 'use locale'
the locale should be C; inside it should be the underlying default
locale. The macros handle the whole thing. In most of the places here,
the code was trying to do what the macros do more elegantly, but there
are some additional places where we set the locale correctly around an
operation that is affected by it.
|
|
|
|
|
|
|
|
| |
This replaces uses of strchr() (and hence its loop) with a simple array
lookup, mask, and test. This causes an extra test to be needed later in
the hex decoding case to get the hex value, instead of a subtract
previously. However these two tests are fewer than the average number
in strchr().
|
|
|
|
| |
plus some typo fixes. I probably changed some things in perlintern, too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For something like 0.153e-305, which is small, but not quite the smallest
number (which is around 2.2e-308), adding extra digits to the fractional part
could cause unnecessary rounding to zero.
From the bug report:
$ echo 0.1530e-305 | perl -e '$v = <STDIN>; print "v=", $v + 0, "\n";'
v=0
$ echo 0.153e-305 | perl -e '$v = <STDIN>; print "v=", $v + 0, "\n";'
v=1.53e-306
This was because 0.1234e-305 is calculated as
1234 / (10^309)
and 10^309 becomes infinity. In these edge cases, repeatedly decrement
the exponent and divide the mantissa by 10 until the exponent becomes in
range; in this case we instead calculate
123 / (10^308)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
A suggested way of avoiding the the warning on nv1 != nv2
by replacing it with (nv1 < nv2 || nv1 > nv2), has too many issues
with NaN. [perl #120538].
I haven't found any other way of selectively disabling the warning,
so for now I'm just reverting the whole commit.
This reverts commit c279c4550ce59702722d0921739b1a1b92701b0d.
|
|
|
|
| |
Properly indent the branch of an 'if'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The gcc option -Wfloat-equal warns when two floating-point numbers
are directly compared for equality or inequality, the idea being that
this is usually a logic error, and that you should be checking that the
values are instead very near to each other.
perl on the other hand has lots of reasons to do a direct comparison.
Add two macros, NV_eq_nowarn(a,b) and NV_eq_nowarn(a,b)
that do the same as (a == b) and (a != b), but without the warnings.
They achieve this by instead doing (a < b) || ( a > b).
Under gcc at least, this is optimised into the same code as the direct
comparison.
The are three places that I've left untouched, because they are handling
NaNs, and that gets a bit tricky. In particular (nv != nv) is a test for a
NaN, and replacing it with (< || >) creates signalling NaNs (whereas ==
and != create quiet NaNs)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Way back in 67597c89125e7e14 we misspelled _IEEE_FP as __IEEE_FP,
with a spurious leading underscore. Which I then copied and
pasted into pp_pack.c in baf3cf9c09c529. This means that on
Alpha and Itanium systems with the default selection of IEEE
floating point, we've actually (for the last decade!) been
using a workaround intended for VAX or Alpha and Itanium builds
that have explicitly selected VAX-compatible floating point
formats. Oh well.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This updates the editor hints in our files for Emacs and vim to request
that tabs be inserted as spaces.
|
|
|
|
|
| |
This adds the parameter handling, tests, and documentation for this new
feature which allows locale and Unicode to play well with each other.
|
|
|
|
|
| |
In two instances, I actually modified to code to avoid %s for a
constant string, as it should be faster that way.
|
|
|
|
|
|
|
| |
Unicode inversion lists commonly will contain UV_MAX, which may
trigger these warnings. Add a flag to suppress them to the numeric
grok functions, which can be set by the code that is dealing with
these lists
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for all precision possible in NV
numeric.c, in the Perl_my_atof2 function, makes the following assumption:
/* There is no point in processing more significant digits
* than the NV can hold. Note that NV_DIG is a lower-bound value,
* while we need an upper-bound value. We add 2 to account for this;
* since it will have been conservative on both the first and last digit.
* For example a 32-bit mantissa with an exponent of 4 would have
* exact values in the set
* 4
* 8
* ..
* 17179869172
* 17179869176
* 17179869180
*
* where for the purposes of calculating NV_DIG we would have to discount
* both the first and last digit, since neither can hold all values from
* 0..9; but for calculating the value we must examine those two digits.
*/
#define MAX_SIG_DIGITS (NV_DIG+2)
Digits beyond MAX_SIG_DIGITS are ignored. In some systems and/or modes
(e.g., with/without using long doubles), this is not the case. One
example is IRIX when using long doubles, which are not fully IEEE
compliant; with it, while NV_DIG (the _minimum_ number of digits
usable) is 31 for long doubles used as NVs, long doubles can have up
to 34 digits of accuracy. (As well as IRIX with long doubles, other
machines using a mode in which NV is not IEEE compliant (e.g., as
found by the following from numeric.c:
#ifdef ((defined(VMS) && !defined(__IEEE_FP)) || defined(_UNICOS))
(although UNICOS does not by default use Perl's atof in any event) or
as noted in the hints files for DEC OSF with the old MIPS CC) may
benefit from a change to this.) I will attach a test program, example
set of problematic outputs, and experimental patch so others can
explore this on their systems. (With the patch and a
-Accflags='-DMAX_SIG_DIG_PLUS=3' (or
-Accflags='-DMAX_SIG_DIG_PLUS=4'), the test program was
successful. Different values of MAX_SIG_DIG_PLUS may need to be
experimented with, especially with different other Configure/compiler
flags (long doubles yes/no, optimization affecting floating point,
etcetera); 3 was the maximum that did any good on IRIX with long
doubles, but others may differ.) I have done some local testing (as in
the normal testsuite) of the patch and different -DMAX_SIG_DIG_PLUS
values, and will be doing more; it is possible that it would be best
to build in the test program into, say, numconvert.t. Patching
hints/irix_6.sh to use -DMAX_SIG_DIG_PLUS=3 if long doubles are in
use, or a define of MAX_SIG_DIG_PLUS to 3 if defined(IRIX) and long
doubles are in use, is also advisable; I have not included either in my patch
because I was unsure which was recommended practice.
|
| |
|
|
|
|
| |
Signed-off-by: David Golden <dagolden@cpan.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bool b = (bool)some_int
doesn't necessarily do what you think. In some builds, bool is defined as
char, and that cast's behaviour is thus undefined. So this line in mg.c:
const bool was_temp = (bool)SvTEMP(sv);
was actually setting was_temp to false even when the SVs_TEMP flag was set.
Fix this by replacing all the (bool) casts with a new cBOOL() cast macro
that (hopefully) does the right thing.
|
|
|
|
|
| |
Replace ckWARN_d{,2,3,4}() && Perl_warner() with it, which trades reduced code
size for 1 more function call if warnings are not enabled.
|
|
|
|
|
|
|
| |
Replace ckWARN{,2,3,4}() && Perl_warner() with it, which trades reduced code
size (about 0.2%), for 1 more function call if warnings are not enabled.
However, if we're now in the L1 or L2 cache when we weren't previously, that's
still going to be a speed win.
|
|
|
|
|
|
| |
Message-ID: <25940.1225611819@chthon>
Date: Sun, 02 Nov 2008 01:43:39 -0600
p4raw-id: //depot/perl@34698
|
|
|
| |
p4raw-id: //depot/perl@34585
|
|
|
|
|
|
|
|
|
|
|
|
| |
ability to create landmines that will explode under someone in the
future when they upgrade their compiler to one with better
optimisation. We've already done this at least twice.
(Yes, some of the assertions are after code that would already have
SEGVd because it already deferences a pointer, but they are put in
to make it easier to automate checking that each and every case is
covered.)
Add a tool, checkARGS_ASSERT.pl, to check that every case is covered.
p4raw-id: //depot/perl@33291
|
|
|
| |
p4raw-id: //depot/perl@32237
|
|
|
|
|
| |
Message-ID: <20070503054554.GA30975@petdance.com>
p4raw-id: //depot/perl@31123
|
|
|
|
|
|
|
| |
comparison)
Message-ID: <Pine.LNX.4.62.0702091121400.10202@fractal.phys.lafayette.edu>
p4raw-id: //depot/perl@30192
|
|
|
|
|
| |
Message-ID: <20060221062711.GA16160@petdance.com>
p4raw-id: //depot/perl@27300
|
|
|
|
|
| |
did not update)
p4raw-id: //depot/perl@26732
|
|
|
|
|
| |
Message-ID: <43BE7C4D.1010302@gmail.com>
p4raw-id: //depot/perl@26675
|
|
|
|
|
| |
Message-ID: <20051031054413.GA10767@petdance.com>
p4raw-id: //depot/perl@25915
|
|
|
|
|
|
|
| |
compatability with previous versions of Perl. Change also includes
various Makefile changes to compile the new file and link it into
libperl.
p4raw-id: //depot/perl@25866
|
|
|
|
|
|
|
|
| |
Specifically, this silences the warnings from the following smoke:
http://www.nntp.perl.org/group/perl.daily-build.reports/32258
(Hmm. Looks like you need to decode the base64 yourself before you
can read that.)
p4raw-id: //depot/perl@25779
|
|
|
|
|
| |
Message-ID: <B356D8F434D20B40A8CEDAEC305A1F24E7A41B@esebe105.NOE.Nokia.com>
p4raw-id: //depot/perl@25304
|
|
|
|
|
|
|
|
|
|
|
| |
Date: Aug 7, 2005 8:03 PM
Message-ID: <20050807180308.GA2112@efn.org>
Subject: Re: [perl #36654] Inconsistent treatment of NaN
From: Yitzchak Scott-Thoennes <sthoenna@efn.org>
Date: Wed, 10 Aug 2005 22:53:51 -0700
Message-ID: <20050811055351.GA2296@efn.org>
p4raw-id: //depot/perl@25299
|
|
|
|
|
| |
Message-ID: <20050606151107.GC7022@petdance.com>
p4raw-id: //depot/perl@24735
|
|
|
|
|
| |
Message-ID: <20050516151353.GA25387@petdance.com>
p4raw-id: //depot/perl@24489
|
|
|
|
|
|
| |
in read-only mode. Make vi modelines compatible with non-vim
vi versions.
p4raw-id: //depot/perl@24445
|
|
|
|
|
| |
(except the generated ones)
p4raw-id: //depot/perl@24440
|
|
|
|
|
| |
Message-ID: <B356D8F434D20B40A8CEDAEC305A1F2453D653@esebe105.NOE.Nokia.com>
p4raw-id: //depot/perl@24271
|