This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
8 years agoRMG - Remove out-of-date instruction about epigraph link
Steve Hay [Thu, 25 Sep 2014 08:00:08 +0000 (09:00 +0100)]
RMG - Remove out-of-date instruction about epigraph link

Thanks to the revelation of the X-List-Archive header (see 70d95cc994) we
no longer need to add the epigraph link on the day after.

8 years agoRMG - Even RCs these days generally get an epigraph
Steve Hay [Thu, 25 Sep 2014 07:56:35 +0000 (08:56 +0100)]
RMG - Even RCs these days generally get an epigraph

8 years agoRMG - Note why it is that MAINT is version-bumped late rather than early
Steve Hay [Thu, 25 Sep 2014 07:53:32 +0000 (08:53 +0100)]
RMG - Note why it is that MAINT is version-bumped late rather than early

Thanks to Nicholas Clark for pulling this reasoning from his memory banks.

8 years agoregcomp.c: fix fencepost error in vFAIL at end of pattern
Yves Orton [Mon, 22 Sep 2014 23:36:34 +0000 (01:36 +0200)]
regcomp.c: fix fencepost error in vFAIL at end of pattern

If RExC_parse was after RExC_end we passed a negative length
into the UTF8f macro/format, which then triggered asserts.

As part of this we add a new diagnostic to show when a
(?(condition)...) construct has gone unterminated, and tests for
the unterminated case, thus testing that vFAIL works properly
at the end of the string at the same time.

8 years agoadd an assert that the length arg for UTF8f is non-negative
Yves Orton [Mon, 22 Sep 2014 23:34:27 +0000 (01:34 +0200)]
add an assert that the length arg for UTF8f is non-negative

If we dont we will just hit a different more confusing assert
later. In production builds we zero elen so the args is assumed
empty.

8 years agorestore color to debug diagnostics
Yves Orton [Mon, 22 Sep 2014 14:38:58 +0000 (16:38 +0200)]
restore color to debug diagnostics

8 years agort 122283 - do not recurse into GOSUB/GOSTART when not SCF_DO_SUBSTR
Yves Orton [Fri, 19 Sep 2014 17:57:34 +0000 (19:57 +0200)]
rt 122283 - do not recurse into GOSUB/GOSTART when not SCF_DO_SUBSTR

See also comments in patch. A complex regex "grammar" like that in
RT 122283 causes perl to take literally forever, and exhaust all
memory during the pattern optimization phase.

Unfortunately I could not track down exacty why this occured, but
it was very clear that the excessive recursion was unnecessary and
excessive. By simply eliminating the unncessary recursion performance
goes back to being acceptable.

I have not thought of a good way to test this change, so this patch
does not include any tests. Perhaps we can test it using alarm, but
I will follow up on that later.

8 years agoBump $Errno::VERSION for previous commits
Steve Hay [Wed, 24 Sep 2014 08:14:28 +0000 (09:14 +0100)]
Bump $Errno::VERSION for previous commits

8 years agoErrno parsing: Skip expressions containing function names etc
Steve Hay [Wed, 24 Sep 2014 08:13:26 +0000 (09:13 +0100)]
Errno parsing: Skip expressions containing function names etc

Expressions containing a function name are no more eval()able than
expressions which are just a function name, so skip them too. This also
picks up on text in the expression and stops eval()s from whining about
"String found where operator expected" on Win32 (with VC10) on expressions
like L"\\Enlistment\\" and (sizeof(L"\\Enlistment\\")+(38*sizeof(WCHAR))),
encountered when parsing ENLISTMENT_OBJECT_PATH and
ENLISTMENT_OBJECT_NAME_LENGTH_IN_BYTES respectively.

8 years agoErrno parsing: Don't match hex numbers in parts of function names
Steve Hay [Wed, 24 Sep 2014 07:53:39 +0000 (08:53 +0100)]
Errno parsing: Don't match hex numbers in parts of function names

This stops __stdcall being seen as a hex number and turned into __stdca.
Also include _ in the pattern to match function names so that that gets
skipped anyway.

8 years agoTweak Errno parsing some more
Steve Hay [Wed, 24 Sep 2014 07:25:24 +0000 (08:25 +0100)]
Tweak Errno parsing some more

This requires there to be something present in the "0xcafebabe" part of
the "((type)0xcafebabe)" (et alia) pattern, otherwise it can end up
matching things that it shouldn't. (The "type" part is already required
to be non-empty.)

8 years agoImprove Errno parsing of Win32 output
Steve Hay [Tue, 23 Sep 2014 12:51:32 +0000 (13:51 +0100)]
Improve Errno parsing of Win32 output

