[svn:parrot] r47276 - branches/gsoc_past_optimization/runtime/parrot/library/PAST
tcurtis at svn.parrot.org
tcurtis at svn.parrot.org
Wed Jun 2 01:31:17 UTC 2010
Author: tcurtis
Date: Wed Jun 2 01:31:17 2010
New Revision: 47276
URL: https://trac.parrot.org/parrot/changeset/47276
Log:
PAST::Pattern passing all existing tests. Time to add more.
Modified:
branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.pir
Modified: branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.pir
==============================================================================
--- branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.pir Wed Jun 2 01:21:15 2010 (r47275)
+++ branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.pir Wed Jun 2 01:31:17 2010 (r47276)
@@ -74,18 +74,62 @@
.accessor('subid')
.accessor('pirflags')
+.sub 'ACCEPTS' :method
+ .param pmc node
+ $P0 = get_class ['PAST'; 'Block']
+ $I0 = isa node, $P0
+ unless $I0 goto no
+yes:
+ .return (1)
+no:
+ .return (0)
+.end
+
.namespace ['PAST'; 'Pattern'; 'Op']
.accessor('pasttype')
.accessor('pirop')
.accessor('inline')
+.sub 'ACCEPTS' :method
+ .param pmc node
+ $P0 = get_class ['PAST'; 'Op']
+ $I0 = isa node, $P0
+ unless $I0 goto no
+yes:
+ .return (1)
+no:
+ .return (0)
+.end
+
.namespace ['PAST'; 'Pattern'; 'Stmts']
+.sub 'ACCEPTS' :method
+ .param pmc node
+ $P0 = get_class ['PAST'; 'Stmts']
+ $I0 = isa node, $P0
+ unless $I0 goto no
+yes:
+ .return (1)
+no:
+ .return (0)
+.end
+
.namespace ['PAST'; 'Pattern'; 'Val']
.accessor('value')
+.sub 'ACCEPTS' :method
+ .param pmc node
+ $P0 = get_class ['PAST'; 'Val']
+ $I0 = isa node, $P0
+ unless $I0 goto no
+yes:
+ .return (1)
+no:
+ .return (0)
+.end
+
.namespace ['PAST'; 'Pattern'; 'Var']
.accessor('scope')
@@ -97,8 +141,30 @@
.accessor('vivibase')
.accessor('multitype')
+.sub 'ACCEPTS' :method
+ .param pmc node
+ $P0 = get_class ['PAST'; 'Var']
+ $I0 = isa node, $P0
+ unless $I0 goto no
+yes:
+ .return (1)
+no:
+ .return (0)
+.end
+
.namespace ['PAST'; 'Pattern'; 'VarList']
+.sub 'ACCEPTS' :method
+ .param pmc node
+ $P0 = get_class ['PAST'; 'VarList']
+ $I0 = isa node, $P0
+ unless $I0 goto no
+yes:
+ .return (1)
+no:
+ .return (0)
+.end
+
# Local Variables:
# mode: pir
# fill-column: 100
More information about the parrot-commits
mailing list