Permalink
Browse files

switch IO, PseudoStash, traits, control.pm and stubs.pm to sigilless …

…params
  • Loading branch information...
1 parent d3d3555 commit c9417ca52c502ff174bb518a08f498f7d54544db @moritz moritz committed Aug 14, 2012
Showing with 33 additions and 33 deletions.
  1. +1 −1 src/core/IO.pm
  2. +2 −2 src/core/PseudoStash.pm
  3. +12 −12 src/core/control.pm
  4. +1 −1 src/core/stubs.pm
  5. +17 −17 src/core/traits.pm
View
@@ -197,7 +197,7 @@ class IO does IO::FileTestable {
Bool::True
}
- multi method say(IO:D: |$) {
+ multi method say(IO:D: |) {
my Mu $args := pir::perl6_current_args_rpa__P();
nqp::shift($args);
self.print: nqp::shift($args).gist while $args;
View
@@ -138,14 +138,14 @@ my class PseudoStash is EnumMap {
}
}
- method bind_key($key is copy, \$value) {
+ method bind_key($key is copy, \value) {
$key = $key.Str;
if %pseudoers.exists($key) {
X::Bind.new(target => "pseudo-package $key").throw;
}
elsif $!mode == PRECISE_SCOPE {
my Mu $store := nqp::getattr(self, EnumMap, '$!storage');
- nqp::bindkey($store, nqp::unbox_s($key), $value)
+ nqp::bindkey($store, nqp::unbox_s($key), value)
}
elsif $!mode == DYNAMIC_CHAIN || $!mode == PICK_CHAIN_BY_NAME && substr($key, 1, 1) eq '*' {
die "Binding to dynamic variables not yet implemented";
View
@@ -2,7 +2,7 @@ my class Nil { ... }
my class X::Eval::NoSuchLang { ... }
my &THROW :=
- -> |$ {
+ -> | {
Q:PIR {
.local pmc args, payload, type, severity, ex
args = perl6_current_args_rpa
@@ -21,62 +21,62 @@ my &THROW :=
0
};
-my &RETURN-PARCEL := -> Mu \$parcel {
- my Mu $storage := nqp::getattr($parcel, Parcel, '$!storage');
+my &RETURN-PARCEL := -> Mu \parcel {
+ my Mu $storage := nqp::getattr(parcel, Parcel, '$!storage');
nqp::iseq_i(nqp::elems($storage), 0)
?? Nil
!! (nqp::iseq_i(nqp::elems($storage), 1)
?? nqp::shift($storage)
- !! $parcel)
+ !! parcel)
}
-my &return-rw := -> |$ {
+my &return-rw := -> | {
my $parcel :=
&RETURN-PARCEL(nqp::p6parcel(pir::perl6_current_args_rpa__P(), Nil));
nqp::p6routinereturn($parcel);
$parcel
};
-my &return := -> |$ {
+my &return := -> | {
my $parcel :=
&RETURN-PARCEL(nqp::p6parcel(pir::perl6_current_args_rpa__P(), Nil));
nqp::p6routinereturn(nqp::p6recont_ro($parcel));
$parcel
};
-my &take-rw := -> |$ {
+my &take-rw := -> | {
my $parcel :=
&RETURN-PARCEL(nqp::p6parcel(pir::perl6_current_args_rpa__P(), Nil));
THROW($parcel, pir::const::CONTROL_TAKE)
};
-my &take := -> |$ {
+my &take := -> | {
my $parcel :=
&RETURN-PARCEL(nqp::p6parcel(pir::perl6_current_args_rpa__P(), Nil));
THROW(nqp::p6recont_ro($parcel),
pir::const::CONTROL_TAKE)
};
-my &last := -> |$ {
+my &last := -> | {
my $parcel :=
&RETURN-PARCEL(nqp::p6parcel(pir::perl6_current_args_rpa__P(), Nil));
THROW(nqp::p6decont($parcel),
pir::const::CONTROL_LOOP_LAST)
};
-my &next := -> |$ {
+my &next := -> | {
my $parcel :=
&RETURN-PARCEL(nqp::p6parcel(pir::perl6_current_args_rpa__P(), Nil));
THROW(nqp::p6decont($parcel),
pir::const::CONTROL_LOOP_NEXT)
};
-my &redo := -> |$ {
+my &redo := -> | {
my $parcel :=
&RETURN-PARCEL(nqp::p6parcel(pir::perl6_current_args_rpa__P(), Nil));
THROW(nqp::p6decont($parcel),
pir::const::CONTROL_LOOP_REDO)
};
-my &succeed := -> |$ {
+my &succeed := -> | {
my $parcel :=
&RETURN-PARCEL(nqp::p6parcel(pir::perl6_current_args_rpa__P(), Nil));
THROW(nqp::p6decont($parcel),
View
@@ -30,7 +30,7 @@ sub DYNAMIC(\$name) is rw {
# actually appear in the setting).
{
my class Dummy {
- our proto method AUTOGEN(::T $: |$) { * }
+ our proto method AUTOGEN(::T $: |) { * }
}
Dummy.HOW.set_autogen_proto(&Dummy::AUTOGEN);
}
View
@@ -80,7 +80,7 @@ multi trait_mod:<is>(Parameter:D $param, :$parcel!) {
# TODO: Make this much less cheaty. That'll probably need the
# full-blown serialization, though.
-sub EXPORT_SYMBOL(\$exp_name, @tags, Mu \$sym) {
+sub EXPORT_SYMBOL(\exp_name, @tags, Mu \sym) {
my @export_packages = $*EXPORT;
for pir::perl6ize_type__PP(@*PACKAGES) {
unless .WHO.exists('EXPORT') {
@@ -100,29 +100,29 @@ sub EXPORT_SYMBOL(\$exp_name, @tags, Mu \$sym) {
$*W.pkg_compose($install_in);
$*W.install_package_symbol($p, $tag, $install_in);
}
- if $install_in.WHO.exists($exp_name) {
- unless ($install_in.WHO){$exp_name} =:= $sym {
- X::Export::NameClash.new(symbol => $exp_name).throw;
+ if $install_in.WHO.exists(exp_name) {
+ unless ($install_in.WHO){exp_name} =:= sym {
+ X::Export::NameClash.new(symbol => exp_name).throw;
}
}
- $*W.install_package_symbol($install_in, $exp_name, $sym);
+ $*W.install_package_symbol($install_in, exp_name, sym);
}
}
}
-multi trait_mod:<is>(Routine:D \$r, :$export!) {
- my $to_export := $r.multi ?? $r.dispatcher !! $r;
- my $exp_name := '&' ~ $r.name;
+multi trait_mod:<is>(Routine:D \r, :$export!) {
+ my $to_export := r.multi ?? r.dispatcher !! r;
+ my $exp_name := '&' ~ r.name;
my @tags = 'ALL', ($export ~~ Pair ?? $export.key() !!
$export ~~ Positional ?? @($export)>>.key !!
'DEFAULT');
EXPORT_SYMBOL($exp_name, @tags, $to_export);
}
-multi trait_mod:<is>(Mu:U \$type, :$export!) {
- my $exp_name := $type.HOW.name($type);
+multi trait_mod:<is>(Mu:U \type, :$export!) {
+ my $exp_name := type.HOW.name(type);
my @tags = 'ALL', ($export ~~ Pair ?? $export.key !!
$export ~~ Positional ?? @($export)>>.key !!
'DEFAULT');
- EXPORT_SYMBOL($exp_name, @tags, $type);
+ EXPORT_SYMBOL($exp_name, @tags, type);
}
multi trait_mod:<is>(Mu:D $docee, :$docs!) {
@@ -202,8 +202,8 @@ multi trait_mod:<handles>(Attribute:D $target, $thunk) {
}
method add_delegator_method($attr: $pkg, $meth_name, $call_name) {
- my $meth := method (|$c) is rw {
- $attr.get_value(self)."$call_name"(|$c)
+ my $meth := method (|c) is rw {
+ $attr.get_value(self)."$call_name"(|c)
};
$meth.set_name($meth_name);
$pkg.HOW.add_method($pkg, $meth_name, $meth);
@@ -229,8 +229,8 @@ multi trait_mod:<handles>(Attribute:D $target, $thunk) {
?($name ~~ $expr)
},
-> $obj, $name {
- -> $self, |$c {
- $attr.get_value($self)."$name"(|$c)
+ -> $self, |c {
+ $attr.get_value($self)."$name"(|c)
}
});
}
@@ -241,8 +241,8 @@ multi trait_mod:<handles>(Attribute:D $target, $thunk) {
?$expr.can($name)
},
-> $obj, $name {
- -> $self, |$c {
- $attr.get_value($self)."$name"(|$c)
+ -> $self, |c {
+ $attr.get_value($self)."$name"(|c)
}
});
}

0 comments on commit c9417ca

Please sign in to comment.