[svn:parrot] r39476 - trunk/src

chromatic at svn.parrot.org chromatic at svn.parrot.org
Tue Jun 9 20:00:04 UTC 2009


Author: chromatic
Date: Tue Jun  9 20:00:03 2009
New Revision: 39476
URL: https://trac.parrot.org/parrot/changeset/39476

Log:
[src] Tidied code; no functional changes.

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

Modified: trunk/src/oo.c
==============================================================================
--- trunk/src/oo.c	Tue Jun  9 19:59:37 2009	(r39475)
+++ trunk/src/oo.c	Tue Jun  9 20:00:03 2009	(r39476)
@@ -265,16 +265,16 @@
 
 PARROT_CANNOT_RETURN_NULL
 PMC *
-Parrot_oo_clone_object(PARROT_INTERP, ARGIN(PMC * pmc),
-    ARGMOD_NULLOK(PMC * class_), ARGMOD_NULLOK(PMC * dest))
+Parrot_oo_clone_object(PARROT_INTERP, ARGIN(PMC *pmc),
+    ARGMOD_NULLOK(PMC *class_), ARGMOD_NULLOK(PMC *dest))
 {
     ASSERT_ARGS(Parrot_oo_clone_object)
-    Parrot_Object_attributes * obj;
-    Parrot_Class_attributes  * _class;
-    INTVAL num_classes;
-    PMC * cloned;
-    Parrot_Object_attributes * cloned_guts;
-    INTVAL i, num_attrs;
+    Parrot_Object_attributes *obj;
+    Parrot_Object_attributes *cloned_guts;
+    Parrot_Class_attributes  *_class;
+    PMC                      *cloned;
+    INTVAL                    num_classes;
+    INTVAL                    i, num_attrs;
 
     if (!PMC_IS_NULL(dest)) {
         PARROT_ASSERT(!PMC_IS_NULL(class_));
@@ -284,9 +284,10 @@
         cloned = dest;
     }
     else {
-        obj = PARROT_OBJECT(pmc);
+        obj    = PARROT_OBJECT(pmc);
         cloned = pmc_new_noinit(interp, enum_class_Object);
     }
+
     _class = PARROT_CLASS(obj->_class);
     PARROT_ASSERT(_class);
     num_classes = VTABLE_elements(interp, _class->all_parents);
@@ -299,7 +300,7 @@
     PObj_is_object_SET(cloned);
 
     /* Now create the underlying structure, and clone attributes list.class. */
-    cloned_guts               = mem_allocate_zeroed_typed(Parrot_Object_attributes);
+    cloned_guts               = mem_allocate_typed(Parrot_Object_attributes);
     PMC_data(cloned)          = cloned_guts;
     cloned_guts->_class       = obj->_class;
     cloned_guts->attrib_store = VTABLE_clone(interp, obj->attrib_store);
@@ -351,7 +352,7 @@
 {
     ASSERT_ARGS(Parrot_oo_new_object_attrs)
     Parrot_Object_attributes * const obj_guts =
-        mem_allocate_zeroed_typed(Parrot_Object_attributes);
+        mem_allocate_typed(Parrot_Object_attributes);
     obj_guts->_class       = class_;
     obj_guts->attrib_store = pmc_new(interp, enum_class_ResizablePMCArray);
     return (void *)obj_guts;

Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c	Tue Jun  9 19:59:37 2009	(r39475)
+++ trunk/src/pmc.c	Tue Jun  9 20:00:03 2009	(r39476)
@@ -196,13 +196,13 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_IGNORABLE_RESULT
 PMC *
-pmc_reuse_by_class(PARROT_INTERP, ARGMOD(PMC * pmc), ARGIN(PMC * class_),
+pmc_reuse_by_class(PARROT_INTERP, ARGMOD(PMC *pmc), ARGIN(PMC *class_),
     UINTVAL flags)
 {
     ASSERT_ARGS(pmc_reuse_by_class)
-    const INTVAL new_type = PARROT_CLASS(class_)->id;
+    const INTVAL   new_type   = PARROT_CLASS(class_)->id;
     VTABLE * const new_vtable = interp->vtables[new_type];
-    INTVAL new_flags = flags;
+    INTVAL         new_flags  = flags;
 
     if (pmc->vtable->base_type == new_type)
         return pmc;
@@ -214,7 +214,8 @@
     if (PObj_active_destroy_TEST(pmc))
         VTABLE_destroy(interp, pmc);
 
-    new_flags = pmc_reuse_check_pmc_ext(interp, pmc, new_flags, new_vtable->flags);
+    new_flags = pmc_reuse_check_pmc_ext(interp, pmc,
+        new_flags, new_vtable->flags);
 
     /* we are a PMC + maybe is_PMC_EXT */
     PObj_flags_SETTO(pmc, PObj_is_PMC_FLAG | new_flags);


More information about the parrot-commits mailing list