Author: zoltan
Date: 2007-12-23 12:29:35 -0500 (Sun, 23 Dec 2007)
New Revision: 91840
Modified:
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/aot-compiler.c
Log:
2007-12-23 Zoltan Varga <[EMAIL PROTECTED]>
* aot-compiler.c (emit_klass_info): Avoid emitting info if one of the
methods
in the vtable can't be encoded.
(compile_method): Ditto.
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2007-12-23 15:48:05 UTC (rev 91839)
+++ trunk/mono/mono/mini/ChangeLog 2007-12-23 17:29:35 UTC (rev 91840)
@@ -1,3 +1,9 @@
+2007-12-23 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the
methods
+ in the vtable can't be encoded.
+ (compile_method): Ditto.
+
2007-12-21 Zoltan Varga <[EMAIL PROTECTED]>
* mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY
macro if
Modified: trunk/mono/mono/mini/aot-compiler.c
===================================================================
--- trunk/mono/mono/mini/aot-compiler.c 2007-12-23 15:48:05 UTC (rev 91839)
+++ trunk/mono/mono/mini/aot-compiler.c 2007-12-23 17:29:35 UTC (rev 91840)
@@ -2364,7 +2364,7 @@
guint8 *p, *buf;
int i, buf_size;
char *label;
- gboolean no_special_static;
+ gboolean no_special_static, cant_encode;
buf_size = 10240 + (klass->vtable_size * 16);
p = buf = g_malloc (buf_size);
@@ -2381,7 +2381,16 @@
no_special_static = !mono_class_has_special_static_fields (klass);
- if (klass->generic_container) {
+ /* Check whenever we have enough info to encode the vtable */
+ cant_encode = FALSE;
+ for (i = 0; i < klass->vtable_size; ++i) {
+ MonoMethod *cm = klass->vtable [i];
+
+ if (cm && mono_method_signature (cm)->is_inflated &&
!g_hash_table_lookup (acfg->token_info_hash, cm))
+ cant_encode = TRUE;
+ }
+
+ if (klass->generic_container || cant_encode) {
encode_value (-1, p, &p);
} else {
encode_value (klass->vtable_size, p, &p);
@@ -2824,6 +2833,9 @@
* referenced this type.
*/
skip = TRUE;
+ if (patch_info->data.method->is_inflated &&
!g_hash_table_lookup (acfg->token_info_hash, patch_info->data.method))
+ /* FIXME: Can't encode these */
+ skip = TRUE;
break;
case MONO_PATCH_INFO_VTABLE:
case MONO_PATCH_INFO_CLASS_INIT:
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches