[Mono-devel-list] get_virtual_method patch for 64bit
Laurent Morichetti
l_m at pacbell.net
Wed Jul 9 05:10:12 EDT 2003
Here is a patch for get_virtual_method to load the correct method ptr on
64bit platforms.
With this patch and a modification to ldelem/stelem in interp.c (aindex
problem), I'm able to compile mcs with mint mcs.exe on 64bit.
Laurent
Index: interp.c
===================================================================
RCS file: /mono/mono/mono/interpreter/interp.c,v
retrieving revision 1.238
diff -u -b -r1.238 interp.c
--- interp.c 27 Jun 2003 07:52:01 -0000 1.238
+++ interp.c 9 Jul 2003 07:57:45 -0000
@@ -233,7 +233,7 @@
vtable = (MonoMethod **)klass->vtable;
if (m->klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
- res = *(MonoMethod**)((char*)obj->vtable->interface_offsets
[m->klass->interface_id] + (m->slot<<2));
+ res = ((MonoMethod **)obj->vtable->interface_offsets
[m->klass->interface_id]) [m->slot];
} else {
res = vtable [m->slot];
}
More information about the Mono-devel-list
mailing list