Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid some NPMCAs and make sure Positional and Associative roles know…

… their names.
  • Loading branch information...
commit 74591399fbe8b79eb465c575a0d9391a791c5099 1 parent 6c7f9ec
Jonathan Worthington jnthn authored
2  src/builtins/Associative.pir
View
@@ -15,6 +15,8 @@ src/classes/Associative.pir - Associative Role
.local pmc role
.const 'Sub' $P0 = '_Associative_role_body'
role = new ['Perl6Role']
+ $P1 = box 'Associative'
+ setattribute role, '$!shortname', $P1
role.'!add_variant'($P0)
set_hll_global 'Associative', role
.end
2  src/builtins/Positional.pir
View
@@ -15,6 +15,8 @@ src/classes/Positional.pir - Positional Role
.local pmc role
.const 'Sub' $P0 = '_positional_role_body'
role = new ['Perl6Role']
+ $P1 = box 'Positional'
+ setattribute role, '$!shortname', $P1
role.'!add_variant'($P0)
set_hll_global 'Positional', role
.end
3  src/builtins/Role.pir
View
@@ -261,7 +261,10 @@ just here so postcircumfix:[ ] doesn't explode).
.sub 'Str' :method :vtable('get_string')
$P0 = getattribute self, '$!shortname'
+ $S0 = 'ANON'
+ if null $P0 goto no_name
$S0 = $P0
+ no_name:
concat $S0, '()'
.return ($S0)
.end
Please sign in to comment.
Something went wrong with that request. Please try again.