[svn:parrot] r42006 - trunk/include/parrot
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Thu Oct 22 01:17:50 UTC 2009
Author: chromatic
Date: Thu Oct 22 01:17:49 2009
New Revision: 42006
URL: https://trac.parrot.org/parrot/changeset/42006
Log:
[GC] Optimized the core version of Parrot_gc_mark_PMC_alive() further, this
time avoiding the function call if the PMC is already alive.
Modified:
trunk/include/parrot/gc_api.h
Modified: trunk/include/parrot/gc_api.h
==============================================================================
--- trunk/include/parrot/gc_api.h Thu Oct 22 01:09:04 2009 (r42005)
+++ trunk/include/parrot/gc_api.h Thu Oct 22 01:17:49 2009 (r42006)
@@ -468,7 +468,7 @@
#if defined(PARROT_IN_CORE)
# define Parrot_gc_mark_PMC_alive(interp, obj) \
- do if (!PMC_IS_NULL(obj)) Parrot_gc_mark_PMC_alive_fun((interp), (obj)); \
+ do if (!PMC_IS_NULL(obj) && !PObj_live_TEST(obj)) Parrot_gc_mark_PMC_alive_fun((interp), (obj)); \
while (0)
#else
# define Parrot_gc_mark_PMC_alive(interp, obj) Parrot_gc_mark_PMC_alive_fun((interp), (obj))
More information about the parrot-commits
mailing list