Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / sgen / sgen-descriptor.h
index e5958181513ea9f25267159da4113398e4ebd8c7..2c7f19b18c46a4d1029174e5bb509f1916af57b0 100644 (file)
@@ -1,31 +1,20 @@
-/*
- * sgen-descriptor.h: GC descriptors describe object layout.
-
+/**
+ * \file
+ * GC descriptors describe object layout.
+ *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
  * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
  *
  * 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.
  */
 #ifndef __MONO_SGEN_DESCRIPTOR_H__
 #define __MONO_SGEN_DESCRIPTOR_H__
 
 #include <mono/sgen/sgen-conf.h>
 
-
 /*
  * ######################################################################
  * ########  GC descriptors
@@ -126,6 +115,7 @@ enum {
        ROOT_DESC_BITMAP,
        ROOT_DESC_RUN_LEN, 
        ROOT_DESC_COMPLEX,
+       ROOT_DESC_VECTOR,
        ROOT_DESC_USER,
        ROOT_DESC_TYPE_MASK = 0x7,
        ROOT_DESC_TYPE_SHIFT = 3,
@@ -134,21 +124,21 @@ enum {
 typedef void (*SgenUserMarkFunc)     (GCObject **addr, void *gc_data);
 typedef void (*SgenUserRootMarkFunc) (void *addr, SgenUserMarkFunc mark_func, void *gc_data);
 
-void* sgen_make_user_root_descriptor (SgenUserRootMarkFunc marker);
+SgenDescriptor sgen_make_user_root_descriptor (SgenUserRootMarkFunc marker);
 
-gsize* sgen_get_complex_descriptor (mword desc);
-void* sgen_get_complex_descriptor_bitmap (mword desc);
-SgenUserRootMarkFunc sgen_get_user_descriptor_func (mword desc);
+gsize* sgen_get_complex_descriptor (SgenDescriptor desc);
+void* sgen_get_complex_descriptor_bitmap (SgenDescriptor desc);
+SgenUserRootMarkFunc sgen_get_user_descriptor_func (SgenDescriptor desc);
 
 void sgen_init_descriptors (void);
 
 #ifdef HEAVY_STATISTICS
-void sgen_descriptor_count_scanned_object (mword desc);
-void sgen_descriptor_count_copied_object (mword desc);
+void sgen_descriptor_count_scanned_object (SgenDescriptor desc);
+void sgen_descriptor_count_copied_object (SgenDescriptor desc);
 #endif
 
 static inline gboolean
-sgen_gc_descr_has_references (mword desc)
+sgen_gc_descr_has_references (SgenDescriptor desc)
 {
        /* This covers SMALL_PTRFREE and COMPLEX_PTRFREE */
        if ((desc & DESC_TYPE_PTRFREE_MASK) == DESC_TYPE_PTRFREE_BITS)
@@ -227,7 +217,7 @@ sgen_gc_descr_has_references (mword desc)
        } while (0)
 #endif
 
-#define OBJ_COMPLEX_FOREACH_PTR(vt,obj)        do {    \
+#define OBJ_COMPLEX_FOREACH_PTR(desc,obj)      do {    \
                /* there are pointers */        \
                void **_objptr = (void**)(obj); \
                gsize *bitmap_data = sgen_get_complex_descriptor ((desc)); \