[svn:parrot] r37898 - in trunk: include/parrot src src/gc src/jit/i386

cotto at svn.parrot.org cotto at svn.parrot.org
Sat Apr 4 07:58:34 UTC 2009


Author: cotto
Date: Sat Apr  4 07:58:33 2009
New Revision: 37898
URL: https://trac.parrot.org/parrot/changeset/37898

Log:
[h] remove obselete conditional PMC_DATA_IN_EXT
revert unnecessary header inclusion

Modified:
   trunk/include/parrot/pobj.h
   trunk/src/gc/api.c
   trunk/src/jit/i386/jit_defs.c
   trunk/src/pmc.c

Modified: trunk/include/parrot/pobj.h
==============================================================================
--- trunk/include/parrot/pobj.h	Sat Apr  4 07:41:28 2009	(r37897)
+++ trunk/include/parrot/pobj.h	Sat Apr  4 07:58:33 2009	(r37898)
@@ -128,10 +128,6 @@
     const struct _charset  *charset;
 };
 
-
-/* put data into the PMC_EXT structure */
-#define PMC_DATA_IN_EXT 0
-
 /* note that cache and flags are isomorphic with Buffer and PObj */
 struct PMC {
     UnionVal        cache;
@@ -144,9 +140,6 @@
 struct _Sync;   /* forward decl */
 
 typedef struct PMC_EXT {
-#if PMC_DATA_IN_EXT
-    DPOINTER *data;
-#endif /* PMC_DATA_IN_EXT */
     PMC *_metadata;      /* properties */
     /*
      * PMC access synchronization for shared PMCs
@@ -178,18 +171,11 @@
 #else
 #  define PMC_ext_checked(pmc)             (PARROT_ASSERT((pmc)->pmc_ext), (pmc)->pmc_ext)
 #endif /* NDEBUG */
-#if PMC_DATA_IN_EXT
-#  define PMC_data(pmc)                   PMC_ext_checked(pmc)->data
-#  define PMC_data_typed(pmc, type) (type)PMC_ext_checked(pmc)->data
-#  define PMC_data0(pmc)      ((pmc)->pmc_ext ? pmc->pmc_ext->data : 0)
-#  define PMC_data0_typed(pmc, type) (type)((pmc)->pmc_ext ? pmc->pmc_ext->data : 0)
-#else
-#  define PMC_data(pmc)                   (pmc)->data
-#  define PMC_data_typed(pmc, type) (type)(pmc)->data
+#define PMC_data(pmc)                   (pmc)->data
+#define PMC_data_typed(pmc, type) (type)(pmc)->data
 /* do not allow PMC_data2 as lvalue */
-#  define PMC_data0(pmc)            (1 ? (pmc)->data : 0)
-#  define PMC_data0_typed(pmc)      (type)(1 ? (pmc)->data : 0)
-#endif /* PMC_DATA_IN_EXT */
+#define PMC_data0(pmc)            (1 ? (pmc)->data : 0)
+#define PMC_data0_typed(pmc)      (type)(1 ? (pmc)->data : 0)
 #define PMC_metadata(pmc)     PMC_ext_checked(pmc)->_metadata
 #define PMC_next_for_GC(pmc)  PMC_ext_checked(pmc)->_next_for_GC
 #define PMC_sync(pmc)         PMC_ext_checked(pmc)->_synchronize

Modified: trunk/src/gc/api.c
==============================================================================
--- trunk/src/gc/api.c	Sat Apr  4 07:41:28 2009	(r37897)
+++ trunk/src/gc/api.c	Sat Apr  4 07:58:33 2009	(r37898)
@@ -90,10 +90,7 @@
 
     PObj_get_FLAGS(pmc) = PObj_is_PMC_FLAG|flags;
     pmc->vtable         = NULL;
-
-#if ! PMC_DATA_IN_EXT
     PMC_data(pmc)       = NULL;
-#endif
 
     return pmc;
 }

Modified: trunk/src/jit/i386/jit_defs.c
==============================================================================
--- trunk/src/jit/i386/jit_defs.c	Sat Apr  4 07:41:28 2009	(r37897)
+++ trunk/src/jit/i386/jit_defs.c	Sat Apr  4 07:58:33 2009	(r37898)
@@ -11,7 +11,6 @@
 #include "parrot/hash.h"
 #include "parrot/oplib/ops.h"
 #include "pmc/pmc_fixedintegerarray.h"
-#include "pmc/pmc_unmanagedstruct.h"
 #include "jit.h"
 #include "jit_emit.h"
 

Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c	Sat Apr  4 07:41:28 2009	(r37897)
+++ trunk/src/pmc.c	Sat Apr  4 07:58:33 2009	(r37898)
@@ -200,9 +200,7 @@
         if (has_ext)
             Parrot_gc_free_pmc_ext(interp, pmc);
 
-#if ! PMC_DATA_IN_EXT
         PMC_data(pmc) = NULL;
-#endif
         new_flags = 0;
     }
 


More information about the parrot-commits mailing list