Maintaining Perl 5 Core (Dave Mitchell): March - April 2025
Fri, 09-May-2025 by
alh
edit post
Dave writes:
This is my monthly report on work done during Mar and Apr 2025, covered by
my TPF perl core maintenance grant.
I spent most of my time continuing to refactor Extutils::ParseXS, as a
precursor to adding reference-counted stack (PERL_RC_STACK) abilities to
XS.
In particular, I've recently pushed a large PR, intended to be merged
once 5.42.0 is done, which converts ParseXS to create an AST for each XSUB
it parses. This has three main benefits.
First, it separates out the parsing and code generation.
Second, it splits up the parsing of XSUBs into manageable segments. For
example, the longest sub that is concerned with parsing XSUBs is now 182
lines long and the longest concerned with code generation is 342 lines.
Prior to this PR, the longest (concerned with both parsing and code
generation) was 1412 lines.
Third, the parsing state is now stored in the AST's nodes, close to where
it's relevant, rather than all state being stored in one big confusing
Extutils::ParseXS hash.
In summary: in 5.40.0 and before, the XS parsing code was a buggy, mostly
untested, unmaintainable mess, that nobody understood properly, and which
was risky to modify. It is now modern and (hopefully) can accept changes
easily.
Summary:
* 0:34 #23074 BBC breaks Crypt::SMIME
* 1:00 fix Test -deparse failures
* 13:40 process p5p mailbox
* 0:12 reduce smoke failures
* 111:26 refactor Extutils::ParseXS
Total:
* 126:52 (HH::MM)
Comments (0)