Branch: refs/heads/davem/xs_refactor Home: https://github.com/Perl/perl5 Commit: ad37558cceb54874dda19764b04e6b4584e426b2 https://github.com/Perl/perl5/commit/ad37558cceb54874dda19764b04e6b4584e426b2 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-03 (Sat, 03 Aug 2024)
Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS::process_file(): balance braces Within the long subroutine process_file(), make '{' and '}' be balanced, so that it's easier to bounce around between matching braces using '%' on vim, or the equivalent on other text editors. This is achieved by fixing a couple comment typos, plus using the '[[' and ']]' escapes in a few Q(<<EOF) calls which output unbalanced braces but were using a bare '{' or '}'. Most of code-output heredocs in this sub already used the escapes, just these few weren't. Commit: e2684e417fb17a257f583e589b0523420f9a1f8b https://github.com/Perl/perl5/commit/e2684e417fb17a257f583e589b0523420f9a1f8b Author: David Mitchell <da...@iabyn.com> Date: 2024-08-03 (Sat, 03 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS::process_file(): rename some lex vars process_file() is a long sub of about 1600 lines. This commit is one of a series to rename etc some of its lexical vars for greater clarity and consistency. Rename %args to %Options. This hash records the various switches passed to the sub, but its name can get confused with many other vars with 'arg' in their name used later for parsing an XSUB's signature. At the same time, rename the minor %options var to %opts. Commit: fbb2fb4f2b8b69856348a1c687b2de1ac08eeea0 https://github.com/Perl/perl5/commit/fbb2fb4f2b8b69856348a1c687b2de1ac08eeea0 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-03 (Sat, 03 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS::process_file(): adj scope of some my vars process_file() is a long sub of about 1600 lines. This commit is one of a series to rename etc some of its lexical vars for greater clarity and consistency. This commit reduces the scope of a few lexical vars from being in the whole scope of the big sub (or the big loop within it) to just where they are used. Commit: fadb2e2f69e3ee378f5937458f09fbcb7b0e4242 https://github.com/Perl/perl5/commit/fadb2e2f69e3ee378f5937458f09fbcb7b0e4242 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-03 (Sat, 03 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS::process_file(): adjust some indents After the previous commit which added some new { } scopes, re-indent the code within the new scopes. Whitespace-only change (plus wrapping one over-long comment). Commit: 3dd51b444a929c0d2bf27730dfdadb673078a7f7 https://github.com/Perl/perl5/commit/3dd51b444a929c0d2bf27730dfdadb673078a7f7 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-03 (Sat, 03 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS::process_file(): rename more my vars process_file() is a long sub of about 1600 lines. This commit is one of a series to rename etc some of its lexical vars for greater clarity and consistency. Rename various boolean lexical vars to $seen_FOO, where FOO is something in the XSUB that has been detected. was now $RETVAL_no_return $seen_NO_RETURN $externC $seen_extern_C $static $seen_static $ellipsis $seen_ellipsis $PPCODE $seen_PPCODE $CODE $seen_CODE $INTERFACE $seen_INTERFACE Commit: 82f0ebf533f9a32b485d9f88cefabba77c2b3ec2 https://github.com/Perl/perl5/commit/82f0ebf533f9a32b485d9f88cefabba77c2b3ec2 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-03 (Sat, 03 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS::process_file(): rename yet more my vars process_file() is a long sub of about 1600 lines. This commit is one of a series to rename etc some of its lexical vars for greater clarity and consistency. These are miscellaneous renames for clarity: was now $XSS_work_idx $XSS_top_if_idx $cpp_next_tmp $cpp_next_tmp_define $xsreturn $XSRETURN_count $len_name $name_or_lenname $islength $is_length $num_args $args_count $min_args $min_arg_count $extra_args $optional_args_count @args_num @map_param_idx_to_arg_idx $wantRETVAL $implicit_OUTPUT_RETVAL $trgt $target Commit: 301797d0ef85795a3abb569bb67f1f6a81c8deb7 https://github.com/Perl/perl5/commit/301797d0ef85795a3abb569bb67f1f6a81c8deb7 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-03 (Sat, 03 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS::process_file(): fix couple of my vars process_file() is a long sub of about 1600 lines. This commit is one of a series to rename etc some of its lexical vars for greater clarity and consistency. This commit: Deletes the unused $inout_var variable. Reduces the scope of the $EXPLICIT_RETURN variable. Commit: 194cf4a44848790362786f19d7307f28c4250feb https://github.com/Perl/perl5/commit/194cf4a44848790362786f19d7307f28c4250feb Author: David Mitchell <da...@iabyn.com> Date: 2024-08-03 (Sat, 03 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS::process_file(): rename 2 ref my vars process_file() is a long sub of about 1600 lines. This commit is one of a series to rename etc some of its lexical vars for greater clarity and consistency. This commit converts a couple of vars called $foo_ref which are references to an array or hash, into a direct array or hash. These vars are used just locally to the sub and aren't passed anywhere else, so it seems little point in making them references. was now $only_C_inlist_ref @only_C_inlist $outlist_ref @OUTLIST_vars The declaration of @OUTLIST_vars is also moved down to be nearer to where the variable is first used. Commit: 803f4b4e4f75ccb989998708dbcded7d8dc96837 https://github.com/Perl/perl5/commit/803f4b4e4f75ccb989998708dbcded7d8dc96837 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-03 (Sat, 03 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS::process_file(): eliminate 2 postfix fors There are a couple of multi-line statements with a 'for foo' suffix. Turn them into a proper 'for { block }' instead, as it's easy to miss the trailing 'for' when visually inspecting such code. Commit: 734b48d5e1cc3c3aee7950d9d8fdb2b2c62e4d09 https://github.com/Perl/perl5/commit/734b48d5e1cc3c3aee7950d9d8fdb2b2c62e4d09 Author: David Mitchell <da...@iabyn.com> Date: 2024-08-03 (Sat, 03 Aug 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm Log Message: ----------- ParseXS::process_file(): merge 2 prints Two code-emitting print statements follow one from another. Merge into a single staement. This is a trivial simplification with no change to output. Compare: https://github.com/Perl/perl5/compare/98f431f72fa8...734b48d5e1cc To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications