Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Get packages meta-objects to set a hash in their .WHO (can promote it…
… to some more full-on Stash type later, probably, but this is fine for now.) (Foo.WHO)<$x> := 42 style stuff now works fine.
  • Loading branch information
jnthn committed Apr 17, 2011
1 parent 7462ede commit 1d1ea2f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/metamodel/how/NQPClassHOW.pm
Expand Up @@ -52,7 +52,9 @@ knowhow NQPClassHOW {
# to go with it, and return that.
method new_type(:$name = '<anon>', :$repr = 'P6opaque') {
my $metaclass := self.new(:name($name));
pir::repr_type_object_for__PPS($metaclass, $repr);
pir::set_who__0PP(
pir::repr_type_object_for__PPS($metaclass, $repr),
{});
}

method add_method($obj, $name, $code_obj) {
Expand Down
4 changes: 3 additions & 1 deletion src/metamodel/how/NQPModuleHOW.pm
Expand Up @@ -16,7 +16,9 @@ knowhow NQPModuleHOW {
# to go with it, and return that.
method new_type(:$name = '<anon>', :$repr = 'P6opaque') {
my $metaclass := self.new(:name($name));
pir::repr_type_object_for__PPS($metaclass, $repr);
pir::set_who__0PP(
pir::repr_type_object_for__PPS($metaclass, $repr),
{});
}

method add_method($obj, $name, $code_obj) {
Expand Down
4 changes: 3 additions & 1 deletion src/metamodel/how/NQPNativeHOW.pm
Expand Up @@ -17,7 +17,9 @@ knowhow NQPNativeHOW {
# XXX Should check that this is an inlineable REPR.
method new_type(:$name = '<anon>', :$repr!) {
my $metaclass := self.new(:name($name));
pir::repr_type_object_for__PPS($metaclass, $repr);
pir::set_who__0PP(
pir::repr_type_object_for__PPS($metaclass, $repr),
{});
}

method add_method($obj, $name, $code_obj) {
Expand Down
4 changes: 3 additions & 1 deletion src/metamodel/how/NQPParametricRoleHOW.pm
Expand Up @@ -46,7 +46,9 @@ knowhow NQPParametricRoleHOW {
# to go with it, and return that.
method new_type(:$name = '<anon>', :$repr = 'P6opaque') {
my $metarole := self.new(:name($name));
pir::repr_type_object_for__PPS($metarole, $repr);
pir::set_who__0PP(
pir::repr_type_object_for__PPS($metarole, $repr),
{});
}

method set_body_block($obj, $body_block) {
Expand Down

0 comments on commit 1d1ea2f

Please sign in to comment.