This allows us to pluck "0xC038000FL" rather than "(0xC038000FL" out of
"(DWORD)(0xC038000FL)", which means we go into the hex case rather than
the eval case, and get the desired result (hex '0xC038000F' returns
3224895503, whereas eval '(0xC038000F' returns nothing).

Also allows for "((DWORD)(0xC038000FL))" and other existing formats.

8 years agoRemove most uses of PADMY
Father Chrysostomos [Tue, 23 Sep 2014 13:24:50 +0000 (06:24 -0700)]
Remove most uses of PADMY

SVs_PADMY is now 0, and SvPADMY means !SvPADTMP.

8 years agoPeek.t should not expect PADMY under 5.21.5
Father Chrysostomos [Tue, 23 Sep 2014 13:12:05 +0000 (06:12 -0700)]
Peek.t should not expect PADMY under 5.21.5

8 years agoStop setting PADMY; renumber PADSTALE
Father Chrysostomos [Tue, 23 Sep 2014 03:25:29 +0000 (20:25 -0700)]
Stop setting PADMY; renumber PADSTALE

The PADMY flag was originally used on values stored in pads as a way
to mark those slots ase being in use already during pad allocation.
That changed for the most part all the way back in bbce6d6978
(perl5.003_09), but vestiges still remained, because some ops used
PADMY for their targets.  I removed the last one yesterday in
14d91147.  So the PADMY flag now serves no purpose.

At run time, the sole purpose of PADMY is to determine the meaning of
the flag bit shared by PADTMP and PADSTALE.  If PADMY is set, the flag
means the latter.  Instead of that more complicated check, we can just
renumber PADSTALE to use the PADMY bit and assume that anything not
PADTMP is PADMY.

This commit changes the flags and does just enough to get
tests passing (except Peek.t).

fixup for padmy flag renumbering

8 years agoConsistent spaces after dots in perlmodstyle
Father Chrysostomos [Thu, 25 Sep 2014 04:59:58 +0000 (21:59 -0700)]
Consistent spaces after dots in perlmodstyle

8 years agoLong verbatim lines in perlmodstyle
Father Chrysostomos [Thu, 25 Sep 2014 04:52:41 +0000 (21:52 -0700)]
Long verbatim lines in perlmodstyle

8 years agoAdd Ed J to AUTHORS
Father Chrysostomos [Thu, 25 Sep 2014 04:50:53 +0000 (21:50 -0700)]
Add Ed J to AUTHORS

8 years agoperlmod and perlstyle improvements
Ed J [Tue, 16 Sep 2014 06:06:23 +0000 (07:06 +0100)]
perlmod and perlstyle improvements

• Outward links for perlmod
• Tweak perlmodstyle version notes
• Link perlnewmod to perlmodstyle

8 years agoUnify the nok setting for better optimizer chances.
Jarkko Hietaniemi [Thu, 25 Sep 2014 01:17:01 +0000 (21:17 -0400)]
Unify the nok setting for better optimizer chances.

Suggested by bulk88.  Also comment tweaks.

8 years agoperlpolicy: clarify that bans related to RT as well as p5p
Ricardo Signes [Thu, 25 Sep 2014 00:21:17 +0000 (20:21 -0400)]
perlpolicy: clarify that bans related to RT as well as p5p

8 years agoThreaded fix, and logic cleanup.
Jarkko Hietaniemi [Wed, 24 Sep 2014 23:48:13 +0000 (19:48 -0400)]
Threaded fix, and logic cleanup.

8 years agoIf we already know it's infnan, no need to Atof again.
Jarkko Hietaniemi [Wed, 24 Sep 2014 11:29:09 +0000 (07:29 -0400)]
If we already know it's infnan, no need to Atof again.

8 years agoinfnan: more math tests, and make int(infnan) return infnan.
Jarkko Hietaniemi [Wed, 24 Sep 2014 01:04:21 +0000 (21:04 -0400)]
infnan: more math tests, and make int(infnan) return infnan.

Though one could argue int(inf) returning nan, too.
Depends on whether you glare at the "inf" or "int".

8 years agoIncrease $XS::APItest::VERSION to 0.65
Father Chrysostomos [Wed, 24 Sep 2014 07:40:23 +0000 (00:40 -0700)]
Increase $XS::APItest::VERSION to 0.65

8 years agoAdd flags to cv_name; allow unqualified retval
Father Chrysostomos [Wed, 24 Sep 2014 07:37:58 +0000 (00:37 -0700)]
Add flags to cv_name; allow unqualified retval

