Estimated hours taken: 8
Branches: main, release
Fix bugs with the handling of existentially typed data types
in various parts of the RTTI code.
Most of these bugs were due to passing in the pointer to the secondary
tag, rather than the pointer to the first real argument (one word
past the secondary tag).
library/std_util.m:
Fix bugs in ML_expand() and du_get_functor_info.
runtime/mercury_tabling.c:
Fix bug in MR_table_type().
runtime/mercury_deep_copy_body.h:
Fix bug in MR_agc_deep_copy(), the accurate GC version of deep_copy().
Also fix another bug in the same function: when copying existentially
typed data types, it was trying to use the type_infos in the original
data after they had already been replaced by forwarding pointers.
compiler/polymorphism.m:
For existentially typed data types, make sure that the
type_infos come BEFORE the typeclass_infos, not vice versa.
This is needed to match the code in the runtime system.
It's also consistent with the way we order them for procedure calls.
runtime/mercury_type_info.h:
Improve the comments a little.
tests/hard_coded/Mmakefile:
tests/hard_coded/deep_copy_exist.m:
tests/hard_coded/deep_copy_exist.exp:
Regression tests.