summaryrefslogtreecommitdiff
path: root/configure.gnu
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-06-11 10:54:12 +0100
committerDavid Mitchell <davem@iabyn.com>2015-06-19 08:44:18 +0100
commit617a4f41d97982726e3623f6bc82502ee14d2403 (patch)
tree92335f7b9d0f2b3181c29b17ccb15d5bb35e044e /configure.gnu
parent9c750db661e034b562ff95d055827d815c3f4cc1 (diff)
downloadperl-617a4f41d97982726e3623f6bc82502ee14d2403.tar.gz
pp_return(): tail call pp_leavewrite()
When 'return'ing from a format, rather than handling it ourselves, fall through to pp_leavewrite(). pp_return() is now only responsible for popping any extra contexts and junk from the stack. With this commit, *all* types of return are now handled by tail-calling the appropriate pp_leaveFOO() function, so this commit also cuts out big chunks of dead code. Note that the behaviour on using 'return' in a format is completely undocumented, and almost completely untested. In fact there is only a single format in the test suite that does a return, and the tests which use that are mainly there to ensure that extra stuff on the stack doesn't leak into the value(s) returned by write(). In particular, its not clear whether a return half-way through a format should cause the lines processed so far to be output, or to be discarded; currently it discards. Also, its not clear what (if anything) should be done with any args to the 'return' call. Currently they're just discarded. Also, the format in the test suite which does a return only does a 'return;', not a 'return x,y,z'. So that's still untested. So I decided to keep the current behaviour of return in format as close as possible rather than trying to change of fix anything.
Diffstat (limited to 'configure.gnu')
0 files changed, 0 insertions, 0 deletions