in reply to Re^2: Why isn't return removed from optree?
in thread Why isn't return removed from optree?
Ah-ha! I found a situation where return can't simply be omitted.
>perl -MO=Concise,f -e"sub f { return ($x,$y) }" main::f: 6 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->6 1 <;> nextstate(main 1 -e:1) v ->2 5 <@> return KP ->6 2 <0> pushmark s ->3 - <1> ex-rv2sv sK/1 ->4 3 <#> gvsv[*x] s ->4 - <1> ex-rv2sv sK/1 ->5 4 <#> gvsv[*y] s ->5 -e syntax OK >perl -MO=Concise,f -e"sub f { ($x,$y) }" main::f: 6 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->6 1 <;> nextstate(main 1 -e:1) v ->2 5 <@> list KP ->6 2 <0> pushmark s ->3 - <1> ex-rv2sv sK/1 ->4 3 <#> gvsv[*x] s ->4 - <1> ex-rv2sv sK/1 ->5 4 <#> gvsv[*y] s ->5 -e syntax OK
That gives me something to look at.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Why isn't return removed from optree?
by merlyn (Sage) on Dec 29, 2008 at 11:17 UTC | |
by ikegami (Patriarch) on Dec 29, 2008 at 20:33 UTC |