[svn:parrot] r40143 - trunk/compilers/pge/PGE

François Perrad francois.perrad at gadz.org
Sat Jul 18 15:31:43 UTC 2009


2009/7/18 Patrick R. Michaud <pmichaud at pobox.com>:
> On Sat, Jul 18, 2009 at 02:10:56PM +0000, fperrad at svn.parrot.org wrote:
>> Author: fperrad
>> Date: Sat Jul 18 14:10:54 2009
>> New Revision: 40143
>> URL: https://trac.parrot.org/parrot/changeset/40143
>>
>> Log:
>> [PGE] improve find_key
>> when no keys are specified, skip no Capture element,
>> ie. optable specific element
>
> ...isn't this a substantial change that should require a
> deprecation notice before we implement it?  I.e., the change
> in code causes the 'find_key' method to not find quantified
> captures, where previously it did so.
>

Sorry, when I grep find_key (in parrot and all known languages),
I found no usage except in Lua (which still uses TGE).

Feel free to revert r40143

François


> Ultimately I think I'm going to mark find_key as being deprecated
> anyway -- I'm not sure it belongs in PGE.
>
> Pm
>
>> @@ -299,9 +299,13 @@
>>      .return ($S0)
>>    first_key:
>>      $P0 = self.'hash'()
>> -    $P1 = new 'Iterator', $P0
>> +    $P1 = iter $P0
>>      unless $P1 goto not_found
>> +  next:
>>      $S0 = shift $P1
>> +    $P2 = $P0[$S0]
>> +    $I0 = isa $P2, 'Capture'
>> +    unless $I0 goto next
>>      .return ($S0)
>>    not_found:
>>      .return ('')
> _______________________________________________
> http://lists.parrot.org/mailman/listinfo/parrot-dev
>
>


More information about the parrot-dev mailing list