Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More pir:: -> nqp:: and add 'name' methods.
  • Loading branch information
jnthn committed Feb 1, 2013
1 parent f544686 commit f7f8eb6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/core/NQPRoutine.pm
Expand Up @@ -15,7 +15,7 @@ my knowhow NQPRoutine {
my $do := nqp::clone($!do);

# Clone and attach the code object.
my $der := pir::repr_clone__PP(self);
my $der := nqp::clone(self);
nqp::bindattr($der, NQPRoutine, '$!do', $do);
nqp::bindattr($der, NQPRoutine, '$!dispatchees', nqp::clone($!dispatchees));
nqp::setcodeobj($do, $der);
Expand All @@ -33,7 +33,7 @@ my knowhow NQPRoutine {
my $do := nqp::clone($!do);

# Clone and attach the code object.
my $der := pir::repr_clone__PP(self);
my $der := nqp::clone(self);
nqp::bindattr($der, NQPRoutine, '$!do', $do);
nqp::setcodeobj($do, $der);

Expand All @@ -48,6 +48,9 @@ my knowhow NQPRoutine {
method !set_name($name) {
nqp::setcodename($!do, $name);
}
method name() {
nqp::getcodename($!do)
}
}
nqp::setinvokespec(NQPRoutine, NQPRoutine, '$!do', nqp::null);
nqp::setboolspec(NQPRoutine, 5, nqp::null());
Expand Down Expand Up @@ -103,7 +106,7 @@ my knowhow NQPRegex {
my $do := nqp::clone($!do);

# Clone and attach the code object.
my $der := pir::repr_clone__PP(self);
my $der := nqp::clone(self);
nqp::bindattr($der, NQPRegex, '$!do', $do);
nqp::setcodeobj($do, $der);

Expand Down Expand Up @@ -131,6 +134,9 @@ my knowhow NQPRegex {
$ins
}
}
method name() {
nqp::getcodename($!do)
}
method !set_name($name) {
nqp::setcodename($!do, $name);
}
Expand Down

0 comments on commit f7f8eb6

Please sign in to comment.