One of the main purposes of cv_name was to provide a way for CPAN mod-
ules easily to obtain the name of a sub.  As written, it was not
actually sufficient, as some modules, such as Devel::Declare, need an
unqualified name.

So I am breaking compatibility with 5.21.4 (which introduced cv_name,
but is only a dev release) by adding a flags parameter.

8 years agoembed.fnc: cv_name is documented
Father Chrysostomos [Wed, 24 Sep 2014 07:22:29 +0000 (00:22 -0700)]
embed.fnc: cv_name is documented

8 years agoMention Data::Util in perl5220delta
Father Chrysostomos [Wed, 24 Sep 2014 02:57:29 +0000 (19:57 -0700)]
Mention Data::Util in perl5220delta

so that ticket #122834 can be closed.

8 years agoVMS does not have lc_monetary_2008 items in lconv.
Craig A. Berry [Wed, 24 Sep 2014 03:12:27 +0000 (22:12 -0500)]
VMS does not have lc_monetary_2008 items in lconv.

8 years agoperldelta: reword prev. commit’s entry for clarity
Father Chrysostomos [Wed, 24 Sep 2014 01:06:19 +0000 (18:06 -0700)]
perldelta: reword prev. commit’s entry for clarity

8 years agooptimize pp_length for simple PVs
Daniel Dragan [Tue, 23 Sep 2014 22:19:32 +0000 (18:19 -0400)]
optimize pp_length for simple PVs

Previously in pp_length, for non-magic, non-utf8 PVs, a number of
conditional branches based on bitfield testing had to execute, and finally
the length of a non-utf8 SVPV was fetched with sv_len_utf8_nomg.
sv_len_utf8_nomg checks SvUTF8, and if false, use the len from
SvPV_nomg_const call in sv_len_utf8_nomg. Note in pp_length,
SvPV_nomg_const already exists for the "use bytes" branch.

After this patch, a !SvGMAGICAL && (!SvUTF8  || use_bytes) SV will take
only 1 conditional branch and no func calls before reaching sv_setiv.
svflags is reused for the mg_get test since partially masked svflags will
already be in a register vs fetching the whole flags from SV head again.

SETS(TARG) was factored out from all the SETI/SETTARG macros. If targ is
not set/written to (the PL_sv_undef branch), do not check/call for
set magic on it, just return from the opcode. Also a putback was removed
since the operand SV is replaced inplace on Perl stack with a SV with IV
length in it.

