[svn:parrot] r49184 - branches/gc_massacre/include/parrot

chromatic at svn.parrot.org chromatic at svn.parrot.org
Mon Sep 20 20:14:14 UTC 2010


Author: chromatic
Date: Mon Sep 20 20:14:14 2010
New Revision: 49184
URL: https://trac.parrot.org/parrot/changeset/49184

Log:
[include] Optimized LIST_APPEND macro slightly.

Modified:
   branches/gc_massacre/include/parrot/list.h

Modified: branches/gc_massacre/include/parrot/list.h
==============================================================================
--- branches/gc_massacre/include/parrot/list.h	Mon Sep 20 20:14:11 2010	(r49183)
+++ branches/gc_massacre/include/parrot/list.h	Mon Sep 20 20:14:14 2010	(r49184)
@@ -54,15 +54,14 @@
     (_item)->prev = (_item)->next = NULL;   \
                                             \
     if (_list->last) {                      \
-        _item->prev = _list->last;          \
+        _item->prev       = _list->last;    \
         _list->last->next = _item;          \
     }                                       \
+    else if (!_list->first)                 \
+        _list->first = _item;               \
                                             \
     _list->last = _item;                    \
                                             \
-    if (!_list->first)                      \
-        _list->first = _item;               \
-                                            \
     SET_LIST_OWNER(_list, _item)            \
     _list->count++;                         \
 } while (0);


More information about the parrot-commits mailing list