提交 02527ead 编写于 作者: Z Zoltan Varga

Fix full-aot support for the stelemref wrappers.

上级 fa501bf7
...@@ -1787,8 +1787,13 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8 ...@@ -1787,8 +1787,13 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8
} }
case MONO_WRAPPER_WRITE_BARRIER: case MONO_WRAPPER_WRITE_BARRIER:
break; break;
case MONO_WRAPPER_STELEMREF: case MONO_WRAPPER_STELEMREF: {
MonoClass *klass = mono_marshal_get_wrapper_info (method);
/* Make sure this is the 'normal' stelemref wrapper, not the virtual one */
g_assert (!klass);
break; break;
}
case MONO_WRAPPER_UNKNOWN: case MONO_WRAPPER_UNKNOWN:
if (strcmp (method->name, "FastMonitorEnter") == 0) if (strcmp (method->name, "FastMonitorEnter") == 0)
encode_value (MONO_AOT_WRAPPER_MONO_ENTER, p, &p); encode_value (MONO_AOT_WRAPPER_MONO_ENTER, p, &p);
...@@ -2380,6 +2385,17 @@ add_wrappers (MonoAotCompile *acfg) ...@@ -2380,6 +2385,17 @@ add_wrappers (MonoAotCompile *acfg)
if (method) if (method)
add_method (acfg, method); add_method (acfg, method);
#endif #endif
/* Stelemref wrappers */
/* There is only a constant number of these, iterating over all types should handle them all */
for (i = 0; i < acfg->image->tables [MONO_TABLE_TYPEDEF].rows; ++i) {
MonoClass *klass;
token = MONO_TOKEN_TYPE_DEF | (i + 1);
klass = mono_class_get (acfg->image, token);
if (klass)
add_method (acfg, mono_marshal_get_virtual_stelemref (mono_array_class_get (klass, 1)));
}
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册