Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

In .:

2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* method-to-ir.c (initialize_array_data): Handle field with RVA from
	dynamic images.
	(Ported from trunk)


svn path=/branches/mono-2-0/mono/; revision=112078
  • Loading branch information...
commit 28021d9e5cc4e8837fb8e060e222e93ed5b6963e 1 parent d04c85f
@kumpera kumpera authored
Showing with 19 additions and 8 deletions.
  1. +6 −0 mono/mini/ChangeLog
  2. +13 −8 mono/mini/mini.c
View
6 mono/mini/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * method-to-ir.c (initialize_array_data): Handle field with RVA from
+ dynamic images.
+ (Ported from trunk)
+
2008-08-29 Geoff Norton <gnorton@novell.com>
* aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
View
21 mono/mini/mini.c
@@ -4427,14 +4427,19 @@ initialize_array_data (MonoMethod *method, gboolean aot, unsigned char *ip, Mono
return NULL;
*out_size = size;
/*g_print ("optimized in %s: size: %d, numelems: %d\n", method->name, size, newarr->inst_newa_len->inst_c0);*/
- field_index = read32 (ip + 2) & 0xffffff;
- mono_metadata_field_info (method->klass->image, field_index - 1, NULL, &rva, NULL);
- data_ptr = mono_image_rva_map (method->klass->image, rva);
- /*g_print ("field: 0x%08x, rva: %d, rva_ptr: %p\n", read32 (ip + 2), rva, data_ptr);*/
- /* for aot code we do the lookup on load */
- if (aot && data_ptr)
- return GUINT_TO_POINTER (rva);
- return data_ptr;
+ if (!method->klass->image->dynamic) {
+ field_index = read32 (ip + 2) & 0xffffff;
+ mono_metadata_field_info (method->klass->image, field_index - 1, NULL, &rva, NULL);
+ data_ptr = mono_image_rva_map (method->klass->image, rva);
+ /*g_print ("field: 0x%08x, rva: %d, rva_ptr: %p\n", read32 (ip + 2), rva, data_ptr);*/
+ /* for aot code we do the lookup on load */
+ if (aot && data_ptr)
+ return GUINT_TO_POINTER (rva);
+ } else {
+ /*FIXME is it possible to AOT a SRE assembly not meant to be saved? */
+ g_assert (!aot);
+ data_ptr = field->data;
+ } return data_ptr;
}
return NULL;
}
Please sign in to comment.
Something went wrong with that request. Please try again.