Author: bernhard
Date: Thu Nov 10 14:10:01 2005
New Revision: 9893

Modified:
   trunk/src/hash.c
   trunk/src/list.c
   trunk/src/pmc_freeze.c
   trunk/src/trace.c
Log:
Clean remaining Perl* PMCs from src/.
Standard tests are still successfull. See [perl #32642]


Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c    (original)
+++ trunk/src/hash.c    Thu Nov 10 14:10:01 2005
@@ -520,7 +520,7 @@ pointer once Buffers can define their ow
 The problem is: During DODs stack walking the item on the stack must be
 a PMC. When an auto C<Hash*> is seen, it doesn't get properly marked
 (only the C<Hash*> buffer is marked, not its contents). By passing the
-C<**hptr> up to the PerlHash's or Hash's init function, the newly constructed 
PMC is
+C<**hptr> up to the Hash's init function, the newly constructed PMC is
 on the stack I<including> this newly constructed Hash, so that it gets
 marked properly.
 

Modified: trunk/src/list.c
==============================================================================
--- trunk/src/list.c    (original)
+++ trunk/src/list.c    Thu Nov 10 14:10:01 2005
@@ -69,7 +69,7 @@ be created.
 To avoid this - and the performance penalty - set the array size
 before setting elements.
 
-    new P0, .PerlArray
+    new P0, .Array
     set P0, 100000  # sets fixed sized, no sparse
 
 This is only meaningful, if a lot of the entries are used too.
@@ -1225,8 +1225,8 @@ C<list_new_init()> uses these initialize
 After getting these values out of the key/value pairs, a new array with
 these values is stored in user_data, where the keys are explicit.
 
-=item C<void
-list_pmc_new_init(Interp *interpreter, PMC *container, PMC *init)>
+=item C<List *
+list_new_init(Interp *interpreter, PMC *container, PMC *init)>
 
 Create a new list containing PMC* values in PMC_data(container).
 
@@ -1241,10 +1241,7 @@ list_new_init(Interp *interpreter, INTVA
     PMC * user_array, *multi_key;
     INTVAL i, len, size, key, val, item_size, items_per_chunk;
 
-    if (!init->vtable ||
-            ((init->vtable->base_type != enum_class_PerlArray) &&
-             (init->vtable->base_type != enum_class_SArray) &&
-             (init->vtable->base_type != enum_class_Array)))
+    if (!init->vtable)
         internal_exception(1, "Illegal initializer for init\n");
     len = VTABLE_elements(interpreter, init);
     if (len & 1)

Modified: trunk/src/pmc_freeze.c
==============================================================================
--- trunk/src/pmc_freeze.c      (original)
+++ trunk/src/pmc_freeze.c      Thu Nov 10 14:10:01 2005
@@ -806,7 +806,7 @@ thaw_pmc(Parrot_Interp interpreter, visi
 
 Freeze and thaw a PMC (id).
 
-For example, the ASCII representation of the C<PerlArray>
+For example, the ASCII representation of the C<Array>
 
 P0 = [P1=666, P2=777, P0]
 
@@ -814,8 +814,8 @@ may look like this:
 
 0xdf4 30 3 0xdf8 33 666 0xdf2 777 0xdf5
 
-where 30 is C<class_enum_PerlArray>, 33 is C<class_enum_PerlInt>, the
-type of the second C<PerlInt> is suppressed, the repeated P0 has bit 0
+where 30 is C<class_enum_Array>, 33 is C<class_enum_Integer>, the
+type of the second C<Integer> is suppressed, the repeated P0 has bit 0
 set.
 
 =cut

Modified: trunk/src/trace.c
==============================================================================
--- trunk/src/trace.c   (original)
+++ trunk/src/trace.c   Thu Nov 10 14:10:01 2005
@@ -71,7 +71,7 @@ trace_pmc_dump(Interp *interpreter, PMC*
         STRING *name = trace_class_name(interpreter, pmc);
         PIO_eprintf(interpreter, "Class=%Ss:PMC(%#p)", name, pmc);
     }
-    else if (pmc->vtable->base_type == enum_class_PerlString ||
+    else if (
              pmc->vtable->base_type == enum_class_String) {
         STRING *s = VTABLE_get_string(interpreter, pmc);
         if (!s)
@@ -104,12 +104,6 @@ trace_pmc_dump(Interp *interpreter, PMC*
         PIO_eprintf(interpreter, "Complex=PMC(%#p: %Ss)",
                 pmc, s);
     }
-    else if (pmc->vtable->base_type == enum_class_PerlUndef
-            ||  pmc->vtable->base_type == enum_class_PerlInt
-            ||  pmc->vtable->base_type == enum_class_PerlNum) {
-        PIO_eprintf(interpreter, "%S=PMC(%#p Num:%Pf Int:%Pd)",
-                VTABLE_name(interpreter, pmc), pmc, pmc, pmc);
-    }
     else if (pmc->vtable->base_type == enum_class_RetContinuation
             ||  pmc->vtable->base_type == enum_class_Continuation
             ||  pmc->vtable->base_type == enum_class_Sub) {

Reply via email to