This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
9 years ago[Merge] CVs without GVs
Father Chrysostomos [Mon, 15 Sep 2014 13:20:16 +0000 (06:20 -0700)]
[Merge] CVs without GVs

Subroutines in packages no longer need typeglobs to live in.  Concep-
tually the typeglobs still exist, and will be reified as necessary.

(This was already the case with constant subs, which could be stored
in the stash as refs to constants, but now the stash can have sub
refs, too.)

Currently this optimisation is undone if a sub is exported or used as
a method.  Also, it does not apply to XSUBs.

Here is the full list of notable changes:

Internal:

• CvGV now reifies the GV if necessary.
• Lexical subs now have notional GVs, which are likewise rei-
  fied by CvGV.
• The new CVf_LEXICAL flag indicates that the package name should be
  dropped in error messages.

XS API:

• New cv_name function
• New cv_set_call_checker_flags function

Perl-visible changes:

• New B::safename function

9 years agoconcise-xs.t needs to know about B::safename
Father Chrysostomos [Sat, 13 Sep 2014 03:26:04 +0000 (20:26 -0700)]
concise-xs.t needs to know about B::safename

9 years agoTweak Peek.t again
Father Chrysostomos [Fri, 12 Sep 2014 21:14:07 +0000 (14:14 -0700)]
Tweak Peek.t again

9 years agodump.c: Missing comma from CVf_HASEVAL output
Father Chrysostomos [Fri, 12 Sep 2014 20:40:41 +0000 (13:40 -0700)]
dump.c: Missing comma from CVf_HASEVAL output

9 years agoTeach Deparse about coderefs in stashes
Father Chrysostomos [Fri, 12 Sep 2014 20:38:23 +0000 (13:38 -0700)]
Teach Deparse about coderefs in stashes

9 years agoIncrease $B::VERSION to 1.51
Father Chrysostomos [Fri, 12 Sep 2014 20:33:55 +0000 (13:33 -0700)]
Increase $B::VERSION to 1.51

9 years agoAdd safename() func to B
Father Chrysostomos [Fri, 12 Sep 2014 20:33:29 +0000 (13:33 -0700)]
Add safename() func to B

9 years agoRemove no-longer-used op.c:S_gv_ename
Father Chrysostomos [Fri, 12 Sep 2014 06:53:36 +0000 (23:53 -0700)]
Remove no-longer-used op.c:S_gv_ename

9 years agoTeach ck_entersub_args_proto about non-GV names
Father Chrysostomos [Fri, 12 Sep 2014 06:52:41 +0000 (23:52 -0700)]
Teach ck_entersub_args_proto about non-GV names

Now ck_subr no longer needs to vivify GVs:

$ ./miniperl -e 'sub foo{} BEGIN { warn $::{foo} } foo(); BEGIN { warn $::{foo} }'
CODE(0x7fc98282ad98) at -e line 1.
CODE(0x7fc98282ad98) at -e line 1.

Previously it was like this:

$ ./miniperl -e 'sub foo{} BEGIN { warn $::{foo} } foo(); BEGIN { warn $::{foo} }'
CODE(0x7f8ef082ad98) at -e line 1.
*main::foo at -e line 1.

9 years agoInline op.c:too_many_arguments_sv into its only caller
Father Chrysostomos [Fri, 12 Sep 2014 06:44:45 +0000 (23:44 -0700)]
Inline op.c:too_many_arguments_sv into its only caller

I’m about to change this code anyway, and it’s easier in one spot.

9 years agoInline op.c:too_few_arguments_sv into its only caller
Father Chrysostomos [Fri, 12 Sep 2014 06:42:45 +0000 (23:42 -0700)]
Inline op.c:too_few_arguments_sv into its only caller

I’m about to change this code anyway, and it’s easier in one spot.

9 years agoTeach dump.c about CVf_LEXICAL
Father Chrysostomos [Fri, 12 Sep 2014 05:49:44 +0000 (22:49 -0700)]
Teach dump.c about CVf_LEXICAL

9 years agoTeach dump.c about CVf_NAMED
Father Chrysostomos [Fri, 12 Sep 2014 05:49:18 +0000 (22:49 -0700)]
Teach dump.c about CVf_NAMED

I should have added this in perl 5.18.

9 years agoop.c:ck_subr: reify GVs based on call checker
Father Chrysostomos [Fri, 12 Sep 2014 00:59:11 +0000 (17:59 -0700)]
op.c:ck_subr: reify GVs based on call checker

Instead of faking up a GV to pass to the call checker if we have a
lexical sub, just get the GV from CvGV (since that will reify the GV,
even for lexical subs), unless the call checker has not specifically
requested GVs.

For now, we assume the default call checker cannot handle non-GV sub
names, as indeed it cannot.  An imminent commit will rectify that.

The code in scope.c was getting the name hek from the proto CV (stowed
in magic on the pad name) if the CV in the pad had lost it.  Now, the
proto CV can lose it at compile time via CvGV, so that does not work
anymore.  Instead, just get it from the GV.

9 years agoUse cv_name in pp_hot.c:sub_crush_depth
Father Chrysostomos [Fri, 12 Sep 2014 05:53:42 +0000 (22:53 -0700)]
Use cv_name in pp_hot.c:sub_crush_depth

The next commit will allow lexical subs with GVs to reach this code
path, so use cv_name, since it knows how to handle those.

9 years agoAdd cv_set_call_checker_flags
Father Chrysostomos [Thu, 11 Sep 2014 20:37:15 +0000 (13:37 -0700)]
Add cv_set_call_checker_flags

This is like cv_set_call_checker, except that it allows the caller to
decide whether the call checker needs a GV.

Currently the GV flag is recorded, but ck_subr does not do anything
with it yet.

9 years agopad.c: Avoid struct name followed by colon
Father Chrysostomos [Thu, 11 Sep 2014 05:06:10 +0000 (22:06 -0700)]
pad.c: Avoid struct name followed by colon

Some old clang++ versions have trouble with this.  See ticket #112786.

9 years agopad.c:cv_name: Reword docs for future extensibility
Father Chrysostomos [Thu, 11 Sep 2014 05:01:15 +0000 (22:01 -0700)]
pad.c:cv_name: Reword docs for future extensibility

9 years agoAvoid reifying GVs in rv2cv
Father Chrysostomos [Thu, 11 Sep 2014 03:29:19 +0000 (20:29 -0700)]
Avoid reifying GVs in rv2cv

\&foo no longer reifies GVs in the stash:

$ ./miniperl -e 'sub foo{} warn $::{foo}; \&foo; warn $::{foo}'
CODE(0x7fab6282ad98) at -e line 1.
CODE(0x7fab6282ad98) at -e line 1.

Sub calls still reify them though, because of the way ck_subr cur-
rently works.

Constant proxies are still upgraded to full GVs for now, just to mini-
mise the churn per patch.

This makes it possible for OP_GVs to point to things other than GVs,
and these things are stored in the pad under threads.  Hence, pad_tidy
could turn on PADTMP, and then IS_PADGV becomes true when it is
upgraded to a glob, so refgen will fail assertions.  There is actually
no need to turn on PADTMP in pad_tidy, since it will already be on for
op targets.  (We need to get rid of IS_PADGV one of these days.  It
doesn’t actually do anything.)

9 years agoop.c: ck_rvconst: Inline the noexpand var
Father Chrysostomos [Wed, 10 Sep 2014 21:23:53 +0000 (14:23 -0700)]
op.c: ck_rvconst: Inline the noexpand var

It is only used once now, and its name is about to become confusing,
as GV_NOEXPAND will be used for all CVs.

9 years agoIncrease $Attribute::Handlers::VERSION to 0.97
Father Chrysostomos [Sun, 7 Sep 2014 05:59:36 +0000 (22:59 -0700)]
Increase $Attribute::Handlers::VERSION to 0.97

9 years agoTweak Peek.t
Father Chrysostomos [Sat, 6 Sep 2014 23:22:53 +0000 (16:22 -0700)]
Tweak Peek.t

beab08741 introduced XSUB constants, but the code it added to
newATTRSUB does not set CvSTASH if there is already a CV stub.  It
does set it if there is no sub there at all (because it goes through
newCONSTSUB).

Recent changes have made constant declarations like ‘sub foo(){}’
put just a constant reference in the stash if possible, the way con-
stant.pm does.  When this gets upgraded to a typeglob, the CV is rei-
fied via newCONSTSUB, so it gets a CvSTASH pointer.

