cvsuser 05/01/22 02:33:27
Modified: include/parrot dod.h
src hash.c
Log:
implement keyed write barrier variant
Revision Changes Path
1.24 +4 -1 parrot/include/parrot/dod.h
Index: dod.h
===================================================================
RCS file: /cvs/public/parrot/include/parrot/dod.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- dod.h 4 Nov 2004 12:52:25 -0000 1.23
+++ dod.h 22 Jan 2005 10:33:26 -0000 1.24
@@ -1,7 +1,7 @@
/* dod.h
* Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
* CVS Info
- * $Id: dod.h,v 1.23 2004/11/04 12:52:25 leo Exp $
+ * $Id: dod.h,v 1.24 2005/01/22 10:33:26 leo Exp $
* Overview:
* Handles dead object destruction of the various headers
* Data Structure and Algorithms:
@@ -100,10 +100,13 @@
} \
} while (0)
+# define DOD_WRITE_BARRIER_KEY(interp, agg, old, old_key, new, new_key) \
+ DOD_WRITE_BARRIER_KEY(interp, agg, old, new)
#endif
#if PARROT_GC_MS
# define DOD_WRITE_BARRIER(interp, agg, old, new)
+# define DOD_WRITE_BARRIER_KEY(interp, agg, old, old_key, new, new_key)
#endif
#endif /* PARROT_DOD_H_GUARD */
1.86 +5 -4 parrot/src/hash.c
Index: hash.c
===================================================================
RCS file: /cvs/public/parrot/src/hash.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- hash.c 13 Dec 2004 13:46:25 -0000 1.85
+++ hash.c 22 Jan 2005 10:33:27 -0000 1.86
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: hash.c,v 1.85 2004/12/13 13:46:25 leo Exp $
+$Id: hash.c,v 1.86 2005/01/22 10:33:27 leo Exp $
=head1 NAME
@@ -856,15 +856,16 @@
if (bucket) {
if (hash->entry_type == enum_type_PMC && hash->container) {
- DOD_WRITE_BARRIER(interpreter, hash->container,
- (PMC*)bucket->value, (PMC*)value);
+ DOD_WRITE_BARRIER_KEY(interpreter, hash->container,
+ (PMC*)bucket->value, bucket->key, (PMC*)value, key);
}
/* Replacing old value */
bucket->value = value; /* TODO copy value_size */
}
else {
if (hash->entry_type == enum_type_PMC && hash->container) {
- DOD_WRITE_BARRIER(interpreter, hash->container, NULL,
(PMC*)value);
+ DOD_WRITE_BARRIER_KEY(interpreter, hash->container,
+ NULL, NULL, (PMC*)value, key);
}
/* Create new bucket */
hash->entries++;