[svn:parrot] r47321 - in branches/gsoc_past_optimization: runtime/parrot/library/PAST t/library
tcurtis at svn.parrot.org
tcurtis at svn.parrot.org
Thu Jun 3 06:16:15 UTC 2010
Author: tcurtis
Date: Thu Jun 3 06:16:15 2010
New Revision: 47321
URL: https://trac.parrot.org/parrot/changeset/47321
Log:
Block attributes other than symtable are now tested for exact matches.
Modified:
branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.nqp
branches/gsoc_past_optimization/t/library/pastpattern.t
Modified: branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.nqp
==============================================================================
--- branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.nqp Thu Jun 3 02:34:26 2010 (r47320)
+++ branches/gsoc_past_optimization/runtime/parrot/library/PAST/Pattern.nqp Thu Jun 3 06:16:15 2010 (r47321)
@@ -155,7 +155,20 @@
}
sub check_block_attributes($pattern, $node) {
- PAST::Pattern::check_attribute($pattern, $node, "blocktype");
+ (PAST::Pattern::check_attribute($pattern, $node, "blocktype")
+ && PAST::Pattern::check_attribute($pattern, $node, "closure")
+ && PAST::Pattern::check_attribute($pattern, $node, "control")
+ && PAST::Pattern::check_attribute($pattern, $node, "loadinit")
+ && PAST::Pattern::check_attribute($pattern, $node, "namespace")
+ && PAST::Pattern::check_attribute($pattern, $node, "multi")
+ && PAST::Pattern::check_attribute($pattern, $node, "hll")
+ && PAST::Pattern::check_attribute($pattern, $node, "nsentry")
+ && PAST::Pattern::check_attribute($pattern, $node, "lexical")
+ && PAST::Pattern::check_attribute($pattern, $node, "compiler")
+ && PAST::Pattern::check_attribute($pattern, $node,
+ "compiler_args")
+ && PAST::Pattern::check_attribute($pattern, $node, "subid")
+ && PAST::Pattern::check_attribute($pattern, $node, "pirflags"));
}
method ACCEPTS ($node) {
Modified: branches/gsoc_past_optimization/t/library/pastpattern.t
==============================================================================
--- branches/gsoc_past_optimization/t/library/pastpattern.t Thu Jun 3 02:34:26 2010 (r47320)
+++ branches/gsoc_past_optimization/t/library/pastpattern.t Thu Jun 3 06:16:15 2010 (r47321)
@@ -5,7 +5,7 @@
pir::load_bytecode('PCT.pbc');
pir::load_bytecode('PAST/Pattern.pbc');
-plan(509);
+plan(605);
test_type_matching();
test_attribute_exact_matching();
@@ -158,6 +158,18 @@
sub test_attribute_exact_matching_block_attributes () {
test_attribute_exact_matching_on_block_attr("blocktype");
+ test_attribute_exact_matching_on_block_attr("closure");
+ test_attribute_exact_matching_on_block_attr("control");
+ test_attribute_exact_matching_on_block_attr("loadinit");
+ test_attribute_exact_matching_on_block_attr("namespace");
+ test_attribute_exact_matching_on_block_attr("multi");
+ test_attribute_exact_matching_on_block_attr("hll");
+ test_attribute_exact_matching_on_block_attr("nsentry");
+ test_attribute_exact_matching_on_block_attr("lexical");
+ test_attribute_exact_matching_on_block_attr("compiler");
+ test_attribute_exact_matching_on_block_attr("compiler_args");
+ test_attribute_exact_matching_on_block_attr("subid");
+ test_attribute_exact_matching_on_block_attr("pirflags");
}
sub test_attribute_exact_matching_on_block_attr($attr) {
More information about the parrot-commits
mailing list