* Copyright 2003-2010 Novell, Inc.
* Copyright (C) 2012 Xamarin Inc
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License 2.0 as published by the Free Software Foundation;
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License 2.0 along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#define collector_pin_object(obj, queue) sgen_pin_object (obj, queue);
*/
static MONO_ALWAYS_INLINE void
-SERIAL_COPY_OBJECT (void **obj_slot, SgenGrayQueue *queue)
+SERIAL_COPY_OBJECT (GCObject **obj_slot, SgenGrayQueue *queue)
{
- char *forwarded;
- char *copy;
- char *obj = *obj_slot;
+ GCObject *forwarded;
+ GCObject *copy;
+ GCObject *obj = *obj_slot;
SGEN_ASSERT (9, current_collection_generation == GENERATION_NURSERY, "calling minor-serial-copy from a %d generation collection", current_collection_generation);
return;
}
if (G_UNLIKELY (SGEN_OBJECT_IS_PINNED (obj))) {
- SGEN_ASSERT (9, sgen_vtable_get_descriptor ((GCVTable*)SGEN_LOAD_VTABLE(obj)), "pinned object %p has no gc descriptor", obj);
+ SGEN_ASSERT (9, sgen_vtable_get_descriptor (SGEN_LOAD_VTABLE(obj)), "pinned object %p has no gc descriptor", obj);
SGEN_LOG (9, " (pinned, no change)");
HEAVY_STAT (++stat_nursery_copy_object_failed_pinned);
return;
#ifndef SGEN_SIMPLE_NURSERY
if (sgen_nursery_is_to_space (obj)) {
- SGEN_ASSERT (9, sgen_vtable_get_descriptor ((GCVTable*)SGEN_LOAD_VTABLE(obj)), "to space object %p has no gc descriptor", obj);
+ SGEN_ASSERT (9, sgen_vtable_get_descriptor (SGEN_LOAD_VTABLE(obj)), "to space object %p has no gc descriptor", obj);
SGEN_LOG (9, " (tospace, no change)");
HEAVY_STAT (++stat_nursery_copy_object_failed_to_space);
return;
* Similar to SERIAL_COPY_OBJECT, but assumes that OBJ_SLOT is part of an object, so it handles global remsets as well.
*/
static MONO_ALWAYS_INLINE void
-SERIAL_COPY_OBJECT_FROM_OBJ (void **obj_slot, SgenGrayQueue *queue)
+SERIAL_COPY_OBJECT_FROM_OBJ (GCObject **obj_slot, SgenGrayQueue *queue)
{
- char *forwarded;
- char *obj = *obj_slot;
- void *copy;
+ GCObject *forwarded;
+ GCObject *obj = *obj_slot;
+ GCObject *copy;
SGEN_ASSERT (9, current_collection_generation == GENERATION_NURSERY, "calling minor-serial-copy-from-obj from a %d generation collection", current_collection_generation);
return;
}
if (G_UNLIKELY (SGEN_OBJECT_IS_PINNED (obj))) {
- SGEN_ASSERT (9, sgen_vtable_get_descriptor ((GCVTable*)SGEN_LOAD_VTABLE(obj)), "pinned object %p has no gc descriptor", obj);
+ SGEN_ASSERT (9, sgen_vtable_get_descriptor (SGEN_LOAD_VTABLE(obj)), "pinned object %p has no gc descriptor", obj);
SGEN_LOG (9, " (pinned, no change)");
HEAVY_STAT (++stat_nursery_copy_object_failed_pinned);
if (!sgen_ptr_in_nursery (obj_slot) && !SGEN_OBJECT_IS_CEMENTED (obj))
#ifndef SGEN_SIMPLE_NURSERY
if (sgen_nursery_is_to_space (obj)) {
/* FIXME: all of these could just use `sgen_obj_get_descriptor_safe()` */
- SGEN_ASSERT (9, sgen_vtable_get_descriptor ((GCVTable*)SGEN_LOAD_VTABLE(obj)), "to space object %p has no gc descriptor", obj);
+ SGEN_ASSERT (9, sgen_vtable_get_descriptor (SGEN_LOAD_VTABLE(obj)), "to space object %p has no gc descriptor", obj);
SGEN_LOG (9, " (tospace, no change)");
HEAVY_STAT (++stat_nursery_copy_object_failed_to_space);