This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Karl Williamson [Wed, 14 Aug 2019 03:34:00 +0000 (21:34 -0600)]
parts/apicheck.pl: Special case things like _aTHX
A few macros have a leading underscore to indicate a comma. This adds
code to handle them. I made separate variabled for threaded and maybe
non-threaded, but I don't know if the latter actually happens.
(cherry picked from commit
1187530614591229d1a4f1d7b2989439b1038861)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Wed, 14 Aug 2019 03:17:58 +0000 (21:17 -0600)]
parts/apicheck.pl: Add declarations for MY_CXT testing
(cherry picked from commit
aed2f395177f375003a5eecdc9535ac1e22c7f93)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 6 Aug 2019 21:50:56 +0000 (15:50 -0600)]
parts/apicheck.pl: Handle macros with trailing '_'
The underscore represents a comma when expanded. This commit makes this
program handle it.
(cherry picked from commit
12c850af3cce16d98a6a316b41a6992cfe6c6bda)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 6 Aug 2019 21:49:54 +0000 (15:49 -0600)]
parts/apicheck.pl: A couple better diagnosics
(cherry picked from commit
efe0e70e31d29bb9fdafee482bc4652151973f31)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 6 Aug 2019 21:47:10 +0000 (15:47 -0600)]
parts/apicheck.pl: Add special parameter name 'block'
A new macro has been added to blead that has a parameter that can be a C
block. This can easily be accommodated by the code in this file, if we
know about how to handle it.
(cherry picked from commit
2095204694d4f9df74463fc45d58b441759de865)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Wed, 14 Aug 2019 19:04:14 +0000 (13:04 -0600)]
parts/apicheck.pl: Add white-space to m//x for readability
And some comments to regex
(cherry picked from commit
a76243946786233602fab339e55b29851c3785e9)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Sun, 14 Jul 2019 16:01:59 +0000 (10:01 -0600)]
parts/apicheck.pl: Silence warnings on old perls
A hash element wasn't always automatically quoted: {foo} warned, {'foo'}
doesn't.
(cherry picked from commit
2a1fab422eb86442cc09296f3fe03d027e9c7254)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 2 Jul 2019 16:52:45 +0000 (10:52 -0600)]
parts/apicheck.pl: Add a few comments; white-space
(cherry picked from commit
fc50937fba868cf630ba6ccedd83d88a307ea81f)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 2 Jul 2019 16:49:25 +0000 (10:49 -0600)]
parts/apicheck.pl: Ignore some hard-to-handle functions
These are hard to get to work, so punt.
(cherry picked from commit
5e34d4c395ed0f10bae66d83e8ac0ab5264197bd)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 2 Jul 2019 16:48:39 +0000 (10:48 -0600)]
parts/apicheck.pl: BOOTCHECK needs some declarations to compile
(cherry picked from commit
5490382d8d66af8e7a06103b6fc74baa90c6c7d0)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 2 Jul 2019 16:46:18 +0000 (10:46 -0600)]
parts/apicheck.pl: MULTICALL needs declarations to compile
(cherry picked from commit
27cc0c8cf320818b8d81ec0f0ddd9e1f71cb1a38)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 2 Jul 2019 16:39:21 +0000 (10:39 -0600)]
parts/apicheck.pl: Sort some lists
This makes it easier to see if something is on the list.
(cherry picked from commit
84572eb25b1204a8832d83d99df67a7d4f5e155d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Sat, 29 Jun 2019 17:24:56 +0000 (11:24 -0600)]
parts/apicheck.pl: LC_NUMERIC manip requires a decl
The tests for these macros need to be special cased, like some others,
so that a declaration is made.
(cherry picked from commit
eec0adf3b6947231b219e9d03dfaeeb9bebb2cb7)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 25 Jun 2019 17:58:35 +0000 (11:58 -0600)]
parts/apicheck.pl: Fix up aTHX
Now that we have better flags indicating if a macro or function needs
thread context or not, we can do a better job of handling it.
(cherry picked from commit
26a7bc7c87b1326539c5ec9b6389e615051a066a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 25 Jun 2019 17:46:33 +0000 (11:46 -0600)]
parts/apicheck.pl: Handle const parameters
We now have parameters that are declared 'const'. The code generated
previously was declared const without being initialized, which is now
fatal.
(cherry picked from commit
35286f38df4517fb5fa338fcff410eaa5c0ddce0)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 25 Jun 2019 17:35:51 +0000 (11:35 -0600)]
parts/apicheck.pl: Handle identifier containing 'const'
While reading the code, I realized that if an identifier name contained
the substring 'const' this wouldn't work. It's a simple matter to add
\b to prevent this unlikely scenario.
(cherry picked from commit
eaa9c034d31c5a167bf85b6888fed5201bf0667f)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Sat, 20 Jul 2019 21:01:59 +0000 (15:01 -0600)]
parts/apicheck.pl: ignore duplicate function
(cherry picked from commit
9dfb2a45f3db2125b67e3f6b9783e10a129dab57)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Wed, 14 Aug 2019 22:28:33 +0000 (16:28 -0600)]
parts/ppptools.pl: Misspelled intended lookbehind assertion
And when I corrected the spelling, I discovered that it would never have
worked if spelled correctly on perls that predate this feature. So I
used a less efficient loop.
(cherry picked from commit
e1584b7d3806e80c64225acc2dd0e4b0ee45196e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Mon, 15 Jul 2019 21:35:14 +0000 (15:35 -0600)]
parts/ppptools.pl: Add comments, white-space, m//x
This makes some patterns /x with white space to make them more readable.
It also changes several s/\s*// to s/\s+//, which is faster.
(cherry picked from commit
49ee9fdc8f67a4180bee01519cba8bce36f33387)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Thu, 18 Jul 2019 20:50:00 +0000 (14:50 -0600)]
parts/ppptools.pl: Rename variables
to be more mnemonic
(cherry picked from commit
dd19dfc1234756d5bc4e21e49a7e0e1a47924f96)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Fri, 12 Jul 2019 16:38:10 +0000 (10:38 -0600)]
parts/ppptools.pl: Normalize prototypes
This is so the existing comparison routines don't show that things are
different solely because of white space differences
(cherry picked from commit
93e8c96d2cd21f17b16636c3876a7960ef48b74e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Thu, 11 Jul 2019 04:32:55 +0000 (22:32 -0600)]
parts/ppptools.pl: Yet another instance of an old flag
THe meanings of various flags changed a couple of months ago. This is
the final (AFAICT) one to update.
(cherry picked from commit
f03de555ac51a65231b9116f35506a751f5d559b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 9 Jul 2019 17:47:47 +0000 (11:47 -0600)]
parts/ppptools.pl: Don't omit any fcns/macros in parsing .fnc
A commit I made some years ago caused deprecated and experimental
functions from not being parsed. This was the wrong thing to do.
This is because some tools like scan_prov (which hasn't been run in many
years) need them. Instead this moves the skipping to the routine that
needs to skip, and doesn't skip as many categories.
(cherry picked from commit
24f05e758aa2d50ac85aa495b956b209e52a5e84)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Wed, 14 Aug 2019 13:20:40 +0000 (07:20 -0600)]
apicheck_c.PL: Add detail to comment
(cherry picked from commit
948b1be3996812d97c85115a7c35678a0ab2b596)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Wed, 14 Aug 2019 23:39:10 +0000 (17:39 -0600)]
devel/mkapidoc.sh: Add strict, warnings
(cherry picked from commit
5b5e4dc3f866089d8a51f580d4ecb554452a816a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Thu, 4 Jul 2019 20:25:29 +0000 (14:25 -0600)]
All entries in apidoc.fnc are documented
They often don't have that flag in the source, but since they're in the
source, they're documented. So just add the flag when generating the
file.
(cherry picked from commit
78cf0bdd4bbf969d6ec7058755320706aff9143e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 6 Aug 2019 04:54:32 +0000 (22:54 -0600)]
devel/mkapidoc.sh: Slight clean up
(cherry picked from commit
3135597a40b0d2fdc6daaa57cedd88b6963b58ff)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 25 Jun 2019 17:19:18 +0000 (11:19 -0600)]
devel/mkapidoc.sh: Sort the apidoc macros by name
(cherry picked from commit
ba3cdff1750f4339cf04e511c9ac9099c93d10a4)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 25 Jun 2019 17:09:58 +0000 (11:09 -0600)]
devel/mkapidoc.sh: White-space, comments only
This makes it more readable
(cherry picked from commit
9b98f505fc1548b82871f2870b10282bcdc489d2)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Thu, 8 Aug 2019 18:33:18 +0000 (12:33 -0600)]
devel/mkapidoc.sh: Skip irrelevant embed.fnc lines
Skip comments, for example.
(cherry picked from commit
a71d41a14e304380acebac8be29cba06b6e5d137)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Sun, 15 Sep 2019 00:05:15 +0000 (18:05 -0600)]
parts/apidoc.fnc: Update to latest blead
(cherry picked from commit
7a3ddf4b0ce4331d84b33ea64c6c33e22df6c51b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Sat, 14 Sep 2019 21:09:24 +0000 (15:09 -0600)]
Update to latest blead embed.fnc
(cherry picked from commit
c788af012154f2734511c5b7f6f0a9be18de78e7)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Sun, 15 Sep 2019 16:21:06 +0000 (10:21 -0600)]
parts/inc/utf8: Don't use postfix for in D:P tests
Devel::PPPort goes back further than this construct.
(cherry picked from commit
f5c4f171dfbd4ead0b9a9dd191c9709f9fedcbd5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 20 Aug 2019 01:29:29 +0000 (19:29 -0600)]
parts/inc/utf8: blead still doesn't work
This was a commit that was made in blead, and needs to be copied to the
distro. The release at which blead will start working without being
overridden by ppport.h had to be delayed one month.
(cherry picked from commit
7b671cf31e5d22e692481b72066c2624b7cbf823)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Tue, 27 Aug 2019 11:44:35 +0000 (13:44 +0200)]
Implement sv_len_utf8_nomg() and sv_len_utf8()
Also fix sv_len_utf8() for Perl versions prior to 5.17.5.
(cherry picked from commit
91ea0ce8f1d77f9ba270b19eb01ed94cb349b7b3)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Thu, 4 Jul 2019 20:19:42 +0000 (14:19 -0600)]
HACKERS: Add info about Hints and Warnings
(cherry picked from commit
51b0c694ca09fb4656215cbe4575b9654a63a522)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Fri, 12 Jul 2019 11:37:06 +0000 (13:37 +0200)]
Implement SvIV_nomg(), SvUV_nomg(), SvNV_nomg() and SvTRUE_nomg()
Use sv_mortalcopy_flags() macro with SV_NOSTEAL flag to create non-magical
copy of input scalar. And on this non-magical copy call original Perl's
SvIV/SvUV/SvNV/SvTRUE macro.
This would ensure that get magic is not processed on original input scalar
argument and also that correct value is returned.
(cherry picked from commit
c01919df38e1d016f008b3572c81a86f70e53be5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Tue, 9 Jul 2019 10:18:09 +0000 (12:18 +0200)]
Fix eval_pv for Perl versions prior to 5.31.2
Seems that check for SvROK() and SvTRUE() is enough, see:
https://rt.perl.org/Public/Bug/Display.html?id=134177
https://rt.perl.org/Public/Bug/Display.html?id=134175
(cherry picked from commit
0f5184e818b7217c9a75d5275b716a055f7bef6c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Mon, 8 Jul 2019 22:04:23 +0000 (16:04 -0600)]
Backport PL_mess_sv
(cherry picked from commit
8f700bf9c63f435025a5d92bfd424c1312b9bc3d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Thu, 4 Jul 2019 18:21:16 +0000 (12:21 -0600)]
Backport foldEQ_utf8 using ibcmp_utf8
Though I think there were some bugs in earlier versions.
(cherry picked from commit
53fcb552d031c2a48d34ce24e9f213f5167ce05a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Thu, 4 Jul 2019 19:15:21 +0000 (13:15 -0600)]
Backport is_utf8_invariant_string, is_invariant_string
These are more correct synonyms for is_ascii_string
(cherry picked from commit
7d9499b7ae83f2017b5c3a659547d98dc11633eb)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Thu, 4 Jul 2019 18:19:10 +0000 (12:19 -0600)]
Backport BOM_UTF8 REPLACEMENT_CHARACTER_UTF8
(cherry picked from commit
95c5c8d34cb28d3774aac13153a03ae61673bd82)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Thu, 4 Jul 2019 18:14:56 +0000 (12:14 -0600)]
Backport isUTF8_CHAR
(cherry picked from commit
9ef04c4cd59fdfe1f76083ad76803544d38a9012)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Thu, 4 Jul 2019 18:05:32 +0000 (12:05 -0600)]
Consolidate UTF-8 functions/macros into new file
It's easier to grok when these are all together, and not in several
files.
(cherry picked from commit
365c133b9378a47cbf5ccf78a6dfc713cb8388de)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Thu, 4 Jul 2019 15:05:34 +0000 (17:05 +0200)]
Implement sv_mortalcopy_flags()
(cherry picked from commit
a8ddf81bea0c2c5a7476a76c98b307764f69bee5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Thu, 4 Jul 2019 10:01:59 +0000 (12:01 +0200)]
Implement newSVsv_flags()
(cherry picked from commit
d1ffac9ac663e9293129c76289d5bb8124566060)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Mon, 1 Jul 2019 12:37:19 +0000 (14:37 +0200)]
Add tests for IVdf, UVuf, IV_MAX and UV_MAX
(cherry picked from commit
2b31db974097bbec6a64078e2a3f8c1c166236ad)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Nicolas R [Thu, 16 May 2019 21:58:36 +0000 (15:58 -0600)]
Fix several other implemented todo
Fixes GH #61 aka RT 134101
(cherry picked from commit
92ceda883e0bc1fc9a093bb0af07d04e81dc01ab)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Mon, 1 Jul 2019 20:54:13 +0000 (22:54 +0200)]
Enable Perl compile-time warnings at all places
(cherry picked from commit
aad9feda2ec7fa8b44924162ed852de4ea074ab4)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Tue, 9 Jul 2019 17:40:50 +0000 (11:40 -0600)]
Makefile.PL: Fix so works on early perls
You can't declare a variable within a looping statement like 'for' in
early perls. Just declare it immediately beforehand.
(cherry picked from commit
1b3fbf992bcf862b418afbd705ce1d1eb0c573fb)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Sun, 2 Jun 2019 11:34:45 +0000 (13:34 +0200)]
Add required dependency for $(VERSION_FROM) target in Makefile.PL
(cherry picked from commit
4b59ba9792a43a0891ad07adff7b15b11b239649)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Sun, 2 Jun 2019 11:34:33 +0000 (13:34 +0200)]
Use correct method for checking module version in Makefile.PL
(cherry picked from commit
45499778ea5ff8fbb51a5e75059b3c94e221f9e6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Sun, 2 Jun 2019 11:34:26 +0000 (13:34 +0200)]
Fix inclusion of META_MERGE in Makefile.PL
(cherry picked from commit
a145a59bef4ca21685181c0b912d9c7218e0742d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Sun, 2 Jun 2019 11:34:14 +0000 (13:34 +0200)]
Enable warnings in Makefile.PL
(cherry picked from commit
f74454f179348ed4aebc04ba735ccc12eee3c980)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Sun, 21 Jul 2019 00:25:23 +0000 (18:25 -0600)]
Update HACKERS
(cherry picked from commit
faa4c9817e61fd8aa4c1d18877c2c5800bf113b6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Wed, 10 Jul 2019 03:53:12 +0000 (21:53 -0600)]
HACKERS: Update
(cherry picked from commit
ac27a862173e52405c4f93657cd350ad9312ec24)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Thu, 4 Jul 2019 20:19:42 +0000 (14:19 -0600)]
HACKERS: Add info about Hints and Warnings
(cherry picked from commit
5df9c36cef7b172a0fe805f209de55cbb87f6ac6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Pali [Mon, 17 Jun 2019 13:54:13 +0000 (15:54 +0200)]
Document D_PPP_ prefix for macros
(cherry picked from commit
7556987e03558cd2f200df996ee222da58e5889c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Karl Williamson [Sat, 21 Sep 2019 19:18:12 +0000 (13:18 -0600)]
regcomp.h: Parenthesize param in macro expansion
This is always a good idea
Karl Williamson [Sat, 21 Sep 2019 19:14:25 +0000 (13:14 -0600)]
regcomp.h: Remove duplicate macro expansion
This macro has the same definition as another.
Karl Williamson [Fri, 27 Sep 2019 04:09:51 +0000 (22:09 -0600)]
regcomp.c: Clarify some comments
Karl Williamson [Sun, 22 Sep 2019 21:09:05 +0000 (15:09 -0600)]
regcomp.sym Update and improve descriptions of some nodes
EXACTFU nodes always now fold their strings; the information here had
not been updated to reflect that change.
And the descriptions of several EXACTish nodes are now changed to be
slightly shorter and to remove mention of the string length, which is
problematic, and is covered in the description for EXACT
Karl Williamson [Thu, 26 Sep 2019 22:30:21 +0000 (16:30 -0600)]
regen/regcomp.pl: Rename variable
The old name was misleading.
Karl Williamson [Thu, 26 Sep 2019 22:23:33 +0000 (16:23 -0600)]
regen/regcomp.pl, regcomp.sym: Comments
I spent some time in this code trying to understand some things, and as
a result I'm commenting previously undocumented features. The comments
about what an entry in regcomp.sym should look like are moved to that
file, rather than the file that reads it. The former is most often
touched, and they had gotten out-of-sync in the latter. Things now make
more sense to me, and hopefully anyone using this in the future.
Karl Williamson [Fri, 27 Sep 2019 02:49:53 +0000 (20:49 -0600)]
Silence verbatim line pod warning in perldebguts
This generated pod has many lines that really can't be wrapped. So
change the podcheck.t db to ignore these errors in this file.
Karl Williamson [Thu, 26 Sep 2019 19:14:14 +0000 (13:14 -0600)]
Add note to debugging output if regex already compiled
Prior to this commit, the debugging output says "Compiling REx foo".
But there was no indication that it was skipped due to the pattern
already being compiled; so that was confusing to people, and was a Stack
Overflow question of what is going on. Now there's an extra message
that the recompilation is skipped.
Karl Williamson [Sun, 22 Sep 2019 21:48:51 +0000 (15:48 -0600)]
perlrun: Note that -W can't be in PERL5OPT
Karl Williamson [Thu, 26 Sep 2019 04:23:55 +0000 (22:23 -0600)]
handy.h: Avoid compiler warnings for withinCOUNT()
If a parameter to this function is unsigned, gcc, at least, generates a
comparison-always-true warning for the asserts on the parameters.
Silence these by casting to an NV. Any extra machine instructions will
be gone from non-DEBUGGING builds. The value in an NV won't necessarily
be exact, but all the assertions care about is the sign, which is
guaranteed by C11 standard 6.3.1.4 item 2.
This technique was the idea of Tomasz Konojacki.
Karl Williamson [Sat, 21 Sep 2019 18:23:49 +0000 (12:23 -0600)]
handy.h: Rmv duplicated assert in inRANGE()
This assertion is done in the macro that is called to do the real work.
Karl Williamson [Mon, 9 Sep 2019 20:57:07 +0000 (14:57 -0600)]
handy.h Fix withinCOUNT() for > 32 bit operands
It needs to cast to unsigned in all circumstances; prior to this commit
it failed to do so for oprands wider than 32 bits
David Mitchell [Wed, 25 Sep 2019 20:51:50 +0000 (21:51 +0100)]
[MERGE] little fixups to signature tweaks
v5.31.4-18-g9fb6174d08 tweaked a few signature-related things but
introduced a leak in the test suite and left some debugging code in.
David Mitchell [Wed, 25 Sep 2019 20:46:47 +0000 (21:46 +0100)]
fix leak in APItest.xs
The leak Was introduced by my recent commit v5.31.4-16-g4df857782a,
which added an extra op at the head of a signature subtree, but which
wasn't being freed by the code in the parse_subsignature test.
David Mitchell [Wed, 25 Sep 2019 17:34:09 +0000 (18:34 +0100)]
Perl_Slab_Alloc(): tweak logging
When looking for a suitable op-sized chunk of memory in a slab's free
list, perl logs the search but doesn't log a successful match. Add such
a log line to make analysis of the output of 'perl -DS' easier.
David Mitchell [Tue, 24 Sep 2019 12:45:20 +0000 (13:45 +0100)]
XS-APItest/t/subsignature.t: remove debugging code
I accidentally left a temporary Data::Dumper line in it.
Karl Williamson [Fri, 30 Aug 2019 17:11:47 +0000 (11:11 -0600)]
t/lib/charnames/alias: Fix typo in comment
Karl Williamson [Tue, 3 Sep 2019 15:46:28 +0000 (09:46 -0600)]
util.c: Missing semicolon with rarely used compile ops
Karl Williamson [Tue, 3 Sep 2019 15:34:47 +0000 (09:34 -0600)]
t/harness: Clarify error message wording
David Mitchell [Mon, 23 Sep 2019 15:20:37 +0000 (16:20 +0100)]
[MERGE] assorted su signature tweaks
Apply several small fixes to the subroutine signatures implementation,
in preparation for major improvements to the syntax likely to happen
soon.
Nothing here changes the signatures syntax.
David Mitchell [Mon, 23 Sep 2019 14:22:11 +0000 (15:22 +0100)]
sub foo($_) {...} - change error message
When using one of the globals like $_ or @_ in a subroutine signature,
the error message was misleading:
Can't use global $_ in "my"
This commit changes it to:
Can't use global $_ in subroutine signature
David Mitchell [Fri, 20 Sep 2019 13:43:01 +0000 (14:43 +0100)]
put signature ops in their own subtree.
The following code:
sub f ($x,$y) {
study;
}
used to compile as:
a <1> leavesub[1 ref] K/REFC,1 ->(end)
- <@> lineseq KP ->a
1 <;> nextstate(main 5 p:5) v:%,fea=7 ->2
2 <+> argcheck(2,0) v ->3
3 <;> nextstate(main 3 p:5) v:%,fea=7 ->4
4 <+> argelem(0)[$x:3,5] v/SV ->5
5 <;> nextstate(main 4 p:5) v:%,fea=7 ->6
6 <+> argelem(1)[$y:4,5] v/SV ->7
- <;> ex-nextstate(main 5 p:5) v:%,fea=7 ->7
7 <;> nextstate(main 5 p:6) v:%,fea=7 ->8
9 <1> study sK/1 ->a
- <1> ex-rv2sv sK/1 ->9
8 <$> gvsv(*_) s ->9
Following this commit, it compiles as:
a <1> leavesub[1 ref] K/REFC,1 ->(end)
- <@> lineseq KP ->a
- <1> ex-argcheck vK/1 ->7
- <@> lineseq vK ->-
1 <;> nextstate(main 5 p:5) v:%,fea=7 ->2
2 <+> argcheck(2,0) v ->3
3 <;> nextstate(main 3 p:5) v:%,fea=7 ->4
4 <+> argelem(0)[$x:3,5] v/SV ->5
5 <;> nextstate(main 4 p:5) v:%,fea=7 ->6
6 <+> argelem(1)[$y:4,5] v/SV ->7
- <;> ex-nextstate(main 5 p:5) v:%,fea=7 ->-
7 <;> nextstate(main 5 p:6) v:%,fea=7 ->8
9 <1> study sK/1 ->a
- <1> ex-rv2sv sK/1 ->9
8 <#> gvsv[*_] s ->9
All the ops associated with the signature have been put in their own
subtree, with an extra NULL ex-argcheck op "on top". The op on top
serves two purposes: first, it makes it easier for Deparse.pm etc to
spot siganure code; secondly, it may at some point in the future be
upgraded to OP_SIGNATURE when signatures get optimised. It's of type
ex-argcheck only because when being created it needs to be an op type
that's in class UNOP_AUX so that the created op will be suitable for
later optimising, and making it an ex-type associated with signatures
helps flag it as such.
There should be no functional changes apart from the shape of the
optree.
David Mitchell [Sat, 21 Sep 2019 11:24:45 +0000 (12:24 +0100)]
rpeep(): skip duplicate nextstates even with gaps
rpeep() already optimises away consecutive nextstate ops. This commit
makes it do this even if there are 'noop' ops between them like null,
scope, lineseq.
This has a specific utility for the next commit, which will reorganise
the optree for subroutine signatures in a way which introduces a lineseq
between two nextstates.
David Mitchell [Fri, 20 Sep 2019 10:11:36 +0000 (11:11 +0100)]
Signatures: change param count from IV to UV
For some reason I was storing the counts of sub signature parameters and
optional parameters as signed ints. Since these can never be negative,
change them to UV instead.
David Mitchell [Fri, 20 Sep 2019 09:57:54 +0000 (10:57 +0100)]
OP_ARGCHECK: use custom aux struct
This op is of class OP_UNOP_AUX, Ops of this class have an op_aux pointer
which typically points to a variable-length malloced array of IVs,
UVs, etc. However in the specific case of OP_ARGCHECK the data stored
in the aux struct is fixed. So this commit casts the aux pointer to a
struct containing the relevant fields (number of parameters etc), rather
than referring to them as aux[0], aux[1] etc. This makes the code more
readable.
Should be no functional changes.
David Mitchell [Thu, 19 Sep 2019 10:39:30 +0000 (11:39 +0100)]
signatures: add tests for multiline sig
David Mitchell [Thu, 19 Sep 2019 10:25:53 +0000 (11:25 +0100)]
signatures: add taint tests
David Mitchell [Mon, 23 Sep 2019 13:21:32 +0000 (14:21 +0100)]
[MERGE] fixup add+use si_cxsubix field
Re-apply merged branch that was temporarily reverted, and add a fix
which fixes the breakage which triggered the revert.
David Mitchell [Mon, 23 Sep 2019 13:02:49 +0000 (14:02 +0100)]
si_cxsubix not restored on goto &XS_sub
My recent merge commit v5.31.3-198-gd2cd363728 (temporarily reverted by
v5.31.4-0-g20ef288c53) added a si_cxsubix field to the stackinfo struct
to track the most recent sub context. This field wasn't being restored
correctly with 'goto &XS-sub', and broke Test::Deep.
David Mitchell [Sat, 21 Sep 2019 12:23:16 +0000 (13:23 +0100)]
Un-revert "[MERGE] add+use si_cxsubix field"
original merge commit: v5.31.3-198-gd2cd363728
reverted by: v5.31.4-0-g20ef288c53
The commit following this commit fixes the breakage, which that means
the revert can be undone.
Tony Cook [Mon, 23 Sep 2019 04:54:38 +0000 (14:54 +1000)]
bump $Time::HiRes::VERSION
Tomasz Konojacki [Mon, 23 Sep 2019 01:19:05 +0000 (03:19 +0200)]
Time::HiRes: fix compilation with Visual C++ 2013 and older
1d96b9c90e199a42267d0142b9d623350a183412 broke it. It turns out
that Visual C++ 2013 and older don't have the timespec structure.
[perl #134447]
Max Maischein [Fri, 20 Sep 2019 22:19:04 +0000 (00:19 +0200)]
Add 5.31.5 to Module::CoreList data
Max Maischein [Fri, 20 Sep 2019 22:09:56 +0000 (00:09 +0200)]
Bump Version from 5.31.4 to 5.31.5 in various places
Max Maischein [Fri, 20 Sep 2019 21:59:28 +0000 (23:59 +0200)]
new perldelta for 5.31.4
Max Maischein [Fri, 20 Sep 2019 21:54:47 +0000 (23:54 +0200)]
Add the 5.31.4 epigraph
Max Maischein [Fri, 20 Sep 2019 21:53:21 +0000 (23:53 +0200)]
Tick the entry for the 5.31.4 release
Max Maischein [Fri, 20 Sep 2019 21:00:04 +0000 (23:00 +0200)]
Revert "[MERGE] add+use PL_curstackinfo->si_cxsubix field"
This reverts commit
d2cd363728088adada85312725ac9d96c29659be, reversing
changes made to
068b48acd4bdf9e7c69b87f4ba838bdff035053c.
This change breaks installing Test::Deep:
...
not ok 37 - Test 'isa eq' completed
ok 38 - Test 'isa eq' no premature diagnostication
...
Max Maischein [Fri, 20 Sep 2019 17:18:03 +0000 (19:18 +0200)]
add new release to perlhist
Max Maischein [Fri, 20 Sep 2019 17:08:57 +0000 (19:08 +0200)]
Update perldelta for 5.31.4
Max Maischein [Fri, 20 Sep 2019 17:03:25 +0000 (19:03 +0200)]
Update INSTALL file
Max Maischein [Fri, 20 Sep 2019 16:43:20 +0000 (18:43 +0200)]
Update Module::CoreList for 5.31.4