mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-14 13:23:53 +00:00
Estimated hours taken: 6 Branches: main Fix test case failures involving type_ctor_descs in .rt grades. The cause of the failures was that the type_ctor_rep for type_ctor_descs (which happens to be 35) does not fit into a signed 8-bit integer in .rt grades, since those grade require 2 bits for a primary tag (3 bits on 64-bit machines). The fix is to make the type_ctor_rep field in type_ctor_infos 16 bits in size. To maintain alignment, this requires swapping that field with the num_ptags field. The second part of this change will remove the bootstrapping code and raise the binary compatibility version number. That part cannot be committed until this part has been installed on all our machines. runtime/mercury_type_info.h: Define a new version of the type_ctor_info structure with this swap and size increase. Provide backward compatibility for bootstrapping. runtime/mercury_mcpp.h: library/rtti_implementation.m: java/runtime/TypeCtorInfo_Struct.m: Make the same change. compiler/rtti_out.m: compiler/rtti_to_mlds.m: compiler/mlds_to_gcc.m: Generate the new type_ctor_info structure. compiler/llds_out.m: compiler/mlds_to_c.m: Generate a macro that selects the new version of the type_ctor_info structure. compiler/type_ctor_info.m: Update the type_ctor_info version number.