Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Need a place for the dispatcher to hang any extra info it needs.
  • Loading branch information
jnthn committed May 30, 2011
1 parent 91ec2d0 commit 2f29d66
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Perl6/Metamodel/BOOTSTRAP.pm
Expand Up @@ -86,16 +86,18 @@ Parameter.HOW.add_attribute(Parameter, BOOTSTRAPATTR.new(:name<$!sub_signature>,
Parameter.HOW.add_attribute(Parameter, BOOTSTRAPATTR.new(:name<$!default_closure>, :type(Mu)));

# class Code is Cool {
# has $!do;
# has $!signature;
# has $!dispatchees;
# has $!do; # Low level code object
# has $!signature; # Signature object
# has $!dispatchees; # If this is a dispatcher, the dispatchee list.
# has $!dispatcher_info; # Stash for any extra dispatcher info.
# ... # Uncomposed
# }
my stub Code metaclass Perl6::Metamodel::ClassHOW { ... };
Code.HOW.add_parent(Code, Cool);
Code.HOW.add_attribute(Code, BOOTSTRAPATTR.new(:name<$!do>, :type(Mu)));
Code.HOW.add_attribute(Code, BOOTSTRAPATTR.new(:name<$!signature>, :type(Mu)));
Code.HOW.add_attribute(Code, BOOTSTRAPATTR.new(:name<$!dispatchees>, :type(Mu)));
Code.HOW.add_attribute(Code, BOOTSTRAPATTR.new(:name<$!dispatcher_info>, :type(Mu)));

# Need to actually run the code block. Also need this available before we finish
# up the stub.
Expand Down

0 comments on commit 2f29d66

Please sign in to comment.