Skip to content

Commit

Permalink
Use hex for WHERE info in DUMP() and .DUMP-ID()
Browse files Browse the repository at this point in the history
  • Loading branch information
japhb committed Mar 29, 2013
1 parent bce3d7d commit 8d339e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/Mu.pm
Expand Up @@ -278,7 +278,7 @@ my class Mu {

@attrs.DUMP-PIECES(self.DUMP-ID() ~ '(', :$indent-step);
}
method DUMP-ID() { self.HOW.name(self) ~ '<' ~ self.WHERE ~ '>' }
method DUMP-ID() { self.HOW.name(self) ~ '<' ~ self.WHERE.base(16) ~ '>' }
method DUMP-PIECES(@pieces: $before, $after = ')', :$indent = @pieces > 1, :$indent-step) {
$indent ?? $before ~ "\n" ~ @pieces.join(",\n").indent($indent-step) ~ "\n" ~ $after
!! $before ~ @pieces.join(', ') ~ $after;
Expand Down Expand Up @@ -525,7 +525,7 @@ sub DUMP(|args (*@args, :$indent-step = 4)) {
elsif nqp::islist($topic) {
my str $type = pir::typeof__SP($topic);
$type = 'RPA' if $type eq 'ResizablePMCArray';
my $before = $type ~ '<' ~ nqp::p6box_s(nqp::where($topic)) ~ '>(';
my $before = $type ~ '<' ~ nqp::p6box_s(nqp::base_I(nqp::where($topic), 16)) ~ '>(';

my @pieces;
$topic := nqp::clone($topic);
Expand All @@ -542,7 +542,7 @@ sub DUMP(|args (*@args, :$indent-step = 4)) {
}
else {
my str $type = pir::typeof__SP($topic);
$type ~ '<' ~ nqp::p6box_s(nqp::where($topic)) ~ '>(...)';
$type ~ '<' ~ nqp::p6box_s(nqp::base_I(nqp::where($topic), 16)) ~ '>(...)';
}
};

Expand Down

0 comments on commit 8d339e2

Please sign in to comment.