This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
leave_scope(): eliminate a couple of local vars
authorDavid Mitchell <davem@iabyn.com>
Fri, 12 Aug 2016 11:33:08 +0000 (12:33 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 12 Aug 2016 13:00:58 +0000 (14:00 +0100)
commit75ebea3c5defdfeb19d38d1a4e5fb280e8d980f9
tree666452a017df53348633d0e8b2632b4f715a6531
parentc97287825d5d2dd270f14027ddc2fe97a4bfc11c
leave_scope(): eliminate a couple of local vars

Remove svp and i from the main loop and only declare them in the
inner scopes that require them. Where values get passing around in
goto restore_sv/restore_svp, pass the value in an unused a0/a2 var
instead.

Also eliminate the one use of the 'type' var within the loop - that way
the compiler doesn't have to hang on the value when executing the switch.

Makes the object code a bit smaller.
scope.c