Skip to content

Commit

Permalink
hide some dispatchers from backtraces
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Apr 27, 2012
1 parent 256e1db commit dda5b09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/Mu.pm
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ my class Mu {
}

# XXX TODO: Handle positional case.
method dispatch:<var>(Mu \$self: $var, |$c) is rw {
method dispatch:<var>(Mu \$self: $var, |$c) is rw is hidden_from_backtrace {
$var($self, |$c)
}

Expand All @@ -263,23 +263,23 @@ my class Mu {
pir::find_method__PPS($type, $name)($self, |$c)
}

method dispatch:<!>(Mu \$self: $name, Mu $type, |$c) is rw {
method dispatch:<!>(Mu \$self: $name, Mu $type, |$c) is rw is hidden_from_backtrace {
my $meth := $type.HOW.find_private_method($type, $name);
$meth ??
$meth($self, |$c) !!
die("Private method '$name' not found on type " ~ $type.HOW.name($type))

}

method dispatch:<.^>(Mu \$self: $name, |$c) is rw {
method dispatch:<.^>(Mu \$self: $name, |$c) is rw is hidden_from_backtrace {
self.HOW."$name"($self, |$c)
}

method dispatch:<.=>(\$mutate: $name, |$c) is rw {
$mutate = $mutate."$name"(|$c)
}

method dispatch:<.?>(Mu \$self: $name, |$c) is rw {
method dispatch:<.?>(Mu \$self: $name, |$c) is rw is hidden_from_backtrace {
pir::can__IPS($self, $name) ??
$self."$name"(|$c) !!
Nil
Expand Down

0 comments on commit dda5b09

Please sign in to comment.