[m-rev.] for review: fix mantis bug 563
Peter Wang
novalazy at gmail.com
Mon Sep 4 14:25:12 AEST 2023
On Sun, 03 Sep 2023 22:29:12 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> Allow use_module declarations in .int2 files ...
>
> ... for modules referenced in the definitions of equivalence types.
>
> compiler/comp_unit_interface.m:
> Add use_module declarations for modules referenced by the right hand sides
> of equivalence type definitions to the implementation sections of .int2
> files.
>
> Update the names of some of the predicates involved.
>
> Make the definitions of the predicates accumulate_modules_in_type and
> accumulate_modules_in_qual_type, which do *almost* the same job,
> as similar to each other as possible.
>
> compiler/make_hlds_separate_items.m:
> Allow use_module declarations in the implementation sections of .int2
> files.
>
> compiler/grab_modules.m:
> Ensure that we grab the .int2 files of any modules that have use_module
> declarations for them in the implementation sections of .int2 files.
>
> tests/valid_seq/bug563.m:
> tests/valid_seq/bug563_helper_1.m:
> tests/valid_seq/bug563_helper_2.m:
> The test case from the Mantis bug report, renamed.
>
> tests/valid_seq/Mmakefile:
> Enable the new test case.
> diff --git a/compiler/comp_unit_interface.m b/compiler/comp_unit_interface.m
> index 7854a679e..802b9d340 100644
> --- a/compiler/comp_unit_interface.m
> +++ b/compiler/comp_unit_interface.m
> @@ -2392,8 +2412,9 @@ restrict_type_ctor_checked_defn_for_int2(TypeCtor, TypeCtorCheckedDefn0,
> list.map_foldl3(restrict_type_ctor_int_defn_for_int2,
> IntTypeDefns0, IntTypeDefns,
> !MaybeUnqual, !ModuleNames, !IntImplicitFIMLangs),
> - get_int2_langs_from_int1_imp_types(ImpTypeDefns, !ImpImplicitFIMLangs),
> - % Foreign enums are never included in .int2 files.
> + list.foldl3(get_int2_modules_langs_from_int1_imp_type, ImpTypeDefns,
> + !MaybeUnqual, !ImpEqvModuleNames, !ImpImplicitFIMLangs),
> +% % Foreign enums are never included in .int2 files.
> SrcDefnsStd = src_defns_std(IntTypeDefns, ImpTypeDefns, []),
> TypeCtorCheckedDefn = checked_defn_std(StdTypeDefn, SrcDefnsStd)
> ),
Stray % character there.
That looks fine, thanks.
Peter
More information about the reviews
mailing list