Skip to content

Commit

Permalink
2008-10-19 Zoltan Varga <vargaz@gmail.com>
Browse files Browse the repository at this point in the history
	* class.c (mono_method_get_vtable_index): Use
	mono_method_get_vtable_slot () for accessing method->slot.

svn path=/trunk/mono/; revision=116481
  • Loading branch information
vargaz committed Oct 19, 2008
1 parent c7a208a commit da12c64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions mono/metadata/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
2008-10-19 Zoltan Varga <vargaz@gmail.com>

* class.c (mono_method_get_vtable_index): Use
mono_method_get_vtable_slot () for accessing method->slot.

* object.c (build_imt_slots): Use mono_class_get_method_by_index () for
accessing klass->methods.

Expand Down
3 changes: 1 addition & 2 deletions mono/metadata/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -2873,7 +2873,6 @@ mono_class_setup_vtable_general (MonoClass *class, MonoMethod **overrides, int o
MonoMethod *decl = overrides [i*2];
if (MONO_CLASS_IS_INTERFACE (decl->klass)) {
int dslot;
g_assert (decl->slot != -1);
dslot = mono_method_get_vtable_slot (decl) + mono_class_interface_offset (class, decl->klass);
vtable [dslot] = overrides [i*2 + 1];
vtable [dslot]->slot = dslot;
Expand Down Expand Up @@ -3216,7 +3215,7 @@ mono_method_get_vtable_index (MonoMethod *method)
if (imethod->declaring->is_generic)
return imethod->declaring->slot;
}
return method->slot;
return mono_method_get_vtable_slot (method);
}

static MonoMethod *default_ghc = NULL;
Expand Down

0 comments on commit da12c64

Please sign in to comment.