[svn:parrot] r47792 - in branches/gsoc_past_optimization: . config/gen/makefiles runtime/parrot/library/PCT runtime/parrot/library/POST
tcurtis at svn.parrot.org
tcurtis at svn.parrot.org
Thu Jun 24 00:37:54 UTC 2010
Author: tcurtis
Date: Thu Jun 24 00:37:53 2010
New Revision: 47792
URL: https://trac.parrot.org/parrot/changeset/47792
Log:
POST::Pattern and subclasses added. Not yet tested.
Added:
branches/gsoc_past_optimization/runtime/parrot/library/POST/ (props changed)
branches/gsoc_past_optimization/runtime/parrot/library/POST/Pattern.nqp (contents, props changed)
Modified:
branches/gsoc_past_optimization/MANIFEST
branches/gsoc_past_optimization/MANIFEST.SKIP
branches/gsoc_past_optimization/MANIFEST.generated
branches/gsoc_past_optimization/config/gen/makefiles/root.in
branches/gsoc_past_optimization/runtime/parrot/library/PCT/Pattern.nqp
Modified: branches/gsoc_past_optimization/MANIFEST
==============================================================================
--- branches/gsoc_past_optimization/MANIFEST Wed Jun 23 23:24:33 2010 (r47791)
+++ branches/gsoc_past_optimization/MANIFEST Thu Jun 24 00:37:53 2010 (r47792)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Jun 23 07:19:12 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Wed Jun 23 23:41:33 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -1187,6 +1187,7 @@
runtime/parrot/library/PGE/Perl6Grammar.pir [library]
runtime/parrot/library/PGE/Text.pir [library]
runtime/parrot/library/PGE/Util.pir [library]
+runtime/parrot/library/POST/Pattern.nqp [library]
runtime/parrot/library/Parrot/Coroutine.pir [library]
runtime/parrot/library/Parrot/Exception.pir [library]
runtime/parrot/library/Pg.pir [library]
Modified: branches/gsoc_past_optimization/MANIFEST.SKIP
==============================================================================
--- branches/gsoc_past_optimization/MANIFEST.SKIP Wed Jun 23 23:24:33 2010 (r47791)
+++ branches/gsoc_past_optimization/MANIFEST.SKIP Thu Jun 24 00:37:53 2010 (r47792)
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Jun 23 07:19:12 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Wed Jun 23 23:42:18 2010 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
@@ -609,6 +609,11 @@
# generated from svn:ignore of 'runtime/parrot/library/PGE/'
^runtime/parrot/library/PGE/.*\.pbc$
^runtime/parrot/library/PGE/.*\.pbc/
+# generated from svn:ignore of 'runtime/parrot/library/POST/'
+^runtime/parrot/library/POST/.*\.pbc$
+^runtime/parrot/library/POST/.*\.pbc/
+^runtime/parrot/library/POST/Pattern\.pir$
+^runtime/parrot/library/POST/Pattern\.pir/
# generated from svn:ignore of 'runtime/parrot/library/Parrot/'
^runtime/parrot/library/Parrot/.*\.pbc$
^runtime/parrot/library/Parrot/.*\.pbc/
Modified: branches/gsoc_past_optimization/MANIFEST.generated
==============================================================================
--- branches/gsoc_past_optimization/MANIFEST.generated Wed Jun 23 23:24:33 2010 (r47791)
+++ branches/gsoc_past_optimization/MANIFEST.generated Thu Jun 24 00:37:53 2010 (r47792)
@@ -287,6 +287,7 @@
runtime/parrot/library/Parrot/Coroutine.pbc [main]
runtime/parrot/library/Parrot/Exception.pbc [main]
runtime/parrot/library/Parrot/HLLCompiler.pbc [main]
+runtime/parrot/library/POST/Pattern.pbc [main]
runtime/parrot/library/Protoobject.pbc [main]
runtime/parrot/library/Range.pbc [main]
runtime/parrot/library/Regex.pbc [main]
Modified: branches/gsoc_past_optimization/config/gen/makefiles/root.in
==============================================================================
--- branches/gsoc_past_optimization/config/gen/makefiles/root.in Wed Jun 23 23:24:33 2010 (r47791)
+++ branches/gsoc_past_optimization/config/gen/makefiles/root.in Thu Jun 24 00:37:53 2010 (r47792)
@@ -288,6 +288,8 @@
$(LIBRARY_DIR)/PAST/Walker/Dynamic.pbc \
$(LIBRARY_DIR)/PCT/Pattern.pbc \
$(LIBRARY_DIR)/PCT/Pattern.pir \
+ $(LIBRARY_DIR)/POST/Pattern.pbc \
+ $(LIBRARY_DIR)/POST/Pattern.pir \
$(LIBRARY_DIR)/ProfTest.pbc \
$(LIBRARY_DIR)/ProfTest/PIRProfile.pir \
$(LIBRARY_DIR)/ProfTest/NQPProfile.pir \
@@ -1109,6 +1111,12 @@
$(LIBRARY_DIR)/PCT/Pattern.pir: $(LIBRARY_DIR)/PCT/Pattern.nqp $(NQP_RX)
$(NQP_RX) --target=pir $(LIBRARY_DIR)/PCT/Pattern.nqp > $@
+$(LIBRARY_DIR)/POST/Pattern.pbc: $(LIBRARY_DIR)/POST/Pattern.pir
+ $(PARROT) -o $@ $(LIBRARY_DIR)/POST/Pattern.pir
+
+$(LIBRARY_DIR)/POST/Pattern.pir: $(LIBRARY_DIR)/POST/Pattern.nqp $(NQP_RX)
+ $(NQP_RX) --target=pir $(LIBRARY_DIR)/POST/Pattern.nqp > $@
+
#
# Profiling runcore test supporting code
#
Modified: branches/gsoc_past_optimization/runtime/parrot/library/PCT/Pattern.nqp
==============================================================================
--- branches/gsoc_past_optimization/runtime/parrot/library/PCT/Pattern.nqp Wed Jun 23 23:24:33 2010 (r47791)
+++ branches/gsoc_past_optimization/runtime/parrot/library/PCT/Pattern.nqp Thu Jun 24 00:37:53 2010 (r47792)
@@ -43,6 +43,9 @@
if self ~~ PAST::Pattern {
self.check_past_node_attributes($node, $/);
}
+ elsif self ~~ POST::Pattern {
+ self.check_post_node_attributes($node, $/);
+ }
else {
self.check_pct_node_attributes($node, $/);
}
@@ -134,10 +137,15 @@
(self.check_attribute($node, "name", $/)
&& self.check_attribute($node, "source", $/)
&& self.check_attribute($node, "pos", $/));
-
+ $/;
}
}
+INIT {
+ pir::load_bytecode('PAST/Pattern.pbc');
+ pir::load_bytecode('POST/Pattern.pbc');
+}
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
Added: branches/gsoc_past_optimization/runtime/parrot/library/POST/Pattern.nqp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gsoc_past_optimization/runtime/parrot/library/POST/Pattern.nqp Thu Jun 24 00:37:53 2010 (r47792)
@@ -0,0 +1,41 @@
+#!./parrot-nqp
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+INIT {
+ pir::load_bytecode('PCT/Pattern.pbc');
+}
+
+class POST::Pattern is PCT::Pattern {
+ method result ($value?) {
+ self.attr("result", $value, pir::defined__iPP($value));
+ }
+
+ method check_post_node_attributes ($node, $/) {
+ self.check_attribute("result", $node, $/);
+ }
+}
+
+INIT {
+ POST::Pattern.new_subtype('POST::Pattern::Op',
+ POST::Op,
+ :attr(<pirop inline>));
+ POST::Pattern.new_subtype('POST::Pattern::Ops',
+ POST::Ops);
+ POST::Pattern.new_subtype('POST::Pattern::Label',
+ POST::Label);
+ POST::Pattern.new_subtype('POST::Pattern::Sub',
+ POST::Sub,
+ :attr(<blocktype namespace hll outer
+ multi subid pirflags compiler
+ compiler_args paramlist
+ directives>));
+}
+
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
More information about the parrot-commits
mailing list