Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: cb83733b929628b281dc7cefa5d7859e14e56f70 https://github.com/Perl/perl5/commit/cb83733b929628b281dc7cefa5d7859e14e56f70 Author: Richard Leach <richardle...@users.noreply.github.com> Date: 2025-07-14 (Mon, 14 Jul 2025)
Changed paths: M op.c M opcode.h M regen/opcodes M t/perf/opcount.t Log Message: ----------- Make OP_DEFINED eligible for constant folding Prior to this, the condition in the following example did not fold: 'use constant ONE => 1; my $x = (defined(ONE)) ? 1 : 0' With this commit, the final op tree produced for the above is just: 5 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter v ->2 2 <;> nextstate(main 193 -e:1) v:%,us,{,fea=15 ->3 4 <1> padsv_store[$x:193,194] vKS/LVINTRO ->5 3 <$> const[IV 1] s/FOLD ->4 - <0> ex-padsv sRM*/LVINTRO ->4 To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications