[svn:parrot] r40396 - in trunk: lib/Parrot/Pmc2c src/gc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Tue Aug 4 09:09:07 UTC 2009


Author: chromatic
Date: Tue Aug  4 09:09:02 2009
New Revision: 40396
URL: https://trac.parrot.org/parrot/changeset/40396

Log:
[codingstd] Fixed some coding standard mishaps in recent commits (patch mostly
by Michael Hind).

Modified:
   trunk/lib/Parrot/Pmc2c/MethodEmitter.pm
   trunk/src/gc/mark_sweep.c

Modified: trunk/lib/Parrot/Pmc2c/MethodEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/MethodEmitter.pm	Tue Aug  4 08:33:55 2009	(r40395)
+++ trunk/lib/Parrot/Pmc2c/MethodEmitter.pm	Tue Aug  4 09:09:02 2009	(r40396)
@@ -259,7 +259,7 @@
             \(\s*(.*?)\)      # capture argument list
           }x,
             sub {
-              if($pmc->is_dynamic($super)) {
+              if ($pmc->is_dynamic($super)) {
                 return "Parrot_" . $super .
                   "_get_vtable(interp)->$name(" . full_arguments($1) .
                   ')';

Modified: trunk/src/gc/mark_sweep.c
==============================================================================
--- trunk/src/gc/mark_sweep.c	Tue Aug  4 08:33:55 2009	(r40395)
+++ trunk/src/gc/mark_sweep.c	Tue Aug  4 09:09:02 2009	(r40396)
@@ -1243,30 +1243,33 @@
 Parrot_gc_get_attributes_from_pool(PARROT_INTERP, ARGMOD(PMC_Attribute_Pool * pool))
 {
     ASSERT_ARGS(Parrot_gc_get_attributes_from_pool)
-    PMC_Attribute_Free_List * item;
+    PMC_Attribute_Free_List *item;
+
     if (pool->top_arena == NULL
 #if GC_USE_LAZY_ALLOCATOR
-     || (pool->newfree == NULL && pool->free_list == NULL)
+     || (pool->newfree == NULL && pool->free_list == NULL))
 #else
-     || pool->free_list == NULL
+     || pool->free_list == NULL)
 #endif
-     )
         Parrot_gc_allocate_new_attributes_arena(interp, pool);
+
 #if GC_USE_LAZY_ALLOCATOR
-    if(pool->newfree != NULL) {
-        item = pool->newfree;
-        pool->newfree = (PMC_Attribute_Free_List*)((char*)(pool->newfree) + pool->attr_size);
-        if(pool->newfree >= pool->newlast)
+    if (pool->newfree) {
+        item          = pool->newfree;
+        pool->newfree = (PMC_Attribute_Free_List *)
+                            ((char *)(pool->newfree) + pool->attr_size);
+        if (pool->newfree >= pool->newlast)
             pool->newfree = NULL;
     }
     else {
-        item = pool->free_list;
+        item            = pool->free_list;
         pool->free_list = item->next;
     }
 #else
-    item = pool->free_list;
+    item            = pool->free_list;
     pool->free_list = item->next;
 #endif
+
     pool->num_free_objects--;
     return (void *)item;
 }


More information about the parrot-commits mailing list