Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
A couple of more role tweaks to get us closer to passing a bit more.
  • Loading branch information
jnthn committed Jan 12, 2010
1 parent ca8d80b commit 93d662a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/cheats/parrot/P6role.pir
Expand Up @@ -130,15 +130,13 @@ XXX TODO: Needs a complete re-write for ng.
# If we get here, no applicable roles.
$I0 = 0
done:
.const 'Sub' $P0 = 'prefix:?'
$P0 = $P0($I0)
.return ($P0)
.return ($I0)
.end
.sub 'REJECTS' :method
.param pmc topic
$P0 = self.'ACCEPTS'(topic)
.const 'Sub' $P1 = 'prefix:!'
.tailcall $P1($P0)
$I0 = isfalse $P0
.return ($I0)
.end


Expand Down
4 changes: 4 additions & 0 deletions src/pmc/p6role.pmc
Expand Up @@ -29,6 +29,8 @@ pmclass P6role extends Role need_ext dynpmc group perl6_group {
return SUPER(name);
if (Parrot_str_equal(interp, name, CONST_STRING(interp, "ACCEPTS")))
return SUPER(name);
if (Parrot_str_equal(interp, name, CONST_STRING(interp, "REJECTS")))
return SUPER(name);
if (Parrot_str_equal(interp, name, CONST_STRING(interp, "attributes")))
return SUPER(name);
if (Parrot_str_equal(interp, name, CONST_STRING(interp, "methods")))
Expand All @@ -43,6 +45,8 @@ pmclass P6role extends Role need_ext dynpmc group perl6_group {
return SUPER(name);
if (Parrot_str_equal(interp, name, CONST_STRING(interp, "HOW")))
return SUPER(name);
if (Parrot_str_equal(interp, name, CONST_STRING(interp, "WHICH")))
return SUPER(name);
first_char = Parrot_str_substr(interp, name, 0, 1, NULL, 0);
if (Parrot_str_equal(interp, first_char, CONST_STRING(interp, "!")))
return SUPER(name);
Expand Down

0 comments on commit 93d662a

Please sign in to comment.