Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Work around existing bug exposed by mixin caching.
This loses us some of the win on CORE.setting size (70% of the win is
retained), but fixes the various spectest regressions. See comment in
code for details.
  • Loading branch information
jnthn committed Jan 24, 2015
1 parent 432c65a commit 8ec84b6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Perl6/Metamodel/Mixins.nqp
Expand Up @@ -32,7 +32,15 @@ role Perl6::Metamodel::Mixins {
@roles[$i] := nqp::decont(@roles[$i]);
$i++;
}
my $mixin_type := nqp::parameterizetype($!mixin_cache, @roles);
# XXX Workaround for mixing in to non-composed types; when this takes
# place (a bunch during CORE.setting) the mixin is missing bits. This
# has long been a problem, and needs a real solution (it's related to
# the "augment does not convey additions to subclasses" issue); mixin
# caching just makes the problem very visible. For now, don't cache if
# the current type is not yet composed.
my $mixin_type := self.is_composed($obj)
?? nqp::parameterizetype($!mixin_cache, @roles)
!! self.generate_mixin($obj, @roles);

# Ensure there's a mixin attribute, if we need it.
if $need-mixin-attribute {
Expand Down

0 comments on commit 8ec84b6

Please sign in to comment.