develooper Front page | perl.perl5.porters | Postings from July 2012

Re: [perl.git] branch blead, updated. v5.17.2-92-g8589767

Tony Cook
July 27, 2012 21:32
Re: [perl.git] branch blead, updated. v5.17.2-92-g8589767
Message ID:
On Sat, Jul 28, 2012 at 01:27:49AM +0200, Father Chrysostomos wrote:
> commit 1f039d60d3646db9ab9065236e00c45cbf099138
> Author: Father Chrysostomos <>
> Date:   Fri Jul 27 14:26:39 2012 -0700
>     [perl #113684] Make redo/last/next/dump accept expr
>     These functions have been allowing arbitrary expressions, but would
>     treat anything that did not resolve to a const op as the empty string.
>     Not only were arguments swallowed up without warning, but constant
>     folding could change the behaviour.  Computed labels are allowed for
>     goto, and there is no reason to disallow them for these other ops.
>     This can also come in handy for certain types of code generators.
>     In the process of modifying pp functions to accept arbitrary labels,
>     I noticed that the label and loop-popping code was identical in three
>     functions, so I moved it out into a separate static function, to make
>     the changes easier.
>     I also had to reorder newLOOPEX significantly, because code under the
>     goto branch needed to a apply to last, and vice versa.  Using multiple
>     gotos to switch between the branches created too much of a mess.
>     I also eliminated the use of SP from pp_last, to avoid copying the
>     value back and forth between SP and PL_stack_sp.

This change broken C++ builds of perl.

The problem is the C< goto free_label; > bypasses the initializations
of sv and s.


a) don't use initializers, assign to sv and s after the declarations

b) move the free_label code into another block and have both points
that need it use goto

c) duplicate the (small amount of) code (I think this is safe.)

Tony Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About