[svn:parrot] r47631 - branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern
tcurtis at svn.parrot.org
tcurtis at svn.parrot.org
Tue Jun 15 00:14:01 UTC 2010
Author: tcurtis
Date: Tue Jun 15 00:14:01 2010
New Revision: 47631
URL: https://trac.parrot.org/parrot/changeset/47631
Log:
Change the Bool method to call the "get_bool" vtable instead of vice versa.
Modified:
branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern/Match.nqp
Modified: branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern/Match.nqp
==============================================================================
--- branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern/Match.nqp Tue Jun 15 00:08:39 2010 (r47630)
+++ branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern/Match.nqp Tue Jun 15 00:14:01 2010 (r47631)
@@ -19,7 +19,7 @@
}
method Bool () {
- pir::getattribute__PPS(self, '$!success');
+ ?self;
}
method ast () {
@@ -49,17 +49,18 @@
}
INIT {
- my $parrotclass :=
+ my $pc :=
pir::getattribute__PPS(PAST::Pattern::Match.HOW(), "parrotclass");
- $parrotclass.add_vtable_override("get_bool",
- sub ($self) {
- $self.Bool();
- });
-
- $parrotclass.add_method("!make",
- method ($ast) {
- pir::setattribute(self, ~'$!ast', $ast);
+ $pc.add_vtable_override("get_bool",
+ method () {
+ ?pir::getattribute__PPS(self,
+ '$!success');
});
+
+ $pc.add_method("!make",
+ method ($ast) {
+ pir::setattribute(self, ~'$!ast', $ast);
+ });
}
# Local Variables:
More information about the parrot-commits
mailing list