Skip to content

Commit

Permalink
Removed (unused) $lazy parameter from add_signature().
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Sep 6, 2010
1 parent 77a72a3 commit ae66feb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/Perl6/Actions.pm
Expand Up @@ -286,7 +286,7 @@ method pblock($/) {
if $<lambda> 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<setprop__vPsP>,
Expand Down Expand Up @@ -1140,7 +1140,7 @@ method routine_def($/) {
pir::defined__IP($block<placeholder_sig>) ?? $block<placeholder_sig> !!
Perl6::Compiler::Signature.new();
$signature.set_default_parameter_type('Any');
add_signature($block, $signature, 1);
add_signature($block, $signature);
if $<trait> {
emit_routine_traits($block, $<trait>, 'Sub');
}
Expand Down Expand Up @@ -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'));

Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Perl6/Compiler/Role.pm
Expand Up @@ -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('');
Expand Down

0 comments on commit ae66feb

Please sign in to comment.