Navigation Menu

Skip to content

Commit

Permalink
Move Abstraction role out of builtins and into core setting. This mea…
Browse files Browse the repository at this point in the history
…ns we no longer have any roles defined in the builtins.
  • Loading branch information
pmichaud committed Jul 4, 2010
1 parent f4209ee commit 31ebce5
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 45 deletions.
2 changes: 1 addition & 1 deletion build/Makefile.in
Expand Up @@ -100,7 +100,6 @@ BUILTINS_PIR = \
src/metamodel/GrammarHOW.pir \
src/builtins/Role.pir \
src/builtins/ConcreteRole.pir \
src/builtins/Abstraction.pir \
src/builtins/Positional.pir \
src/builtins/Iterable.pir \
src/builtins/Iterator.pir \
Expand Down Expand Up @@ -171,6 +170,7 @@ CORE_SOURCES = \
src/core/Positional.pm \
src/core/Associative.pm \
src/core/Callable.pm \
src/core/Abstraction.pm \
src/core/traits.pm \
src/core/metaops.pm \
src/core/operators.pm \
Expand Down
41 changes: 0 additions & 41 deletions src/builtins/Abstraction.pir

This file was deleted.

3 changes: 1 addition & 2 deletions src/builtins/Bool.pir
Expand Up @@ -20,8 +20,7 @@ symbols for C<Bool::True> and C<Bool::False>.
.sub 'onload' :anon :init :load
.local pmc p6meta, boolproto, abstraction
p6meta = get_hll_global ['Mu'], '$!P6META'
abstraction = get_hll_global 'Abstraction'
boolproto = p6meta.'new_class'('Bool', 'parent'=>'parrot;Boolean Cool', 'does_role'=>abstraction)
boolproto = p6meta.'new_class'('Bool', 'parent'=>'parrot;Boolean Cool')

$P0 = boolproto.'new'()
$P0 = 0
Expand Down
1 change: 1 addition & 0 deletions src/core/Abstraction.pm
@@ -0,0 +1 @@
role Abstraction { }
2 changes: 1 addition & 1 deletion src/core/Bool.pm
@@ -1,4 +1,4 @@
augment class Bool {
augment class Bool does Abstraction {
method Bool { self }
method ACCEPTS($topic) { self }

Expand Down
1 change: 1 addition & 0 deletions src/glue/role.pir
Expand Up @@ -76,6 +76,7 @@ and so forth.
Method = get_hll_global 'Method'
$I0 = isa Method, 'NameSpace'
unless $I0 goto method_check_done
die "Attempt to create role when Method not defined"
null Method
method_check_done:
meths = parrotrole.'methods'()
Expand Down

0 comments on commit 31ebce5

Please sign in to comment.