[svn:parrot] r39619 - branches/tt761_keys_revamp/src/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Wed Jun 17 11:46:49 UTC 2009


Author: bacek
Date: Wed Jun 17 11:46:49 2009
New Revision: 39619
URL: https://trac.parrot.org/parrot/changeset/39619

Log:
[pmc] Iterator.new now use HashIterator for Hashes.

Point of no return. All Hash test passed. Almost all tests for Hash-like
PMCs are failing badly.

Modified:
   branches/tt761_keys_revamp/src/pmc/iterator.pmc

Modified: branches/tt761_keys_revamp/src/pmc/iterator.pmc
==============================================================================
--- branches/tt761_keys_revamp/src/pmc/iterator.pmc	Wed Jun 17 11:46:29 2009	(r39618)
+++ branches/tt761_keys_revamp/src/pmc/iterator.pmc	Wed Jun 17 11:46:49 2009	(r39619)
@@ -105,6 +105,10 @@
             SELF = pmc_reuse_init(INTERP, SELF, enum_class_ArrayIterator, aggregate, 0);
             return;
         }
+        else if (VTABLE_does(INTERP, aggregate, CONST_STRING(INTERP, "hash"))) {
+            SELF = pmc_reuse_init(INTERP, SELF, enum_class_HashIterator, aggregate, 0);
+            return;
+        }
         else {
             Parrot_Iterator_attributes *attrs =
                 mem_allocate_zeroed_typed(Parrot_Iterator_attributes);


More information about the parrot-commits mailing list