Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / metadata / handle.h
index eb3175a4f9aca0d9a7b0ddaa88a78775784f057d..40784ea78f17d41d7c1f49a4a168e83fdfd7be92 100644 (file)
@@ -66,6 +66,7 @@ typedef struct {
        gpointer o; /* MonoObject ptr or interior ptr */
 #ifdef MONO_HANDLE_TRACK_OWNER
        const char *owner;
+       gpointer backtrace_ips[7]; /* result of backtrace () at time of allocation */
 #endif
 #ifdef MONO_HANDLE_TRACK_SP
        gpointer alloc_sp; /* sp from HandleStack:stackmark_sp at time of allocation */
@@ -423,6 +424,13 @@ This is why we evaluate index and value before any call to MONO_HANDLE_RAW or ot
                *(TYPE*)(mono_handle_unsafe_field_addr (__obj, __field)) = __value; \
        } while (0)
 
+#define MONO_HANDLE_SET_FIELD_REF(HANDLE,FIELD,VALH) do {              \
+               MonoObjectHandle __obj = MONO_HANDLE_CAST (MonoObject, (HANDLE)); \
+               MonoClassField *__field = (FIELD);                      \
+               MonoObjectHandle __value = MONO_HANDLE_CAST (MonoObject, (VALH)); \
+               mono_gc_wbarrier_generic_store (mono_handle_unsafe_field_addr (__obj, __field), MONO_HANDLE_RAW (__value)); \
+       } while (0)
+
 /* Baked typed handles we all want */
 TYPED_HANDLE_DECL (MonoString);
 TYPED_HANDLE_DECL (MonoArray);
@@ -497,6 +505,9 @@ mono_array_handle_pin_with_size (MonoArrayHandle handle, int size, uintptr_t ind
 gunichar2 *
 mono_string_handle_pin_chars (MonoStringHandle s, uint32_t *gchandle_out);
 
+gpointer
+mono_object_handle_pin_unbox (MonoObjectHandle boxed_valuetype_obj, uint32_t *gchandle_out);
+
 void
 mono_error_set_exception_handle (MonoError *error, MonoExceptionHandle exc);