Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
a few less prunes.
  • Loading branch information
timo committed Aug 5, 2013
1 parent e78000f commit e693315
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/Perl6/Actions.nqp
Expand Up @@ -966,21 +966,18 @@ class Perl6::Actions is HLL::Actions does STDActions {
$past := xblock_immediate( $<xblock>[$count].ast );
$past.push($else);
}
$/.prune;
make $past;
}

method statement_control:sym<unless>($/) {
my $past := xblock_immediate( $<xblock>.ast );
$past.op('unless');
$/.prune;
make $past;
}

method statement_control:sym<while>($/) {
my $past := xblock_immediate( $<xblock>.ast );
$past.op(~$<sym>);
$/.prune;
make tweak_loop($past);
}

Expand All @@ -995,7 +992,6 @@ class Perl6::Actions is HLL::Actions does STDActions {
$past := QAST::Op.new( $<EXPR>.ast, pblock_immediate( $<pblock>.ast ),
:op($op), :node($/) );
}
$/.prune;
make tweak_loop($past);
}

Expand All @@ -1009,7 +1005,6 @@ class Perl6::Actions is HLL::Actions does STDActions {
$past := QAST::Want.new(
QAST::Op.new( :op<callmethod>, :name<eager>, $past ),
'v', QAST::Op.new( :op<callmethod>, :name<sink>, $past ));
$/.prune;
make $past;
}

Expand All @@ -1025,7 +1020,6 @@ class Perl6::Actions is HLL::Actions does STDActions {
if $<e1> {
$loop := QAST::Stmts.new( $<e1>[0].ast, $loop, :node($/) );
}
$/.prune;
make $loop;
}

Expand Down Expand Up @@ -1242,19 +1236,16 @@ class Perl6::Actions is HLL::Actions does STDActions {
method statement_prefix:sym<DOC>($/) {
$*W.add_phaser($/, ~$<phase>, ($<blorst>.ast)<code_object>)
if %*COMPILING<%?OPTIONS><doc>;
$/.prune;
}

method statement_prefix:sym<do>($/) {
make QAST::Op.new( :op('call'), $<blorst>.ast );
$/.prune;
}

method statement_prefix:sym<gather>($/) {
my $past := block_closure($<blorst>.ast);
$past<past_block>.push(QAST::Var.new( :name('Nil'), :scope('lexical') ));
make QAST::Op.new( :op('call'), :name('&GATHER'), $past );
$/.prune;
}

method statement_prefix:sym<once>($/) {
Expand Down Expand Up @@ -1282,7 +1273,6 @@ class Perl6::Actions is HLL::Actions does STDActions {
),
QAST::Var.new( :name($sym), :scope('lexical') )
);
$/.prune;
}

method statement_prefix:sym<sink>($/) {
Expand All @@ -1292,7 +1282,6 @@ class Perl6::Actions is HLL::Actions does STDActions {
QAST::Var.new( :name('Nil'), :scope('lexical')),
:node($/)
);
$/.prune;
}

method statement_prefix:sym<try>($/) {
Expand Down Expand Up @@ -1342,7 +1331,6 @@ class Perl6::Actions is HLL::Actions does STDActions {
);
}
make $past;
$/.prune;
}

method blorst($/) {
Expand Down

0 comments on commit e693315

Please sign in to comment.