Files
mercury/library
Fergus Henderson 9ff3da65b5 Fix a bug in ML_create_type_info():
Estimated hours taken: 5

library/std_util.m:
	Fix a bug in ML_create_type_info():
	when searching for type parameters to substituting with their
	corresponding values, they were only looking at the top level
	of the type.  To get correct results, it is necessary to
	traverse recursively through all levels of the type.

runtime/mercury_deep_copy.c:
	Fix a bug similar to the one above in make_type_info().
	The fix is a bit more complicated, due to memory management
	issues --- we need to keep a linked list of all the memory
	cells we allocate so that we can free them when we're done.

	Also avoid some duplicated code in mercury_deep_copy.c
	by introducing a new function deep_copy_arg().

	And fix a bug in deep_copy_type_info(): it should be
	allocating memory using incr_saved_hp(), not using
	make(). make() calls newmem(), which in non-conservative GC
	grades calls malloc(), which results in a memory leak;
	whereas incr_saved_hp() allocates on the Mercury heap,
	which is (in accurate gc grades) subject to garbage collection.

tests/hard_coded/Mmakefile:
tests/hard_coded/eqv_type_bug.m:
tests/hard_coded/eqv_type_bug.exp:
	Regression test for the above-mentioned bug in ML_create_type_info().
1997-12-30 06:42:25 +00:00
..
1997-12-05 15:58:34 +00:00
1997-12-30 06:42:25 +00:00