Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: bea115698e41f6acdaa450b343adbf1082c2e99e
      
https://github.com/Perl/perl5/commit/bea115698e41f6acdaa450b343adbf1082c2e99e
  Author: Richard Leach <richardle...@users.noreply.github.com>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M pp.c

  Log Message:
  -----------
  S_negate_string - allow for TARG==sv

Adds a case in `S_negate_string` to allow for TARG==sv, which then
means that the `pp_negate` and `pp_i_negate` OPs can support the
TARGMY optimization


  Commit: 359c2cd723a18f596af21897fb196d657d81752e
      
https://github.com/Perl/perl5/commit/359c2cd723a18f596af21897fb196d657d81752e
  Author: Richard Leach <richardle...@users.noreply.github.com>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M lib/B/Op_private.pm
    M opcode.h
    M pp.c
    M regen/op_private
    M regen/opcodes

  Log Message:
  -----------
  pp_(i_)negate: add the TARGMY optimization

This mostly means using the existing machinery in regen/, but also not
bothering to replace *PL_stack_sp when (targ == sv), as that would
effectively be a busywork no-op.


  Commit: c904517849a782954f8d958163a18f6cc192a485
      
https://github.com/Perl/perl5/commit/c904517849a782954f8d958163a18f6cc192a485
  Author: Richard Leach <richardle...@users.noreply.github.com>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M pp.c

  Log Message:
  -----------
  pp_(i_)negate: Don't needlessly call S_negate_string

Arguably it will be more common for users to want to negate an IV or NV,
rather than a PV. Prior to this commit, `S_negate_string` was always called
at the start of the OP and, if the target wasn't `SvPOKp`, that function
just immediately returned. This commit moves the `SvPOKp` check into the
`pp_` functions to avoid needless function calls.


Compare: https://github.com/Perl/perl5/compare/5e28db930c33...c904517849a7

Reply via email to