Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove superfluous $MAIN lexical
  • Loading branch information
moritz committed Aug 8, 2011
1 parent 429a183 commit ac51b44
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/Perl6/Actions.pm
Expand Up @@ -167,20 +167,14 @@ class Perl6::Actions is HLL::Actions {
'obscure_ops', 'os', 'file');

# If the unit defines &MAIN, add a &MAIN_HELPER.
my $mainparam := PAST::Var.new(:name('$MAIN'), :scope('parameter'),
:viviself( PAST::Val.new( :value(0) ) ) );
$unit.symbol('$MAIN', :scope<lexical_6model>);
if $unit.symbol('&MAIN') {
$mainline :=
$mainline.push(
PAST::Op.new(
:pasttype('call'),
:name('&MAIN_HELPER'),
$mainline,
$mainparam
);
}
else {
$unit.push($mainparam);
)
);
}

# If our caller wants to know the mainline ctx, provide it here.
Expand Down

0 comments on commit ac51b44

Please sign in to comment.