For profiling info, profiling stats, and rejected implementations see
[perl #122835]

8 years agoMake pack-as-int/sprintf-%c-ing/chr-ring inf/nan fatal.
Jarkko Hietaniemi [Tue, 23 Sep 2014 17:41:08 +0000 (13:41 -0400)]
Make pack-as-int/sprintf-%c-ing/chr-ring inf/nan fatal.

In pack: No point in trying to return all-bit-off/all-bits-one
because inf/-inf/nan really don't map sensibly into integers.

In printf-%c/chr: while U+FFFD would be an option, better to die
on such weird input.

pack-as-fp still works, sprintf-numeric still works.

Make t/op/infnan.t to be less fragile about the number of expected tests.

8 years agoTighter space allocation for floating point stringify.
Jarkko Hietaniemi [Tue, 23 Sep 2014 20:07:21 +0000 (16:07 -0400)]
Tighter space allocation for floating point stringify.

8 years agogv.h: Use PERL_BITFIELD32 for the bitfield
Father Chrysostomos [Tue, 23 Sep 2014 20:09:13 +0000 (13:09 -0700)]
gv.h: Use PERL_BITFIELD32 for the bitfield

See <https://rt.perl.org/Ticket/Display.html?id=15667#txn-1310207>.

8 years agoinfnan: set POK for inf/nan, and don't use ~50 PV bytes for inf/nan.
Jarkko Hietaniemi [Tue, 23 Sep 2014 15:27:42 +0000 (11:27 -0400)]
infnan: set POK for inf/nan, and don't use ~50 PV bytes for inf/nan.

8 years agoOPpLVAL_INTRO: not used by pos substr vec
David Mitchell [Tue, 23 Sep 2014 15:44:43 +0000 (16:44 +0100)]
OPpLVAL_INTRO: not used by pos substr vec

These three ops apparently don't use this private flag, so mark them as
such. Also add a comment explaining what OPpLVAL_INTRO means.

8 years agoConsistent spaces after dots in perlop
Father Chrysostomos [Tue, 23 Sep 2014 05:47:55 +0000 (22:47 -0700)]
Consistent spaces after dots in perlop

8 years agoAdd GPFLAGS and GPf_* to B
Father Chrysostomos [Tue, 23 Sep 2014 05:09:34 +0000 (22:09 -0700)]
Add GPFLAGS and GPf_* to B

8 years agoAIX doesn't set the length in getsockopt.
Jarkko Hietaniemi [Tue, 23 Sep 2014 12:17:47 +0000 (08:17 -0400)]
AIX doesn't set the length in getsockopt.

[perl #120835] and [rt #91183] and [rt #85570]

Seen errors in blead smoke in AIX 6.1:

cpan/IO-Socket-IP/t/18fdopen .................................. Argument
"\0\0\0^A\0\0\0r\0\0\0\0\0\0\0\0?M-^U\0\0M-^E^[^???\0^N\0..." isn't
numeric in numeric eq (==) at ../../lib/IO/Socket/IP.pm line 748.

cpan/IO-Socket-IP/t/31nonblocking-connect-internet ............ Argument
"\0\0\0\0\0\0\0\0?\0\n^B1?\0\0\0^B\0^BM-\rf?^H?\0^N\0^B?|..." isn't
numeric in scalar assignment at ../../lib/IO/Socket/IP.pm line 707.

8 years agoAvoid mixing Inf/NaN with IV/UV.
Jarkko Hietaniemi [Tue, 23 Sep 2014 01:37:38 +0000 (21:37 -0400)]
Avoid mixing Inf/NaN with IV/UV.

It really makes no sense to ask what's the IV/UV of this Inf/NaN,
or turn on the IOK/UV flags (private or public).

8 years agoMove the VC6 "broken-nan" define from win32.h to perl.h.
Jarkko Hietaniemi [Tue, 23 Sep 2014 01:18:28 +0000 (21:18 -0400)]
Move the VC6 "broken-nan" define from win32.h to perl.h.

8 years agot/re/speed.t: adjust watchdog timeout
David Mitchell [Tue, 23 Sep 2014 09:18:05 +0000 (10:18 +0100)]
t/re/speed.t: adjust watchdog timeout

Thus is based on measuring it on a raspberry pi, which is about the
slowest thing on earth.

8 years agoIncrease $B::VERSION to 1.52
Father Chrysostomos [Tue, 23 Sep 2014 04:56:15 +0000 (21:56 -0700)]
Increase $B::VERSION to 1.52

8 years agoStop flip from returning the same scalar each time
Father Chrysostomos [Tue, 23 Sep 2014 04:48:48 +0000 (21:48 -0700)]
Stop flip from returning the same scalar each time

sub f {
  for my $n (1..5) {
    my $x = \scalar($n == 2 .. $n == 4);
    $_ = $x if $n == 1;
    print "$n: $$_\n";
  }
  print("-----\n"), f() if @_
}
f(1);

Output:

1:
2: 1
3: 2
4: 3E0
5:
-----
1:
2:
3:
4:
5:

When f() is called, it evaluates a flipflop five times.  It takes a
reference to the return value the first time, and prints that same
scalar for each iteration.

Notice how the very same scalar is returned each time in the outer sub
call, but the recursive call hides that implementation detail.

.. should not be returning the same scalar each time, or at least that
implementation detail should not leak through.  (Most operators do
reuse the same scalar, but the scalar is flagged such that \ will copy
it, hiding that fact.)

This was happening because of the eccentric way that the flipflop
targets are allocated in the pad.  They are allocated as PADMY (i.e.,
like ‘my’ variables), but without a name.  pad_push (which creates a
new pad for recursion) assumes that anything without a name is PADTMP
instead (copy on reference).  So the recursive call behaves correctly.

I am not sure why the targets were allocated with PADMY to begin with.
(This goes back to perl 5.000.)  But now the PADMY prevents the tar-
gets from being shared with other ops under USE_PAD_RESET builds.

The better way to allocate these targets is to use PADMY as before,
but actually give those slots names.  The target that gets returned
needs to be marked PADTMP, so we also need to copy that flag
in pad_push.

8 years agogv.h: Make gp_line and gp_flags into a bitfield
Father Chrysostomos [Tue, 23 Sep 2014 04:45:26 +0000 (21:45 -0700)]
gv.h: Make gp_line and gp_flags into a bitfield

This reduces the allocated size on Windows, where an
extra header is added to what gets allocated.  See
<https://rt.perl.org/Ticket/Display.html?id=15667#txn-1309657>.

8 years agoPeek.t: Drop 5.8 support
Father Chrysostomos [Mon, 22 Sep 2014 15:31:09 +0000 (08:31 -0700)]
Peek.t: Drop 5.8 support

There is no reason these tests need to run on such an old version
any more, and this is getting in the way of something I am trying
to do.

8 years agoPOSIX math: add todo about the macro interface emulations.
Jarkko Hietaniemi [Mon, 22 Sep 2014 13:25:42 +0000 (09:25 -0400)]
POSIX math: add todo about the macro interface emulations.

8 years agoFurther tweaking for bad skip() usage.
Jarkko Hietaniemi [Mon, 22 Sep 2014 18:51:01 +0000 (14:51 -0400)]
Further tweaking for bad skip() usage.

See also e96513a2.

8 years agoNo point in pack 'w' for inf/nan.
Jarkko Hietaniemi [Mon, 22 Sep 2014 01:53:24 +0000 (21:53 -0400)]
No point in pack 'w' for inf/nan.

(For inf, the existing code already did this, slowly.)

8 years agoPATCH: [perl #122252] international currency formatting (POSIX.1-2008)
Andrew Fresh [Wed, 9 Jul 2014 10:30:00 +0000 (03:30 -0700)]
PATCH: [perl #122252] international currency formatting (POSIX.1-2008)

Add the new portions of locale currency formatting that are specified in
POSIX.1-2008

The commiter (Karl Williamson) made the trivial indentation changes
asked for by H. Merijn Brand, and added a perldelta entry

8 years agoglobvar.sym: include PL_ prefix in names
David Mitchell [Mon, 22 Sep 2014 15:20:18 +0000 (16:20 +0100)]
globvar.sym: include PL_ prefix in names

By prepending 'PL_' to each line in globvar.sym, it
a) makes makedef.pl slightly simpler,
b) makes it easier to spot all usage of a particular var when you
   do 'git grep PL_foo'

8 years agocreate t/re/speed.t, t/re/speed_thr.t
David Mitchell [Mon, 22 Sep 2014 14:57:52 +0000 (15:57 +0100)]
create t/re/speed.t,  t/re/speed_thr.t

Some tests in re/pat.t are specifically expected to run very slowly if
certain optimisations break.

Move them into their own test file, along with a watchdog()

(There are probably some more tests that could be moved, but these are
the ones I'm aware of, principally because I wrote them.)

8 years agoSvFLAGS: informally reserve a bit
David Mitchell [Mon, 22 Sep 2014 14:19:50 +0000 (15:19 +0100)]
SvFLAGS: informally reserve a bit

SvFAKE is currently unused on HVs, so I'm marking it as mine.
Hopefully it will eventually get used for vtables on HVs.

I've also improved the description of SVs_TEMP.

8 years agoFix distclean for "pm_to_blib directly" extensions.
Craig A. Berry [Sun, 21 Sep 2014 22:36:27 +0000 (17:36 -0500)]
Fix distclean for "pm_to_blib directly" extensions.

The values of the %pm hash already have ../../ prepended, so we
were trying to remove, for example, ../../../../lib/Exporter.pm
instead of ../../lib/Exporter.pm.

This fixes [perl #122820] wherein it was reported that a distclean
make left some build products under lib/.

8 years agoMissing "by" noticed by James Keenan.
Jarkko Hietaniemi [Mon, 22 Sep 2014 01:17:11 +0000 (21:17 -0400)]
Missing "by" noticed by James Keenan.

8 years agoNo re module if only miniperl built.
Jarkko Hietaniemi [Sun, 21 Sep 2014 23:01:22 +0000 (19:01 -0400)]
No re module if only miniperl built.

8 years agoHook::LexWrap is a valid pod link
Father Chrysostomos [Mon, 22 Sep 2014 00:21:56 +0000 (17:21 -0700)]
Hook::LexWrap is a valid pod link

8 years agoMention Hook::LexWrap in perl5220delta
Father Chrysostomos [Mon, 22 Sep 2014 00:20:59 +0000 (17:20 -0700)]
Mention Hook::LexWrap in perl5220delta

so that I can close the RT ticket (#122757).

8 years agoregen pod issues
Father Chrysostomos [Mon, 22 Sep 2014 00:17:34 +0000 (17:17 -0700)]
regen pod issues

In this case it’s fine for both to have the same title, since only
one gets installed.

8 years agoAdd perl5220delta.pod to Porting/
Father Chrysostomos [Sun, 21 Sep 2014 23:19:47 +0000 (16:19 -0700)]
Add perl5220delta.pod to Porting/

Just the template so far.  This gives us a place to accumulate a list
of broken modules (under Known Problems).

8 years agopp.h: Remove SETsv and SETsvUN
Father Chrysostomos [Sun, 21 Sep 2014 19:52:59 +0000 (12:52 -0700)]
pp.h: Remove SETsv and SETsvUN

With commit 6f1401dc2a, most of the old overload macros stopped being
used.  d4f7673c78 removed them.  SETsv and SETsvUN were only used
by the removed macros, and are now completetly unused in core
and on CPAN.

8 years agoComments on unpack 'D' and long doubles formats.
Jarkko Hietaniemi [Sun, 21 Sep 2014 20:17:06 +0000 (16:17 -0400)]
Comments on unpack 'D' and long doubles formats.

8 years agoConsistent spaces after dots in perlapi
Father Chrysostomos [Sun, 21 Sep 2014 07:29:09 +0000 (00:29 -0700)]
Consistent spaces after dots in perlapi

8 years agoGuard against bad skip() arguments, swapped (15ed07b0) or extra.
Jarkko Hietaniemi [Sun, 21 Sep 2014 00:41:31 +0000 (20:41 -0400)]
Guard against bad skip() arguments, swapped (15ed07b0) or extra.

8 years agoNegation of "-e1" no more todo.
Jarkko Hietaniemi [Sat, 20 Sep 2014 22:38:10 +0000 (18:38 -0400)]
Negation of "-e1" no more todo.

8 years agoFix -"-e1".
Jarkko Hietaniemi [Sat, 20 Sep 2014 23:45:35 +0000 (19:45 -0400)]
Fix -"-e1".

Was broken by ae776a2c.

8 years agoThe number to skip is the second argument to skip().
Craig A. Berry [Sat, 20 Sep 2014 23:01:58 +0000 (18:01 -0500)]
The number to skip is the second argument to skip().

Which is difficult to remember and impossible to verify if you
aren't actually skipping anything.

8 years agoOn VC6 (broken NaN compare) redefine Perl_isinf.
Jarkko Hietaniemi [Sat, 20 Sep 2014 17:45:20 +0000 (13:45 -0400)]
On VC6 (broken NaN compare) redefine Perl_isinf.

So that it works with NaN, by not using the comparison version of
Perl_isinf.  A little messy but since win32/win32.h is included so
late in perl.h, cannot be done earlier with the other Perl_isinf
logic.  Partially reverts 128eeacb.

8 years agonegate.t: To-do tests for -"-e1"
Father Chrysostomos [Sat, 20 Sep 2014 19:47:37 +0000 (12:47 -0700)]
negate.t: To-do tests for -"-e1"

broken between 5.21.3 and 5.21.4.

8 years agoFix NaN double to long double conversion on VMS.
Craig A. Berry [Sat, 20 Sep 2014 15:40:35 +0000 (10:40 -0500)]
Fix NaN double to long double conversion on VMS.

Promotion from double to long double on VMS is apparently done via
the math routine OTS$CVT_FLOAT_T_X, which seems to do the right
thing for ordinary values, infinities, and signaling NaNs.  But
for quiet NaNs (and only on Itanium, not Alpha) it produces a
negative infinity rather than a NaN.  Oops.

So hack around that by detecting NaN in the double and explicitly
setting it in the long double.  We can't use NV_NAN because this
is the code path in Perl_sv_vcatpvfn_flags where we have not
configured long doubles but are using the "fv" long double to format
output.

8 years agoDowngrade the optimization of regcomp.c on mips and mipsel due to a gcc-4.9 bug
Niko Tyni [Tue, 8 Jul 2014 20:04:30 +0000 (23:04 +0300)]
Downgrade the optimization of regcomp.c on mips and mipsel due to a gcc-4.9 bug

  % cat ~/t.pl
  print ( (q{foo'} =~ /[^']+'/) ?  "ok\n" : "not ok\n" );
  % perl ~/t.pl
  ok
  % ./miniperl ~/t.pl
  not ok

This only happens with -fPIC -ftree-vrp builds.
It is a regression from gcc-4.8.

Bug-Debian: http://bugs.debian.org/754054
Patch-Name: debian/regcomp-mips-optim.diff

8 years agoregen pod issues
Father Chrysostomos [Sat, 20 Sep 2014 16:53:00 +0000 (09:53 -0700)]
regen pod issues

8 years agoYet more Peek.t fix-ups
Father Chrysostomos [Sat, 20 Sep 2014 16:50:34 +0000 (09:50 -0700)]
Yet more Peek.t fix-ups

8 years agoPeek.t: This read-only stuff came after 5.21.4
Father Chrysostomos [Sat, 20 Sep 2014 16:29:25 +0000 (09:29 -0700)]
Peek.t: This read-only stuff came after 5.21.4

8 years agoFix read-only flag checks in lvalue sub exit
Father Chrysostomos [Sat, 20 Sep 2014 13:55:39 +0000 (06:55 -0700)]
Fix read-only flag checks in lvalue sub exit

See the previous commit for the explanation.  This fixes this
discrepancy:

$ ./miniperl -Ilib -e '+sub:lvalue{my $x = 3; Internals::SvREADONLY $x, 1; $x }->() = 3'
Can't return a readonly value from lvalue subroutine at -e line 1.
$ ./miniperl -Ilib -e '+sub:lvalue{my $x = *foo; Internals::SvREADONLY $x, 1; $x }->() = 3'
Modification of a read-only value attempted at -e line 1.

It was not just a flag check that this commit fixed, but also a bogus
SvREADONLY(TOPs) where TOPs may not even be the scalar we are dying
for, giving ‘a temporary’ for some read-only values.  That mistake was
my own, made in commit d25b0d7b8.

8 years ago[perl #115254] Fix flag check on scope exit
Father Chrysostomos [Sat, 20 Sep 2014 13:41:29 +0000 (06:41 -0700)]
[perl #115254] Fix flag check on scope exit

$ ./perl -Ilib -e '{ my $x = 3; Internals::SvREADONLY $x, 1; () }'
$ ./perl -Ilib -e '{ my $x = ${qr//}; Internals::SvREADONLY $x, 1; () }'
Modification of a read-only value attempted at -e line 1.

The latter causes $x to be marked FAKE.  At the time this code was
introduced in scope.c, read-only+fake meant cow, so the !fake check
was necessary.  (That said, it has always behaved incorrectly for glob
copies that are also marked fake.)

8 years agoMore Peek.t fix-ups
Father Chrysostomos [Sat, 20 Sep 2014 13:33:14 +0000 (06:33 -0700)]
More Peek.t fix-ups

8 years agoImplement the bipolar read-only system
Father Chrysostomos [Sat, 20 Sep 2014 06:12:48 +0000 (23:12 -0700)]
Implement the bipolar read-only system

This fixes bugs related to Hash::Util::unlock accidentally unlocking
internal scalars (e.g., that returned by undef()) and allowing them to
be modified.

Internal read-only values are now marked by two flags, the regular
read-only flag, and the new ‘protected’ flag.

Before this SvREADONLY served two purposes:

1) The code would use it to protect things that must not be modi-
   fied, ever (except when the core sees fit to do so).
2) Hash::Util and everybody else would use it to make this unmodifia-
   ble temporarily when requested by the user.

Internals::SvREADONLY serves the latter purpose and only flips the
read-only flag, so things that need to stay read-only will remain so,
because of the ‘other’ read-only flag, that CPAN doesn’t know about.
(If you are a CPAN author, do not read this.)

8 years agoAdd SVf_PROTECT
Father Chrysostomos [Sat, 20 Sep 2014 05:23:22 +0000 (22:23 -0700)]
Add SVf_PROTECT

8 years agoPeek.t fix-up
Father Chrysostomos [Sat, 20 Sep 2014 05:18:14 +0000 (22:18 -0700)]
Peek.t fix-up

8 years agoRenumber SVf_IsCOW
Father Chrysostomos [Sat, 20 Sep 2014 04:48:27 +0000 (21:48 -0700)]
Renumber SVf_IsCOW

and free up a bit.

8 years agoRevert "Revert "infnan: more tests.""
Father Chrysostomos [Sat, 20 Sep 2014 16:23:30 +0000 (09:23 -0700)]
Revert "Revert "infnan: more tests.""

This reverts commit af9a438112f49d9f3c6920ffd2c7dc4dd0a24d8d (q.v.)
as planned.

8 years ago[perl #121983] #error with ro ops and no threads
Father Chrysostomos [Sat, 20 Sep 2014 07:43:28 +0000 (00:43 -0700)]
[perl #121983] #error with ro ops and no threads

PERL_DEBUG_READONLY_OPS is designed to catch modifications of op trees
at run time, to make sure that perl is doing things safely under
threads.  (Op trees are shared between threads.)

On non-threaded perls, ops are modified regularly, which is perfectly
safe, so PERL_DEBUG_READONLY_OPS does not make any sense, and is guar-
anteed to crash.

Forcing a compilation error with cpp directives makes it obvious that
it is not intended for this PERL_DEBUG_READONLY_OPS mode to work with-
out USE_ITHREADS.

8 years ago[perl #122799] Always turn off CvNAMED in cvgv-set
Father Chrysostomos [Sat, 20 Sep 2014 05:15:52 +0000 (22:15 -0700)]
[perl #122799] Always turn off CvNAMED in cvgv-set

Instead of turning off the flag only when we need to turn it off
(when there is a hek, which is the only time it should be on), just
turn it off unconditionally.

This gets Scope::Upper working once more.

While it is arguably the module’s fault, it’s still a good idea to
make cvgv_set robust.  CvNAMED should never be on after calling it,
regardless of the previous state of the CV.

8 years agoPerl_scalarvoid remove duplicate SvNV call
Daniel Dragan [Fri, 19 Sep 2014 21:44:07 +0000 (17:44 -0400)]
Perl_scalarvoid remove duplicate SvNV call

8 years agomore factoring out in S_utf8_mg_pos_cache_update
Daniel Dragan [Fri, 19 Sep 2014 21:43:11 +0000 (17:43 -0400)]
more factoring out in S_utf8_mg_pos_cache_update

Flip the inputs to keep_earlier, this way one 1 copy of the keep_earlier
three way square exists in machine code. Removing the float casts would
make the calculation more efficient since truncating precsion asm op dont
have to happen after every calculation but I'm not sure about side effects.
Float casts are from commit ab455f6077 with no background provided.

8 years agofactor out more in S_utf8_mg_pos_cache_update
Daniel Dragan [Fri, 19 Sep 2014 00:33:22 +0000 (20:33 -0400)]
factor out more in S_utf8_mg_pos_cache_update

8 years agofactor out FP heavy code in utf8_mg_pos_cache_update
Daniel Dragan [Fri, 19 Sep 2014 00:32:20 +0000 (20:32 -0400)]
factor out FP heavy code in utf8_mg_pos_cache_update

Visual C 2003 and 6 couldn't factor this FP math heavy expression out
with -O1, and it appeared twice in machine code, so do it by hand.

8 years agoPrepare Module::CoreList for 5.21.5, expected on 2014-10-20
Steve Hay [Sat, 20 Sep 2014 14:37:37 +0000 (15:37 +0100)]
Prepare Module::CoreList for 5.21.5, expected on 2014-10-20

8 years agoModule::CoreList 5.20140920 is now on CPAN
Steve Hay [Sat, 20 Sep 2014 14:32:57 +0000 (15:32 +0100)]
Module::CoreList 5.20140920 is now on CPAN

8 years agoRegen B::Op_private for 5.21.5
Steve Hay [Sat, 20 Sep 2014 14:31:15 +0000 (15:31 +0100)]
Regen B::Op_private for 5.21.5

8 years agoBump version to 5.21.5
Steve Hay [Sat, 20 Sep 2014 14:01:41 +0000 (15:01 +0100)]
Bump version to 5.21.5

8 years agoCreate new perldelta for 5.21.5
Steve Hay [Sat, 20 Sep 2014 13:55:13 +0000 (14:55 +0100)]
Create new perldelta for 5.21.5

8 years agoAdd epigraph for 5.12.4
Steve Hay [Sat, 20 Sep 2014 13:48:07 +0000 (14:48 +0100)]
Add epigraph for 5.12.4

8 years agoPerl 5.21.4 today v5.21.4
Steve Hay [Sat, 20 Sep 2014 10:03:38 +0000 (11:03 +0100)]
Perl 5.21.4 today

8 years agoFinalize perldelta
Steve Hay [Sat, 20 Sep 2014 09:59:59 +0000 (10:59 +0100)]
Finalize perldelta

8 years agoUpdate Module::CoreList for 5.21.4
Steve Hay [Sat, 20 Sep 2014 09:45:49 +0000 (10:45 +0100)]
Update Module::CoreList for 5.21.4

8 years agoBlead is in sync with Data::Dumper 2.154
Steve Hay [Sat, 20 Sep 2014 09:28:18 +0000 (10:28 +0100)]
Blead is in sync with Data::Dumper 2.154

8 years agoDisable libquadmath in configure.com.
Craig A. Berry [Sat, 20 Sep 2014 02:13:54 +0000 (21:13 -0500)]
Disable libquadmath in configure.com.

It can't reasonably be a configuration option since there is no
special library needed (or available) to do 128-bit doubles.

Also, we can't set the default of a configure variable to "n" unless
it's the default answer to a question we ask; the compiler
understands "#define" and "#undef" but not "#n".

8 years agoRevert "infnan: more tests."
Jarkko Hietaniemi [Sat, 20 Sep 2014 02:01:32 +0000 (22:01 -0400)]
Revert "infnan: more tests."

This reverts commit 5d288d736c2758c27a5943647f4a524f0e93a642.

So that Steve Hay can enjoy a fail-free VC6 build for 5.21.4.

After the release, let's revert this revert, and return to
punishing ourselves with VC6.