CvSTASH on a constant sub really makes no difference in practice.
It’s mostly cosmetic.

This exercises the two code paths with the oldest perl installa-
tion I have:

$ /opt/bin/perl5.8.8 -MDevel::Peek -e 'BEGIN{\&foo} sub foo(){3} Dump \&foo'
SV = RV(0x9baa18) at 0x98d580
  REFCNT = 1
  FLAGS = (TEMP,ROK)
  RV = 0x9b7398
  SV = PVCV(0x9b4810) at 0x9b7398
    REFCNT = 2
    FLAGS = (POK,pPOK,CONST)
    IV = 0
    NV = 0
    PROTOTYPE = ""
    COMP_STASH = 0x98d4a8 "main" <----------
    ROOT = 0x0
    XSUB = 0x5bb44
    XSUBANY = 10018864
    GVGV::GV = 0x98df7c "main" :: "foo"
    FILE = "-e"
    DEPTH = 0
    FLAGS = 0x200
    OUTSIDE_SEQ = 96
    PADLIST = 0x98e228
    PADNAME = 0x98e24c(0x0) PAD = 0x98e264(0x22d560)
    OUTSIDE = 0x98df34 (UNIQUE)
$ /opt/bin/perl5.8.8 -MDevel::Peek -e 'sub foo(){3} Dump \&foo'
SV = RV(0xc11018) at 0xbe3b80
  REFCNT = 1
  FLAGS = (TEMP,ROK)
  RV = 0xbe4570
  SV = PVCV(0xc0ae10) at 0xbe4570
    REFCNT = 2
    FLAGS = (POK,pPOK,CONST)
    IV = 0
    NV = 0
    PROTOTYPE = ""
    COMP_STASH = 0x0 <--------------------------
    ROOT = 0x0
    XSUB = 0x5bb44
    XSUBANY = 12469628
    GVGV::GV = 0xbe3c40 "main" :: "foo"
    FILE = "-e"
    DEPTH = 0
    FLAGS = 0x200
    OUTSIDE_SEQ = 0
    PADLIST = 0x0
    OUTSIDE = 0x0 (null)

9 years agoFix-ups for Attribute::Handlers
Father Chrysostomos [Sat, 6 Sep 2014 20:09:05 +0000 (13:09 -0700)]
Fix-ups for Attribute::Handlers

It was making unreliable assumptions about the contents of stashes.

9 years agosv.h: Expand comment about potential SVf_UTF8 conflict
Father Chrysostomos [Mon, 1 Sep 2014 01:05:49 +0000 (18:05 -0700)]
sv.h: Expand comment about potential SVf_UTF8 conflict

9 years agoAvoid creating GVs when subs are declared
Father Chrysostomos [Mon, 1 Sep 2014 03:13:21 +0000 (20:13 -0700)]
Avoid creating GVs when subs are declared

This patch changes ‘sub foo {...}’ declarations to store subroutine
references in the stash, to save memory.

Typeglobs still notionally exist.  Accessing CvGV(cv) will reify them.
Hence, currently the savings are lost when a sub call is compiled.

$ ./miniperl -e 'sub foo{} BEGIN { warn $::{foo} } foo(); BEGIN { warn $::{foo} }'
CODE(0x7f8ef082ad98) at -e line 1.
*main::foo at -e line 1.

This optimisation is skipped if the subroutine declaration contains a
package separator.

Concerning the changes in caller.t, this code:

    sub foo { print +(caller(0))[3],"\n" }
    my $fooref = delete $::{foo};
    $fooref -> ();

used to crash in 5.7.3 or thereabouts.  It was fixed by 16658 (aka
07b8c804e8) to produce ‘(unknown)’ instead.  Then in 5.13.3 it was
changed (by 803f274) to produce ‘main::__ANON__’ instead.  So the
tests are really checking that we don’t get a crash.  I think it is
acceptable that it has now changed to ‘main::foo’.

9 years agoRemove bogus gv-handling code from toke.c
Father Chrysostomos [Sun, 7 Sep 2014 05:51:15 +0000 (22:51 -0700)]
Remove bogus gv-handling code from toke.c

This code was added by 211a4342c, which was actually restoring some
code that f74617600 removed.

