perl5 icon indicating copy to clipboard operation
perl5 copied to clipboard

Set `builtin::` globs to readonly so that attempted replacements of them do not break optimisations

Open leonerd opened this issue 1 year ago • 0 comments

A possible thought, based on discussions on p5p@ about optimisations around builtin functions.

Currently just emits the default "Modification of read-only value" message. I did attempt to have it say something special in this situation but that involves editing Perll_sv_setsv_flags() in sv.c, one of the hottest paths in the entire interpreter. I didn't think that was especially worth it just for this very rare case.

This is an alternative to https://github.com/Perl/perl5/pull/22668

  • This set of changes requires a perldelta entry, and it is included.

leonerd avatar Oct 10 '24 19:10 leonerd