Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 86ea31b65132ecc5452c02831d7bcb8743ab67f4
      
https://github.com/Perl/perl5/commit/86ea31b65132ecc5452c02831d7bcb8743ab67f4
  Author: Richard Leach <[email protected]>
  Date:   2026-07-20 (Mon, 20 Jul 2026)

  Changed paths:
    M op.c
    M t/op/state.t

  Log Message:
  -----------
  S_maybe_targlex - do nothing when OPpPAD_STATE is set, even on EMPTYAVHV

When `S_maybe_targlex` ran on a newly-created `OP_SASSIGN`, it appeared
as if `OP_EMPTYAVHV` could handle the `OPpPAD_STATE` flag internally,
but that only appeared to be the case because `S_maybe_targlex` would
be skipped when that flag was set.

The flag check wasn't updated as it should have been when
`S_maybe_targlex` was moved to run before `OP_SASSIGN` creation.

https://github.com/Perl/perl5/commit/edc77d1b36336920f654386bb10a9701c62337d0

Consequently, `S_maybe_targlex` optimized when it should not and
the `OP_ONCE` structure that should have been created for `state`
variable declarations was not.

This caused breakage such as https://github.com/Perl/perl5/issues/24571

This commit makes `S_maybe_targlex` return without doing any optimization
when `OPpPAD_STATE` is set in the `OP_EMPTYAVHV` branch.



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to