Branch: refs/heads/davem/xs_refactor Home: https://github.com/Perl/perl5 Commit: d93714b1ab6bf189d95fd03522e646759dbad7b4 https://github.com/Perl/perl5/commit/d93714b1ab6bf189d95fd03522e646759dbad7b4 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024)
Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: stop inadvertently disabling field checks Recently added code of mine did a conditional 'require fields' within an eval. That require actually had a syntax error, so 'use fields' was *never* being enabled, so compile-time field checks weren't being done. Commit: fa88719150cd02ec5d0b92142a79e7da643549f9 https://github.com/Perl/perl5/commit/fa88719150cd02ec5d0b92142a79e7da643549f9 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm M dist/ExtUtils-ParseXS/t/104-map_type.t Log Message: ----------- ParseXS: fixup RetainCplusplusHierarchicalTypes The object field RetainCplusplusHierarchicalTypes was recently renamed with a config_prefix, but a few places were missed. Commit: 8d96cb1e7d1f22af27650af11b7ef3b2478d4261 https://github.com/Perl/perl5/commit/8d96cb1e7d1f22af27650af11b7ef3b2478d4261 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: remove processing_arg_with_types field Eliminate the 'processing_arg_with_types' object field. This is just temporarily set to signal to the INPUT_handler() method that it is being called directly to process synthetic lines generated from types in an ANSI signature, rather than from seeing real INPUT lines in the source file. This is clumsy action-at-a-distance, and this commit instead gives INPUT_handler() an extra boolean arg to indicate this. Commit: 2e996ddd512d3537a849c3c618e6a8f7c7399a10 https://github.com/Perl/perl5/commit/2e996ddd512d3537a849c3c618e6a8f7c7399a10 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: tweak xsub_map_argname_to_islength type The 'xsub_map_argname_to_islength' field indicates, for each signature parameter, whether it is of the form 'length(foo)'. Unlike all the other xsub_map_foo_to_bar boolean object field hashes, it indicates truthfulness by *existence* rather than by the hash value. This commit changes the value to be boolean for consistency Commit: 177bf409dd244d1a6076a86bad6e3477ec08933f https://github.com/Perl/perl5/commit/177bf409dd244d1a6076a86bad6e3477ec08933f Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: tweak config_allow_exceptions field Make this object field a true boolean. Formerly it was set to ' TRY' or '', and mostly used as boolean, but used for its string value in one place. This commit makes it a boolean always and in that one place, explicitly chooses to print TRY (or not). Commit: 49d6b79483ba408ef844c14713037b3f925f2286 https://github.com/Perl/perl5/commit/49d6b79483ba408ef844c14713037b3f925f2286 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: rename $SymSet lex var to $VMS_SymSet This var is only used under VMS. Commit: 5a92ebb544bb66cb31f9d6c2ac33099ef8682cc6 https://github.com/Perl/perl5/commit/5a92ebb544bb66cb31f9d6c2ac33099ef8682cc6 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: delete var_num field This field was originally a global var, but got converted into an object field when the body of xsubpp was extracted into a module. It's actually only used for temporary values within INPUT_handler() and OUTPUT_handler(), so convert it into two lex vars. Commit: ec5e730d60f4ef40f1dfe01ac10d2305bcd35b89 https://github.com/Perl/perl5/commit/ec5e730d60f4ef40f1dfe01ac10d2305bcd35b89 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: add bootcode_later field During parsing an XS file, two arrays are maintained for lines to be inserted into the boot XSUB: one for early on, and one for lines to be inserted later. The former is maintained in the object field 'bootcode_early', while the latter was maintained in a lexical var within process_file(), $BootCode_ref. For consistency, this commit changes the latter to be an object field too, 'bootcode_later'. Commit: 6155ed3b00a8cb33153459784b6b705edfda6172 https://github.com/Perl/perl5/commit/6155ed3b00a8cb33153459784b6b705edfda6172 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: add XS_parse_stack_top_if_idx field 'XS_parse_stack' is already an object field. Make the lexical variable '$XSS_top_if_idx', which holds an index into that stack, into an object field too. Although that value is only currently used within the main body of the process_file() method, it is logically part of the parser state. Commit: 01e4f45ca68226fe25f9372279146e7115dbc417 https://github.com/Perl/perl5/commit/01e4f45ca68226fe25f9372279146e7115dbc417 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: rationalise some $seen_FOO lexical vars There are various per-XSUB lexical vars in process_file() such as $seen_PPCODE. Rearrange them such that: 1) they are all declared and initialised to false at the top of the per-XSUB loop. 2) they are all strictly boolean (except $seen_extern_C for now): previously, some were true if defined. 3) there are no longer any 'my $x = 1 if ....' nasties. This is in preparation for them becoming object fields instead. In theory there should be no changes to behaviour. Commit: d78eec57b6fdc358dc464a892036b06141e50354 https://github.com/Perl/perl5/commit/d78eec57b6fdc358dc464a892036b06141e50354 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: make $seen_extern_C truly boolean In process_file() this lexical var starts off boolean, but then at the end of it's period of use is converted into a string based on its value. This commit keeps it as a boolean and puts the string in a separate temporary var. Commit: 680ec0cfead8e5577266e7d8fc7da565c0369f19 https://github.com/Perl/perl5/commit/680ec0cfead8e5577266e7d8fc7da565c0369f19 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: rationalise some more lexical vars Tidy a couple of lexical vars in process_file(). Rename $orig_args to $signature, and move it and $class's declarations to the top of loop. This is in preparation for them becoming object fields instead. In theory there should be no changes to behaviour. Commit: b798f9a5a8bdfe80d6a4f4b913d886d5b0e8192c https://github.com/Perl/perl5/commit/b798f9a5a8bdfe80d6a4f4b913d886d5b0e8192c Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS: turn some lex vars into object fields The following lexical vars happen to only be used within process_file(), but they represent parsing state about the current XSUB, which would be better stored within the extutils::parseXS object. So convert a bunch of $foo into $self->{xsub_foo}. In particular: $seen_NO_RETURN $seen_extern_C $seen_static $seen_PPCODE $seen_CODE $seen_INTERFACE $seen_ellipsis $class $signature Commit: e9c36ebfc806eb7ec2bf7cb7bea7bb61e140e64e https://github.com/Perl/perl5/commit/e9c36ebfc806eb7ec2bf7cb7bea7bb61e140e64e Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm M dist/ExtUtils-ParseXS/t/111-analyze_preprocessor_statements.t Log Message: ----------- ParseXS: analyze_preprocessor_statements(): rm arg Remove the $XSS_work_idx arg and return value from ExtUtils::ParseXS::Utilities::analyze_preprocessor_statements(). This used to to be used to update a lexical var in the caller, but that lexical var is now an object field, $self->{XS_parse_stack_top_if_idx}, so just update it directly in the method. Commit: 47ddd929425b5cce06c14967de219f70f3790aab https://github.com/Perl/perl5/commit/47ddd929425b5cce06c14967de219f70f3790aab Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm M dist/ExtUtils-ParseXS/t/111-analyze_preprocessor_statements.t Log Message: ----------- ParseXS: analyze_preprocessor_statements: rm arg 2 Remove the $BootCode_ref arg and return value from ExtUtils::ParseXS::Utilities::analyze_preprocessor_statements(). This used to to be used to update a lexical var in the caller, but that lexical var is now an object field, $self->{bootcode_later}, so just update it directly in the method. Commit: 084caeab72bc87b0228e0b08892066fb326d78e6 https://github.com/Perl/perl5/commit/084caeab72bc87b0228e0b08892066fb326d78e6 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm M dist/ExtUtils-ParseXS/t/111-analyze_preprocessor_statements.t Log Message: ----------- ParseXS: analyze_preprocessor_statements(): no ret In ExtUtils::ParseXS::Utilities::analyze_preprocessor_statements() don't return the value $self. It hasn't been updated in any way, and so returning it is pointless. Also, make its callers use use method calling syntax rather than passing $self as an argument. And update a few relevant code comments. Commit: 8e4249e8967606b2b841ad066b6f86e5d6d80934 https://github.com/Perl/perl5/commit/8e4249e8967606b2b841ad066b6f86e5d6d80934 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-16 (Fri, 16 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm M dist/ExtUtils-ParseXS/t/111-analyze_preprocessor_statements.t Log Message: ----------- ParseXS: analyze_preprocessor_statements: s/s$// Rename ExtUtils::ParseXS::Utilities::analyze_preprocessor_statements(). to ExtUtils::ParseXS::Utilities::analyze_preprocessor_statement(). since it only processes one statement. Compare: https://github.com/Perl/perl5/compare/d93714b1ab6b%5E...8e4249e89676 To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications