[svn:parrot] r35719 - trunk/src

[email protected]
Newsgroups perl.cvs.parrot
Message-ID <[email protected]>
Author: Whiteknight
Date: Sun Jan 18 07:47:06 2009
New Revision: 35719

Modified:
   trunk/src/oo.c
   trunk/src/pmc.c

Log:
[get_class] roll back a few changes which appear to be breaking Rakudo.

Modified: trunk/src/oo.c
==============================================================================
--- trunk/src/oo.c	(original)
+++ trunk/src/oo.c	Sun Jan 18 07:47:06 2009
@@ -224,12 +224,12 @@
         INTVAL type;
         const INTVAL base_type = key->vtable->base_type;
 
-        /* XXX TT#182: This is a hack! We should be able to treat all
-           PMC types the same through pmc_type_p or some interface to it */
+        /* This is a hack! All PMCs should be able to be handled through
+           a single codepath, and all of them should be able to avoid
+           stringification because it's so imprecise. */
         if (base_type == enum_class_Key
          || base_type == enum_class_ResizableStringArray
-         || base_type == enum_class_String
-         || base_type == enum_class_NameSpace)
+         || base_type == enum_class_String)
             type = pmc_type_p(interp, key);
         else
             type = pmc_type(interp, VTABLE_get_string(interp, key));

Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c	(original)
+++ trunk/src/pmc.c	Sun Jan 18 07:47:06 2009
@@ -619,20 +619,6 @@
     PMC * const classname_hash = interp->class_hash;
     PMC * item;
 
-    if (name->vtable->base_type == enum_class_NameSpace) {
-        /* We need to convert the NameSpace to a ResizableStringArray. The
-           get_name method does this for now, but eventually we should be
-           able to do a morph VTABLE call instead */
-        Parrot_PCCINVOKE(interp, name, CONST_STRING(interp, "get_name"), "->P",  &name);
-
-        /* We need to chop off the HLL namespace. If it is the root
-           namespace, the array will be empty so don't try to do a shift
-           here */
-        if (VTABLE_get_integer(interp, name) > 0)
-            VTABLE_shift_pmc(interp, name);
-        else
-            return 0;
-    }
     item = (PMC *)VTABLE_get_pointer_keyed(interp, classname_hash, name);
 
     if (!PMC_IS_NULL(item))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.