Author: pmichaud
Date: Sat Dec 6 13:58:49 2008
New Revision: 33580
Modified:
trunk/compilers/pge/PGE/Match.pir
Log:
[pge]: Switch PGE::Match to use Capture PMC instead of Capture_PIR objects.
This results in a 13% speed improvement in the "Rakudo actions.pm
benchmark" (was 45.75sec, now 39.80sec on my system).
Modified: trunk/compilers/pge/PGE/Match.pir
==============================================================================
--- trunk/compilers/pge/PGE/Match.pir (original)
+++ trunk/compilers/pge/PGE/Match.pir Sat Dec 6 13:58:49 2008
@@ -12,11 +12,10 @@
.sub '' :load
load_bytecode 'P6object.pbc'
- load_bytecode 'Parrot/Capture_PIR.pbc'
load_bytecode 'PGE/Dumper.pir' # FIXME, XXX, etc.
.local pmc p6meta
p6meta = new 'P6metaclass'
- p6meta.'new_class'('PGE::Match', 'parent'=>'Capture_PIR',
'attr'=>'$.target $.from $.pos &!corou')
+ p6meta.'new_class'('PGE::Match', 'parent'=>'Capture', 'attr'=>'$.target
$.from $.pos &!corou $!item')
.return ()
.end
@@ -311,16 +310,8 @@
null $P0
setattribute self, '$.target', $P0
setattribute self, '&!corou', $P0
- setattribute self, '@!list', $P0
setattribute self, '$!item', $P0
- .local pmc iter
- iter = new 'Iterator', self
- iter_loop:
- unless iter goto iter_end
- $S0 = shift iter
- delete self[$S0]
- goto iter_loop
- iter_end:
+ setref self, $P0
.return ()
.end