Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: a9b64e60085410a21f22d9df311cfe251b44d446 https://github.com/Perl/perl5/commit/a9b64e60085410a21f22d9df311cfe251b44d446 Author: Richard Leach <richardle...@users.noreply.github.com> Date: 2022-06-08 (Wed, 08 Jun 2022)
Changed paths: M embed.fnc M embed.h M inline.h M proto.h Log Message: ----------- inline.h: add av_push_simple A simplified version of av_push, along the lines of av_store_simple and av_fetch_simple. This function is trivial, but having it makes refactoring of existing code easier to read. For example, changing: av_push(some_av, val); to: av_push_simple(some_av,val); is easier to read than: av_store_simple(some_av, AvFILLp(some_av) + 1, val) Commit: eae3cc9643eecd5d8b27c8fb4a3dc3bfebaf57e3 https://github.com/Perl/perl5/commit/eae3cc9643eecd5d8b27c8fb4a3dc3bfebaf57e3 Author: Richard Leach <richardle...@users.noreply.github.com> Date: 2022-06-08 (Wed, 08 Jun 2022) Changed paths: M av.c M embed.fnc M inline.h M proto.h Log Message: ----------- Move av_new_alloc from av.c to inline.h There was less benefit in doing this prior to newSV_type becoming an inline function. Now that it is, inlining av_new_alloc can help compilers eliminate redundant setting of AvMAX/AvFILLp and unnecessary branches of any following inlined calls to av_store_simple. Commit: 74279cb654174c8653f8e15198a6aa843636148e https://github.com/Perl/perl5/commit/74279cb654174c8653f8e15198a6aa843636148e Author: Richard Leach <richardle...@users.noreply.github.com> Date: 2022-06-08 (Wed, 08 Jun 2022) Changed paths: M mro_core.c M perlio.c M sv.c Log Message: ----------- Make use of av_push_simple in a few places. Specifically, only where a new AV has just been created and it's therefore obvious that av_push_simple is safe to use. In many cases, nearby code does av_push to an existing array. It might well be the case that these are simple arrays and av_push_simple could be used instead. The necessary analysis has been left for the future. Compare: https://github.com/Perl/perl5/compare/37a94617085a...74279cb65417