perlguts: OP_GOTO can also be a PVOP

$ perl -MO=Concise,f -e 'sub f { goto foo; foo:1 }'
main::f:
5  <1> leavesub[1 ref] K/REFC,1 ->(end)
-     <@> lineseq KP ->5
1        <;> nextstate(main 2 -e:1) v:{ ->2
2        <"> goto("foo") v ->3
3        <;> nextstate(foo: main 2 -e:1) v:{ ->4
4        <$> const[IV 1] s ->5
-e syntax OK

though this isn't reflected in regen/opcodes
This commit is contained in:
Tony Cook 2026-01-09 20:42:11 +11:00
parent 566b1d48f0
commit 61650d1608

View File

@ -3904,7 +3904,7 @@ the C<OA_*> constants from F<op.h>, namely
=item OA_PVOP_OR_SVOP
This should be interpreted as 'C<PVOP>' only. The C<_OR_SVOP> is because
the only core C<PVOP>, C<OP_TRANS>, can sometimes be a C<SVOP> instead.
one core C<PVOP>, C<OP_TRANS>, can sometimes be a C<SVOP> instead.
=item OA_LOOP