Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 819d09b57c6a76b0ba90670a1ea1861730bc457b
      
https://github.com/Perl/perl5/commit/819d09b57c6a76b0ba90670a1ea1861730bc457b
  Author: Richard Leach <richardle...@users.noreply.github.com>
  Date:   2022-08-05 (Fri, 05 Aug 2022)

  Changed paths:
    M embed.fnc
    M proto.h
    M sv.c
    M sv_inline.h

  Log Message:
  -----------
  Perl_newRV_noinc - explicitly simplify, convert to inline func

Perl_newRV_noinc creates a new SVt_IV, then calls sv_setrv_noinc,
which will check if the SVt_IV is SvTHINKFIRST (it won't be) and
if it is types other than SVt_IV (it won't be). If those checks
and associated branches are removed, all that remains is some flag
twiddling and setting the sv_u.svu_rv pointer.

A decent compiler *might* figure that all out and simplify
Perl_newRV_noinc right down to the essentials, but if we do that
directly, the entire function is small enough to move to sv_inline.h


Reply via email to