+Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+ * mini.: hook the new managed GC allocation feature into the JIT.
+
Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
* mini.c: implementation for the new runtime tls opcode.
#include <mono/metadata/environment.h>
#include <mono/metadata/mono-debug.h>
#include <mono/metadata/monitor.h>
+#include <mono/metadata/gc-internal.h>
#include <mono/metadata/security-manager.h>
#include <mono/metadata/threads-types.h>
#include <mono/metadata/rawbuffer.h>
return mono_emit_jit_icall (cfg, bblock, mono_helper_newobj_mscorlib, iargs, ip);
} else {
MonoVTable *vtable = mono_class_vtable (cfg->domain, klass);
+ MonoMethod *managed_alloc = mono_gc_get_managed_allocator (vtable, for_box);
gboolean pass_lw;
+ if (!cfg->compile_aot && managed_alloc) {
+ NEW_VTABLECONST (cfg, iargs [0], vtable);
+ return mono_emit_method_call_spilled (cfg, bblock, managed_alloc, mono_method_signature (managed_alloc), iargs, ip, NULL);
+ }
alloc_ftn = mono_class_get_allocation_ftn (vtable, for_box, &pass_lw);
if (pass_lw) {
guint32 lw = vtable->klass->instance_size;