=item B<substr_r>(out STR, in STR, in INT, in INT)
Make $1 refer to the given part of $2, basically like above, but it
is reusing the given destination string and doesn't care if the
source string is changed later. This I<is changed> includes
also GC runs, which will move the referenced string. This also
means that $1 has to be reset before any GC may happen.
This opcode should really be just used to quickly refer to a substring of
another part, e.g. for printing and is a temporary hack.
B<Handle with care>
either move this to experimental.ops, or remove it entirely. i vote to
remove it. we don't need temporary hacks as core ops.
$ find . -name '*.pir' | xargs grep substr_r
./examples/shootout/revcomp.pir: $S0 = substr_r line, i, 60
You can blame /me for this one. It was a (speed) hack to be somehow
competitive (or even functional) in this shootout benchmark.
I'd rather have it in experimental.ops until these string issues are resolved.
Re: [perl #37940] substr and memory issues
Move it to experimental.ops, and note it in DEPRECATED.pod.