Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove (some) rw annotations that don't belong
  • Loading branch information
cygx committed Oct 17, 2015
1 parent 51a04ec commit f0c6157
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/Perl5/Actions.pm
Expand Up @@ -410,7 +410,7 @@ class Perl5::Actions does STDActions {
$STATEMENT_PRINT := 0;
}

sub sink(Mu $past is rw) {
sub sink(Mu $past) {
$V5DEBUG && say("sub sink(\$past)");
my $name := $past.unique('sink');
QAST::Want.new(
Expand Down Expand Up @@ -449,26 +449,26 @@ class Perl5::Actions does STDActions {
unless => 1,
handle => 1,
hllize => 1;
sub autosink(Mu $past is rw) {
sub autosink(Mu $past) {
$V5DEBUG && say("sub autosink(\$past)");
nqp::istype($past, QAST::Op) && %sinkable{$past.op} && !nqp::p6bool($past.ann('nosink'))
?? sink($past)
!! $past;
}

sub xblock_immediate(Mu $xblock is rw) {
sub xblock_immediate(Mu $xblock) {
$V5DEBUG && say("sub xblock_immediate(\$xblock)");
nqp::bindpos($xblock, 1, pblock_immediate($xblock[1]));
$xblock;
}

sub pblock_immediate(Mu $pblock is rw) {
sub pblock_immediate(Mu $pblock) {
$V5DEBUG && say("sub pblock_immediate(\$pblock)");
my $p := block_immediate($pblock.ann('uninstall_if_immediately_used').shift);
$p
}

sub block_immediate(Mu $block is rw) {
sub block_immediate(Mu $block) {
$V5DEBUG && say("sub block_immediate(\$block)");
$block.blocktype('immediate');
$block;
Expand Down Expand Up @@ -2156,7 +2156,7 @@ class Perl5::Actions does STDActions {
}
}

sub declare_variable($/, Mu $past is rw, $sigil, $twigil, $desigilname, $trait_list, $shape?) {
sub declare_variable($/, Mu $past, $sigil, $twigil, $desigilname, $trait_list, $shape?) {
my $name := $sigil ~ $twigil ~ $desigilname;
my $BLOCK := $*W.cur_lexpad();

Expand Down Expand Up @@ -2543,7 +2543,7 @@ class Perl5::Actions does STDActions {
$*W.apply_trait($/, '&trait_mod:<is>', $code, inlinable => $inline_info)
}

sub methodize_block($/, $code is rw, Mu $past is rw, %sig_info, Mu $invocant_type, :$yada) {
sub methodize_block($/, $code is rw, Mu $past, %sig_info, Mu $invocant_type, :$yada) {
$V5DEBUG && say("sub methodize_block($/)");
# Get signature and ensure it has an invocant and *%_.
my @params := %sig_info<parameters>;
Expand Down Expand Up @@ -2591,7 +2591,7 @@ class Perl5::Actions does STDActions {
}

# Installs a method into the various places it needs to go.
sub install_method($/, $name, $scope, Mu $code, Mu $outer is rw, :$private) {
sub install_method($/, $name, $scope, Mu $code, Mu $outer, :$private) {
$V5DEBUG && say("install_method($/, $name, $scope)");
# Ensure that current package supports methods, and if so
# add the method.
Expand Down Expand Up @@ -2711,7 +2711,7 @@ class Perl5::Actions does STDActions {
make $closure;
}

sub regex_coderef($/, $code is rw, Mu $qast is rw, $scope, $name, %sig_info, Mu $block is rw, $traits?, :$proto, :$use_outer_match) {
sub regex_coderef($/, $code is rw, Mu $qast, $scope, $name, %sig_info, Mu $block, $traits?, :$proto, :$use_outer_match) {
# create a code reference from a regex qast tree
my $past;
if $proto {
Expand Down Expand Up @@ -4211,7 +4211,7 @@ class Perl5::Actions does STDActions {
}
}

sub assign_op($/, Mu $lhs_ast is rw, Mu $rhs_ast is rw) {
sub assign_op($/, Mu $lhs_ast, Mu $rhs_ast) {
my $past;
my $var_sigil;
if $lhs_ast.isa(QAST::Var) {
Expand Down Expand Up @@ -4814,15 +4814,15 @@ class Perl5::Actions does STDActions {
return QAST::Var.new( :name($name), :scope('lexical') );
}

sub reference_to_code_object($code_obj is rw, Mu $past_block is rw) {
sub reference_to_code_object($code_obj is rw, Mu $past_block) {
$V5DEBUG && say("reference_to_code_object($past_block.cuid())");
my $ref := QAST::WVal.new( :value($code_obj) );
$ref.annotate('past_block', $past_block);
$ref.annotate('code_object', $code_obj);
return $ref;
}

sub block_closure(Mu $code is rw) {
sub block_closure(Mu $code) {
$V5DEBUG && say("block_closure()");
my Mu $closure := QAST::Op.new(
:op('callmethod'), :name('clone'),
Expand All @@ -4834,7 +4834,7 @@ class Perl5::Actions does STDActions {
return $closure;
}

sub make_thunk_ref(Mu $to_thunk is rw, $/) {
sub make_thunk_ref(Mu $to_thunk, $/) {
$V5DEBUG && say("make_thunk_ref($/)");
my $block := $*W.push_lexpad($/);
$block.push(QAST::Stmts.new(autosink($to_thunk)));
Expand All @@ -4845,7 +4845,7 @@ class Perl5::Actions does STDActions {
$block);
}

sub make_topic_block_ref(Mu $past is rw, :$copy, :$name = '$_') {
sub make_topic_block_ref(Mu $past, :$copy, :$name = '$_') {
$V5DEBUG && say("sub make_topic_block_ref($copy, $name)");
my Mu $block := QAST::Block.new(
QAST::Stmts.new(
Expand Down Expand Up @@ -5180,7 +5180,7 @@ class Perl5::Actions does STDActions {
$past
}

sub wrap_return_handler(Mu $past is rw) {
sub wrap_return_handler(Mu $past) {
QAST::Op.new(
:op('p6typecheckrv'),
QAST::Stmts.new(
Expand Down Expand Up @@ -5882,13 +5882,13 @@ class Perl5::RegexActions does STDActions {
make quantmod($qast, $<quantmod>);
}

sub quantmod(Mu $ast is rw, $mod) {
sub quantmod(Mu $ast, $mod) {
if $mod eq '?' { $ast.backtrack('f') }
elsif $mod eq '+' { $ast.backtrack('g') }
$ast;
}

method qbuildsub(Mu $qast is rw, Mu $block = QAST::Block.new(), :$anon, :$addself, *%rest) {
method qbuildsub(Mu $qast, Mu $block = QAST::Block.new(), :$anon, :$addself, *%rest) {
$block := nqp::decont($block);
my $code_obj := nqp::existskey(%rest, 'code_obj')
?? %rest<code_obj>
Expand Down Expand Up @@ -5919,7 +5919,7 @@ class Perl5::RegexActions does STDActions {
$block;
}

sub capnames(Mu $ast is rw, $count is copy) {
sub capnames(Mu $ast, $count is copy) {
my %capnames;
my $rxtype := $ast.rxtype;
if $rxtype eq 'concat' {
Expand Down

0 comments on commit f0c6157

Please sign in to comment.