From ae66feb5b826eb81ee9d4ac220f094921bed2126 Mon Sep 17 00:00:00 2001 From: pmichaud Date: Mon, 6 Sep 2010 13:27:23 -0500 Subject: [PATCH] Removed (unused) $lazy parameter from add_signature(). --- src/Perl6/Actions.pm | 16 ++++++++-------- src/Perl6/Compiler/Role.pm | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Perl6/Actions.pm b/src/Perl6/Actions.pm index 2e9a874907a..6109369cf42 100644 --- a/src/Perl6/Actions.pm +++ b/src/Perl6/Actions.pm @@ -286,7 +286,7 @@ method pblock($/) { if $ eq '<->' { $signature.set_rw_by_default(); } - add_signature($block, $signature, 0); + add_signature($block, $signature); # We ought to find a way to avoid this, but it seems necessary for now. $block.loadinit.push( PAST::Op.new( :pirop, @@ -1140,7 +1140,7 @@ method routine_def($/) { pir::defined__IP($block) ?? $block !! Perl6::Compiler::Signature.new(); $signature.set_default_parameter_type('Any'); - add_signature($block, $signature, 1); + add_signature($block, $signature); if $ { emit_routine_traits($block, $, 'Sub'); } @@ -1281,7 +1281,7 @@ method method_def($/) { } # Add signature to block. - add_signature($past, $sig, 1); + add_signature($past, $sig); $past[0].unshift(PAST::Var.new( :name('self'), :scope('lexical'), :isdecl(1), :viviself(sigiltype('$')) )); $past.symbol('self', :scope('lexical')); @@ -1491,7 +1491,7 @@ method regex_def($/, $key?) { $sig.set_default_parameter_type('Any'); $past[0].unshift(PAST::Var.new( :name('self'), :scope('lexical'), :isdecl(1), :viviself(sigiltype('$')) )); $past.symbol('self', :scope('lexical')); - add_signature($past, $sig, 1); + add_signature($past, $sig); $past.name($name); $past.blocktype("declaration"); @@ -3006,8 +3006,8 @@ class Perl6::RegexActions is Regex::P6Regex::Actions { } # Takes a block and adds a signature to it, as well as code to bind the call -# capture against the signature. Returns the name of the signature setup block. -sub add_signature($block, $sig_obj, $lazy) { +# capture against the signature. +sub add_signature($block, $sig_obj) { # Set arity. $block.arity($sig_obj.arity); @@ -3397,7 +3397,7 @@ sub make_attr_init_closure($init_value) { my $sig := Perl6::Compiler::Signature.new( Perl6::Compiler::Parameter.new(:var_name('$_'))); $sig.add_invocant(); - add_signature($block, $sig, 1); + add_signature($block, $sig); @BLOCK[0].push($block); # Return a code object using a reference to the block. @@ -3560,7 +3560,7 @@ sub make_block_from($sig, $body, $type = 'Block') { $body ) ); - add_signature($past, $sig, 1); + add_signature($past, $sig); create_code_object($past, $type, 0); } diff --git a/src/Perl6/Compiler/Role.pm b/src/Perl6/Compiler/Role.pm index 963ebb619c2..d88dc0eb2ac 100644 --- a/src/Perl6/Compiler/Role.pm +++ b/src/Perl6/Compiler/Role.pm @@ -127,7 +127,7 @@ method finish($block) { # We need the block to get the signature, or a default one, plus the # decl code as a body. my $sig := pir::defined__IP($!signature) ?? $!signature !! Perl6::Compiler::Signature.new(); - Perl6::Actions::add_signature($block, $sig, 1); + Perl6::Actions::add_signature($block, $sig); $block.push($decl); $block.blocktype('declaration'); $block.nsentry('');