#include "mono/metadata/cominterop.h"
#include "mono/utils/mono-counters.h"
#include "mono/utils/mono-tls.h"
+#include "mono/utils/mono-memory-model.h"
#include <string.h>
#include <errno.h>
mono_mb_emit_byte (mb, CEE_RET);
res = mono_mb_create_method (mb, sig, 8);
+ STORE_STORE_FENCE;
+
if (InterlockedCompareExchangePointer ((volatile gpointer *)&cached, res, NULL)) {
mono_free_method (res);
mono_metadata_free_method_signature (sig);
mono_mb_emit_byte (mb, CEE_RET);
res = mono_mb_create_method (mb, sig, 8);
+ STORE_STORE_FENCE;
+
if (InterlockedCompareExchangePointer ((volatile gpointer *)&cached, res, NULL)) {
mono_free_method (res);
mono_metadata_free_method_signature (sig);
GHashTable *cache;
MonoMethod *res;
int pos_failed, pos_end;
- char *name;
+ char *name, *klass_name;
MonoMethod *can_cast_to;
MonoMethodDesc *desc;
MonoMethodBuilder *mb;
isint_sig->ret = &mono_defaults.object_class->byval_arg;
isint_sig->pinvoke = 0;
}
-
- name = g_strdup_printf ("__proxy_isinst_wrapper_%s", klass->name);
+
+ klass_name = mono_type_full_name (&klass->byval_arg);
+ name = g_strdup_printf ("__proxy_isinst_wrapper_%s", klass_name);
mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_PROXY_ISINST);
+ g_free (klass_name);
g_free (name);
mb->method->save_lmf = 1;