Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
De-break round-trip of some circular structures
The fix[^1] to fix .perl.EVAL roundtripping of Array and Hash circular
accidentally broke compilation of .perl of all the other types of structures.

Even though they're still broken in the sense that their EVAL does not
produce the correct values, this commit at least unbreaks their compilation.

[1] 67aeefacf5fb9c35189bcc70
  • Loading branch information
zoffixznet committed Feb 18, 2017
1 parent ca102c5 commit 673f06b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/Mu.pm
Expand Up @@ -508,15 +508,17 @@ my class Mu { # declared in BOOTSTRAP
my str $WHICH = nqp::unbox_s(self.WHICH);
if nqp::existskey(sems,$WHICH) && nqp::atkey(sems,$WHICH) {
nqp::bindkey(sems,$WHICH,2);
"{$sigil}{$id}_{nqp::objectid(SELF)}";
$sigil x nqp::isne_s($sigil, '\\') ~ "{$id}_{nqp::objectid(SELF)}";
}
else {
nqp::bindkey(sems,$WHICH,1);
my $result := $perl(|%named);
my int $value = nqp::atkey(sems,$WHICH);
nqp::deletekey(sems,$WHICH);
$value == 2
?? "((my {$sigil}{$id}_{nqp::objectid(SELF)}) = $result)"
?? nqp::iseq_s($sigil, '\\')
?? "(my {$sigil}{$id}_{nqp::objectid(SELF)} = $result)"
!! "((my {$sigil}{$id}_{nqp::objectid(SELF)}) = $result)"
!! $result
}
}
Expand Down

0 comments on commit 673f06b

Please sign in to comment.