Permalink
Browse files

Mon Mar 8 17:30:44 CET 2010 Paolo Molaro <lupus@ximian.com>

	* verify.c, debug-helpers.c, profiler.c, loader.c,
	mono-basic-block.c, mono-debug.c, reflection.c: prepare to make
	MonoMethodHeader a transient entity.


svn path=/trunk/mono/; revision=153265
  • Loading branch information...
1 parent d58fd16 commit 65be41e4451f181f0dd64d2d428d7b170902984d @illupus illupus committed Mar 8, 2010
View
7 mono/metadata/ChangeLog
@@ -1,3 +1,10 @@
+
+Mon Mar 8 17:30:44 CET 2010 Paolo Molaro <lupus@ximian.com>
+
+ * verify.c, debug-helpers.c, profiler.c, loader.c,
+ mono-basic-block.c, mono-debug.c, reflection.c: prepare to make
+ MonoMethodHeader a transient entity.
+
2010-03-08 Zoltan Varga <vargaz@gmail.com>
* sgen-gc.c (scan_needed_big_objects): Call drain_gray_stack () to avoid
View
1 mono/metadata/debug-helpers.c
@@ -683,6 +683,7 @@ dis_one (GString *str, MonoDisHelper *dh, MonoMethod *method, const unsigned cha
if (dh->newline)
g_string_append (str, dh->newline);
+ mono_metadata_free_mh (header);
return ip;
}
View
3 mono/metadata/loader.c
@@ -2296,7 +2296,8 @@ mono_method_get_header (MonoMethod *method)
return NULL;
loc = mono_image_rva_map (img, rva);
- g_assert (loc);
+ if (!loc)
+ return NULL;
header = mono_metadata_parse_mh_full (img, mono_method_get_generic_container (method), loc);
View
2 mono/metadata/mono-basic-block.c
@@ -550,9 +550,11 @@ mono_basic_block_split (MonoMethod *method, MonoError *error)
dump_bb_list (bb, &root, g_strdup_printf("AFTER LIVENESS %s", mono_method_full_name (method, TRUE)));
#endif
+ mono_metadata_free_mh (header);
return bb;
fail:
+ mono_metadata_free_mh (header);
mono_basic_block_free (bb);
return NULL;
}
View
1 mono/metadata/mono-debug.c
@@ -668,6 +668,7 @@ mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDoma
wrapper->method_name = mono_method_full_name (declaring, TRUE);
wrapper->cil_code = mono_disasm_code (
NULL, declaring, il_code, il_code + il_codesize);
+ mono_metadata_free_mh (mheader);
}
} else {
address->header.wrapper_data = header->wrapper_data;
View
1 mono/metadata/profiler.c
@@ -955,6 +955,7 @@ mono_profiler_coverage_get (MonoProfiler *prof, MonoMethod *method, MonoProfileC
g_free (fname);
}
}
+ mono_metadata_free_mh (header);
}
#ifndef DISABLE_PROFILER
View
1 mono/metadata/reflection.c
@@ -6926,6 +6926,7 @@ mono_method_body_get_object (MonoDomain *domain, MonoMethod *method)
}
CACHE_OBJECT (MonoReflectionMethodBody *, method, ret, NULL);
+ mono_metadata_free_mh (header);
return ret;
}
View
1 mono/metadata/verify.c
@@ -6046,6 +6046,7 @@ mono_method_verify (MonoMethod *method, int level)
g_free (ctx.locals);
g_free (ctx.params);
mono_basic_block_free (bb);
+ mono_metadata_free_mh (ctx.header);
return ctx.list;
}

0 comments on commit 65be41e

Please sign in to comment.