Its purpose was to expand a proxy to a real GV after we found out that
we really are going to compile a sub call op.

This code is actually unreachable at present (sub call lookup via
rv2cv ops expands stub declarations, but not references to constants;
references to constants are not compiled to sub calls), which is a
good thing, because (1) it does not take UTF8 names into account and
(2) it does not work with rv2cv hooks or our subs, because it assumes
that the value of PL_tokenbuf is normative and can be used to
reify a glob.

9 years agoFor lexical subs, reify CvGV from CvSTASH and CvNAME_HEK
Father Chrysostomos [Fri, 29 Aug 2014 01:26:36 +0000 (18:26 -0700)]
For lexical subs, reify CvGV from CvSTASH and CvNAME_HEK

From now on, the presence of a name hek implies a GV.  Any access to
CvGV will cause that implicit GV to be reified.

9 years agoIncrease $XS::APItest::VERSION to 0.64
Father Chrysostomos [Fri, 29 Aug 2014 00:40:23 +0000 (17:40 -0700)]
Increase $XS::APItest::VERSION to 0.64

9 years agoTest cv_name
Father Chrysostomos [Fri, 29 Aug 2014 00:39:48 +0000 (17:39 -0700)]
Test cv_name

9 years agopad.c: Document cv_name
Father Chrysostomos [Thu, 28 Aug 2014 23:03:22 +0000 (16:03 -0700)]
pad.c: Document cv_name

9 years agosv_cathek
Father Chrysostomos [Thu, 28 Aug 2014 22:59:05 +0000 (15:59 -0700)]
sv_cathek

This macro, intended for internal use, simplifies the code in
a couple of places.

9 years agocv_name
Father Chrysostomos [Thu, 28 Aug 2014 22:56:30 +0000 (15:56 -0700)]
cv_name

An API function for getting the name of a CV.  Docs to follow.

9 years agoTurn on CVf_LEXICAL for lexical subs
Father Chrysostomos [Fri, 29 Aug 2014 00:37:55 +0000 (17:37 -0700)]
Turn on CVf_LEXICAL for lexical subs

This flag will signify that lexical subs should not have package names
associated with them in error messages, etc.

9 years agoAdd CVf_LEXICAL flag
Father Chrysostomos [Thu, 28 Aug 2014 19:55:56 +0000 (12:55 -0700)]
Add CVf_LEXICAL flag

Lexical subs will use this instead of CvNAMED to indicate that the
name should not include the package.

9 years agoperldelta for d205f0c
Father Chrysostomos [Mon, 15 Sep 2014 01:16:36 +0000 (18:16 -0700)]
perldelta for d205f0c

9 years agoClone lex sub names properly
Father Chrysostomos [Mon, 15 Sep 2014 00:50:11 +0000 (17:50 -0700)]
Clone lex sub names properly

I used share_hek_hek, which is wrong.  HEKs are not shared between
interpreters, so it must be hek_dup.

9 years agoConsistent spaces after dots in perlsub
Father Chrysostomos [Sun, 14 Sep 2014 23:04:17 +0000 (16:04 -0700)]
Consistent spaces after dots in perlsub

9 years agoperldelta for 6678689 and 56cd2ef
Father Chrysostomos [Sun, 14 Sep 2014 19:51:59 +0000 (12:51 -0700)]
perldelta for 6678689 and 56cd2ef

9 years agoperldelta for b4fa55d and 0ddd4a5
Father Chrysostomos [Sun, 14 Sep 2014 19:50:04 +0000 (12:50 -0700)]
perldelta for b4fa55d and 0ddd4a5

9 years agoperldelta for 2c1f00b/#122747
Father Chrysostomos [Sun, 14 Sep 2014 19:43:20 +0000 (12:43 -0700)]
perldelta for 2c1f00b/#122747

9 years agoperldelta for c4c61c6
Father Chrysostomos [Sun, 14 Sep 2014 19:24:46 +0000 (12:24 -0700)]
perldelta for c4c61c6

9 years agoperldelta for 1542cb4/#122728
Father Chrysostomos [Sun, 14 Sep 2014 18:23:52 +0000 (11:23 -0700)]
perldelta for 1542cb4/#122728

9 years agoperldelta for cfc7ef1
Father Chrysostomos [Sun, 14 Sep 2014 15:02:10 +0000 (08:02 -0700)]
perldelta for cfc7ef1

9 years agoDarwin: set ld to 'cc' if $cc is 'cc' or empty, $cc otherwise.
Jarkko Hietaniemi [Sun, 14 Sep 2014 17:28:00 +0000 (13:28 -0400)]
Darwin: set ld to 'cc' if $cc is 'cc' or empty, $cc otherwise.

9 years agoadd test for rt122747
Yves Orton [Sun, 14 Sep 2014 16:55:12 +0000 (18:55 +0200)]
add test for rt122747

9 years agoshare_hek_hek "return value" is unused here.
Jarkko Hietaniemi [Sun, 14 Sep 2014 13:47:43 +0000 (09:47 -0400)]
share_hek_hek "return value" is unused here.

(noticed by gcc 4.9)

9 years agoDarwin: if cc is explicitly gcc/g++, use it also as ld.
Jarkko Hietaniemi [Sun, 14 Sep 2014 02:06:13 +0000 (22:06 -0400)]
Darwin: if cc is explicitly gcc/g++, use it also as ld.

9 years agoDefine Perl_isfinite only if not already defined.
Jarkko Hietaniemi [Sun, 14 Sep 2014 01:13:10 +0000 (21:13 -0400)]
Define Perl_isfinite only if not already defined.

9 years agoperldelta: Entry for [perl #122655].
Karl Williamson [Sun, 14 Sep 2014 15:17:41 +0000 (09:17 -0600)]
perldelta: Entry for [perl #122655].

5.20 regression: '"X" !~ /[x]/i'

It looks like this patch, included in 5.20.1, did not get a perldelta
entry for that release.

9 years agoperldelta: Note bug fix to suppress repeated warnings
Karl Williamson [Sun, 14 Sep 2014 14:53:54 +0000 (08:53 -0600)]
perldelta: Note bug fix to suppress repeated warnings

9 years agoperldelta: Mention -T -B changes
Karl Williamson [Sun, 14 Sep 2014 14:37:37 +0000 (08:37 -0600)]
perldelta: Mention -T -B changes

9 years agoCopy perl5201delta into blead
Steve Hay [Sun, 14 Sep 2014 14:20:36 +0000 (15:20 +0100)]
Copy perl5201delta into blead

9 years agoChanged Module-CoreList version to how it should be
Chris 'BinGOs' Williams [Sun, 14 Sep 2014 14:02:18 +0000 (15:02 +0100)]
Changed Module-CoreList version to how it should be

That's the last time I try and be clever and use a tool to
update versions

9 years agoRemove the corevers.t from Module-CoreList and amend corelist porting test
Chris 'BinGOs' Williams [Sun, 14 Sep 2014 13:53:57 +0000 (14:53 +0100)]
Remove the corevers.t from Module-CoreList and amend corelist porting test

9 years agoBump Module-CoreList versions again
Chris 'BinGOs' Williams [Sun, 14 Sep 2014 13:48:45 +0000 (14:48 +0100)]
Bump Module-CoreList versions again

I've removed all the v5.21.4 data from the release I am going to
make to CPAN, so as not to break blead the version needs bumping
again to a higher version than I am going to release.

9 years agoBump Module-CoreList versions to new date stamped version
Chris 'BinGOs' Williams [Sun, 14 Sep 2014 13:46:00 +0000 (14:46 +0100)]
Bump Module-CoreList versions to new date stamped version

9 years agoAdd epigraph for 5.20.1
Steve Hay [Sun, 14 Sep 2014 13:26:46 +0000 (14:26 +0100)]
Add epigraph for 5.20.1

9 years agoPerl 5.20.1 today
Steve Hay [Sun, 14 Sep 2014 11:30:17 +0000 (12:30 +0100)]
Perl 5.20.1 today

9 years agoPerl 5.20.1 today
Steve Hay [Sun, 14 Sep 2014 11:30:09 +0000 (12:30 +0100)]
Perl 5.20.1 today

9 years agoUse Perl_frexp, and cast arg to NV as appropriate.
Jarkko Hietaniemi [Sat, 13 Sep 2014 17:02:49 +0000 (13:02 -0400)]
Use Perl_frexp, and cast arg to NV as appropriate.

9 years agoWarning about the va_arg vs long doubles.
Jarkko Hietaniemi [Sat, 13 Sep 2014 15:54:57 +0000 (11:54 -0400)]
Warning about the va_arg vs long doubles.

9 years agoUntangle the fp value retrieval.
Jarkko Hietaniemi [Sat, 13 Sep 2014 01:55:58 +0000 (21:55 -0400)]
Untangle the fp value retrieval.

9 years agoDisable isfinite on VMS.
Craig A. Berry [Sat, 13 Sep 2014 22:24:20 +0000 (17:24 -0500)]
Disable isfinite on VMS.

While the macro exists (in fp.h, not math.h) and it does work on
ordinary doubles, it does not work on long doubles, which is the
only use of it so far in the Perl core.  In Perl_sv_vcatpvfn_flags,
isfinite is testing a long double even when not configured with
long doubles (assuming long doubles are at least available).

So the better part of valor is to say we don't have it and use the
fallback.  Gets t/op/infnan.t #13 passing.

9 years agoObsolete comment in sv.c:utf8_mg_pos_cache_update
Father Chrysostomos [Sat, 13 Sep 2014 19:54:07 +0000 (12:54 -0700)]
Obsolete comment in sv.c:utf8_mg_pos_cache_update

ab8be49d3 added this comment and the SvPOKp check.  Half the comment
is not relevant any more, since we stopped caching UTF8 offsets on
references in commit d91e94e1ac8.  The SvPOKp check is still a good
idea, though.

$ perl5.14.4 -e 'use overload q|""| => sub { "\x{100}" }; $_ = bless[]; $__ = substr $_,0,1; use Devel::Peek; Dump $_'
SV = PVMG(0x7fb2f2856738) at 0x7fb2f283a348
  REFCNT = 1
  FLAGS = (SMG,ROK,UTF8)
  IV = 0
  NV = 0
  RV = 0x7fb2f2806d00
  SV = PVAV(0x7fb2f2807ec0) at 0x7fb2f2806d00
    REFCNT = 1
    FLAGS = (OBJECT,OVERLOAD)
    STASH = 0x7fb2f2806b68 "main"
    ARRAY = 0x0
    FILL = -1
    MAX = -1
    ARYLEN = 0x0
    FLAGS = (REAL)
  PV = 0x7fb2f2806d00 "" [UTF8 ""]
  CUR = 0
  LEN = 0
  MAGIC = 0x7fb2f240f708
    MG_VIRTUAL = &PL_vtbl_utf8
    MG_TYPE = PERL_MAGIC_utf8(w)
    MG_LEN = 1
$ perl5.18.1 -e 'use overload q|""| => sub { "\x{100}" }; $_ = bless[]; $__ = substr $_,0,1; use Devel::Peek; Dump $_'
SV = IV(0x7fc048837c40) at 0x7fc048837c50
  REFCNT = 1
  FLAGS = (ROK,UTF8)
  RV = 0x7fc0488060e8
  SV = PVAV(0x7fc048807e80) at 0x7fc0488060e8
    REFCNT = 1
    FLAGS = (OBJECT)
    STASH = 0x7fc048805f50 "main"
    ARRAY = 0x0
    FILL = -1
    MAX = -1
    ARYLEN = 0x0
    FLAGS = (REAL)

9 years agotoke.c: Remove redundant PL_expect check
Father Chrysostomos [Sat, 13 Sep 2014 19:13:29 +0000 (12:13 -0700)]
toke.c: Remove redundant PL_expect check

PL_expect is only ever XREF when we already know there is an open
brace.  So we would never even get to this code path.

9 years agoUpdate IO-Socket-IP to CPAN version 0.32
Chris 'BinGOs' Williams [Sat, 13 Sep 2014 18:44:08 +0000 (19:44 +0100)]
Update IO-Socket-IP to CPAN version 0.32

  [DELTA]

0.32    2014/09/12 10:11:27
        [CHANGES]
         * Implementation of Timeout for ->connect (RT92075)

9 years agoMake the link not a link.
Jarkko Hietaniemi [Sat, 13 Sep 2014 16:52:12 +0000 (12:52 -0400)]
Make the link not a link.

9 years agoMention inf/nan and POSIX C99 math improvements.
Jarkko Hietaniemi [Sat, 13 Sep 2014 15:32:16 +0000 (11:32 -0400)]
Mention inf/nan and POSIX C99 math improvements.

9 years agoSemicolon before ellipsis inside block disambiguates.
James E Keenan [Sat, 13 Sep 2014 12:51:48 +0000 (08:51 -0400)]
Semicolon before ellipsis inside block disambiguates.

Correct documentation which indicated that, inside a block, a semicolon after
an ellipsis statement would disambiguate between a block and a hash reference
constructor.  The semicolon must precede the ellipsis to perform this
disambiguation.

Add tests to demonstrate that whitespace around the ellipsis statement does
not impeded the disambiguation.  Add perldelta entry.

For: RT #122661

9 years agoAdd perldelta entry for 8a384d3a99 (ParseXS and locales).
James E Keenan [Sat, 13 Sep 2014 13:25:53 +0000 (09:25 -0400)]
Add perldelta entry for 8a384d3a99 (ParseXS and locales).

9 years agoUse HAS_ISFINITE for Perl_isfinitel.
Jarkko Hietaniemi [Sat, 13 Sep 2014 11:57:12 +0000 (07:57 -0400)]
Use HAS_ISFINITE for Perl_isfinitel.

9 years agoHAS_C99 comment tweak.
Jarkko Hietaniemi [Sat, 13 Sep 2014 11:55:27 +0000 (07:55 -0400)]
HAS_C99 comment tweak.

9 years agoNeed to have frexpl for long doubles.
Jarkko Hietaniemi [Sat, 13 Sep 2014 11:38:59 +0000 (07:38 -0400)]
Need to have frexpl for long doubles.

9 years agoconcise-xs.t is overly chummy with B::Deparse
Father Chrysostomos [Sat, 13 Sep 2014 07:09:30 +0000 (00:09 -0700)]
concise-xs.t is overly chummy with B::Deparse

9 years agoIncrease $B::Deparse::VERSION to 1.28
Father Chrysostomos [Fri, 12 Sep 2014 20:38:42 +0000 (13:38 -0700)]
Increase $B::Deparse::VERSION to 1.28

9 years agoDeparse.pm:pp_list: Don’t call $lop->name repeatedly
Father Chrysostomos [Sat, 13 Sep 2014 06:37:28 +0000 (23:37 -0700)]
Deparse.pm:pp_list: Don’t call $lop->name repeatedly

because it’s inefficient.

9 years agoDeparse typed vars
Father Chrysostomos [Sat, 13 Sep 2014 06:35:35 +0000 (23:35 -0700)]
Deparse typed vars

9 years agoDeparse our(LIST) correctly
Father Chrysostomos [Sat, 13 Sep 2014 06:33:57 +0000 (23:33 -0700)]
Deparse our(LIST) correctly

It was coming out like this:

our($main::foo, $main::bar, $main::baz);

9 years agopp_ctl.c: Remove junk from #endif
Father Chrysostomos [Sat, 13 Sep 2014 04:46:05 +0000 (21:46 -0700)]
pp_ctl.c: Remove junk from #endif

What was I thinking?

9 years agoMathomise save_re_context
Father Chrysostomos [Sat, 13 Sep 2014 04:45:33 +0000 (21:45 -0700)]
Mathomise save_re_context

at Jarkko’s suggestion.

9 years agopp_ctl.c: Remove PL_curcop assignment
Father Chrysostomos [Sat, 13 Sep 2014 03:22:27 +0000 (20:22 -0700)]
pp_ctl.c: Remove PL_curcop assignment

This was added years ago in commit 7fb6a879.  Now that save_re_context
does nothing (and die_unwind no longer even calls it), we don’t need to
assign to PL_curcop.  In the case where it matters, that is, the implicit
eval scope that require provides, the values of PL_curcop and oldcop
should always be the same.

9 years agoutf8.c: Move an #ifndef for clarity
Father Chrysostomos [Fri, 12 Sep 2014 23:34:40 +0000 (16:34 -0700)]
utf8.c: Move an #ifndef for clarity

The comment really belongs inside it, as it refers to those two
lines of code.

9 years agoRemove obsolete comment from utf8.c
Father Chrysostomos [Fri, 12 Sep 2014 23:33:54 +0000 (16:33 -0700)]
Remove obsolete comment from utf8.c

The call to save_re_context was removed by the previous commit.  The
commit before that stopped save_re_context from doing anything.

Commit db2c6cb33 stopped the errsv_save line from triggering
get-magic.

So this comment, added in dc0c6abb4, no longer applies.

9 years agoDon’t call save_re_context
Father Chrysostomos [Fri, 12 Sep 2014 23:22:03 +0000 (16:22 -0700)]
Don’t call save_re_context

It is an empty function.

9 years agoGut Perl_save_re_context
Father Chrysostomos [Fri, 12 Sep 2014 22:39:39 +0000 (15:39 -0700)]
Gut Perl_save_re_context

What it does is not longer necessary.  See ticket #122747 and
commits 2c1f00b90 and 7d75537e.

The only CPAN module using this function, XML::Fast, passes its tests
with this change.

9 years agoexpl will not be used if long double is double.
Jarkko Hietaniemi [Fri, 12 Sep 2014 14:45:39 +0000 (10:45 -0400)]
expl will not be used if long double is double.

(found in arm-linux)

9 years agoThe space computation for hexfp was overovershooting.
Jarkko Hietaniemi [Fri, 12 Sep 2014 12:34:07 +0000 (08:34 -0400)]
The space computation for hexfp was overovershooting.

9 years agoComment tweak for HAS_C99.
Jarkko Hietaniemi [Fri, 12 Sep 2014 11:17:01 +0000 (07:17 -0400)]
Comment tweak for HAS_C99.

9 years agoUse the multiplication test instead of the DBL_MAX/LDBL_MAX.
Jarkko Hietaniemi [Fri, 12 Sep 2014 11:24:15 +0000 (07:24 -0400)]
Use the multiplication test instead of the DBL_MAX/LDBL_MAX.

Comparing to decimal float constants feels unclean.

9 years agoPerl_isfinitel should not use the fpclass macross blindly.
Jarkko Hietaniemi [Fri, 12 Sep 2014 11:01:41 +0000 (07:01 -0400)]
Perl_isfinitel should not use the fpclass macross blindly.

(Whether the macros are safe for long doubles, is complicated.)

9 years agoPorting/Maintainers.pl - Tidy up @IGNORABLE
Steve Hay [Fri, 12 Sep 2014 08:26:27 +0000 (09:26 +0100)]
Porting/Maintainers.pl - Tidy up @IGNORABLE

9 years agoScalar-List-Utils has been upgraded from version 1.40 to 1.41
Steve Hay [Fri, 12 Sep 2014 08:23:00 +0000 (09:23 +0100)]
Scalar-List-Utils has been upgraded from version 1.40 to 1.41

This incorporates ca81d15134, which was naughtily not listed as a
CUSTOMIZED file.

9 years agoUpgrade ExtUtils::CBuilder from version 0.280217 to 0.280219
Steve Hay [Fri, 12 Sep 2014 08:22:12 +0000 (09:22 +0100)]
Upgrade ExtUtils::CBuilder from version 0.280217 to 0.280219

9 years agoUpgrade CPAN::Meta::Requirements from version 2.126 to 2.128
Steve Hay [Fri, 12 Sep 2014 08:05:23 +0000 (09:05 +0100)]
Upgrade CPAN::Meta::Requirements from version 2.126 to 2.128

9 years agoMore ways to Perl_isfinitel.
Jarkko Hietaniemi [Fri, 12 Sep 2014 02:41:28 +0000 (22:41 -0400)]
More ways to Perl_isfinitel.

9 years agoUnfinished business from e4c957f4.
Jarkko Hietaniemi [Fri, 12 Sep 2014 02:39:42 +0000 (22:39 -0400)]
Unfinished business from e4c957f4.

9 years agoUse -fstack-protector-strong, if available.
Jarkko Hietaniemi [Fri, 12 Sep 2014 01:19:07 +0000 (21:19 -0400)]
Use -fstack-protector-strong, if available.

In preference to just -fstack-protector. gcc 4.8.x? gcc 4.9, definitely.

(FWIW, users include at least Google Chrome, Fedora 20, Ubuntu)

9 years agolong double / NV schizophrenia continues.
Jarkko Hietaniemi [Fri, 12 Sep 2014 00:27:48 +0000 (20:27 -0400)]
long double / NV schizophrenia continues.

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!