[svn:parrot] r40426 - in branches/auto_attrs: . include/parrot src src/gc src/interp src/pmc src/runcore t/src tools/dev

NotFound at svn.parrot.org NotFound at svn.parrot.org
Thu Aug 6 12:22:46 UTC 2009


Author: NotFound
Date: Thu Aug  6 12:22:45 2009
New Revision: 40426
URL: https://trac.parrot.org/parrot/changeset/40426

Log:
merge from trunk r40425

Modified:
   branches/auto_attrs/   (props changed)
   branches/auto_attrs/include/parrot/runcore_trace.h   (props changed)
   branches/auto_attrs/src/gc/generational_ms.c   (props changed)
   branches/auto_attrs/src/gc/incremental_ms.c   (props changed)
   branches/auto_attrs/src/interp/inter_create.c   (props changed)
   branches/auto_attrs/src/key.c
   branches/auto_attrs/src/pmc/exporter.pmc
   branches/auto_attrs/src/runcore/cores.c   (props changed)
   branches/auto_attrs/src/runcore/trace.c   (props changed)
   branches/auto_attrs/t/src/embed.t   (props changed)
   branches/auto_attrs/tools/dev/mk_gitignore.pl   (props changed)

Modified: branches/auto_attrs/src/key.c
==============================================================================
--- branches/auto_attrs/src/key.c	Thu Aug  6 12:14:47 2009	(r40425)
+++ branches/auto_attrs/src/key.c	Thu Aug  6 12:22:45 2009	(r40426)
@@ -619,7 +619,7 @@
     }
 
     /* Mark next key */
-    if (flags == KEY_string_FLAG || flags == KEY_pmc_FLAG) {
+    if ((flags == KEY_string_FLAG) || (flags == KEY_pmc_FLAG)) {
         GETATTR_Key_next_key(interp, key, next_key);
         if (next_key)
             Parrot_gc_mark_PObj_alive(interp, (PObj *)next_key);

Modified: branches/auto_attrs/src/pmc/exporter.pmc
==============================================================================
--- branches/auto_attrs/src/pmc/exporter.pmc	Thu Aug  6 12:14:47 2009	(r40425)
+++ branches/auto_attrs/src/pmc/exporter.pmc	Thu Aug  6 12:22:45 2009	(r40426)
@@ -109,12 +109,12 @@
     VTABLE void init() {
         Parrot_Exporter_attributes * const exp =
             mem_allocate_zeroed_typed(Parrot_Exporter_attributes);
+        PMC_data(SELF)       = exp;
 
         /* Set up the object. */
-        exp->ns_src          = PMCNULL;
-        exp->ns_dest         = CONTEXT(interp)->current_namespace;
-        exp->globals         = PMCNULL;
-        PMC_data(SELF)       = exp;
+        SET_ATTR_ns_src(INTERP, SELF, PMCNULL);
+        SET_ATTR_ns_dest(INTERP, SELF, CONTEXT(interp)->current_namespace);
+        SET_ATTR_globals(INTERP, SELF, PMCNULL);
 
         /* Set flags for custom GC mark and destroy. */
         PObj_custom_mark_SET(SELF);
@@ -149,14 +149,19 @@
 */
 
     VTABLE void mark() {
-        Parrot_Exporter_attributes * const exp = PARROT_EXPORTER(SELF);
-
-        if (exp->ns_src)
-            Parrot_gc_mark_PObj_alive(interp, (PObj *)exp->ns_src);
-        if (exp->ns_dest)
-            Parrot_gc_mark_PObj_alive(interp, (PObj *)exp->ns_dest);
-        if (exp->globals)
-            Parrot_gc_mark_PObj_alive(interp, (PObj *)exp->globals);
+        PMC *ns_src;
+        PMC *ns_dest;
+        PMC *globals;
+	GET_ATTR_ns_src(INTERP, SELF, ns_src);
+	GET_ATTR_ns_dest(INTERP, SELF, ns_dest);
+	GET_ATTR_globals(INTERP, SELF, globals);
+
+        if (ns_src)
+            Parrot_gc_mark_PObj_alive(interp, (PObj *)ns_src);
+        if (ns_dest)
+            Parrot_gc_mark_PObj_alive(interp, (PObj *)ns_dest);
+        if (globals)
+            Parrot_gc_mark_PObj_alive(interp, (PObj *)globals);
     }
 
 


More information about the parrot-commits mailing list