[m-rev.] for post-commit review: fix mantis bug 401

Peter Wang novalazy at gmail.com
Sat Aug 3 17:32:03 AEST 2019


On Fri, 02 Aug 2019 10:36:16 +0200 (CEST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> 
> Fix handling "int used, imp imported" modules when making interface files.
> 
> This fixes the second incarnation of Mantis bug #401. (The first incarnation
> was the handling of such modules when generating target code.)
> 
> compiler/grab_modules.m:
>     Compute the set of modules that have a use_module declaration in the
>     interface section and an import_module declaration in the implementation
>     section, and set the status of the items imported from that module
>     accordingly.
> 

> diff --git a/compiler/grab_modules.m b/compiler/grab_modules.m
> index 2dab1ce49..8ff23bd02 100644
> --- a/compiler/grab_modules.m
> +++ b/compiler/grab_modules.m
> @@ -329,8 +329,7 @@ grab_imported_modules_augment(Globals, SourceFileName, SourceFileModuleName,
>          % Get the .int files of the modules imported using `use_module'
>          % in the interface and `import_module' in the implementation.
>          process_module_int123_files(Globals, HaveReadModuleMapInt,
> -            "int_used_imp_imported",
> -            pik_direct(int123_1, may_be_unqualified),
> +            "int_used_imp_imported", pik_direct(int123_1, may_be_unqualified),
>              make_ims_used_and_imported(import_locn_interface),
>              make_ims_abstract_imported,
>              module_and_imports_add_direct_int_item_blocks,

BTW, the parameters in the documentation of process_module_int123_files
don't match the code.

> @@ -506,6 +511,16 @@ grab_unqual_imported_modules_make_int(Globals, SourceFileName,
>              ImpUses,
>              !ImpIndirectImported, set.init, _, !ModuleAndImports, !IO),
>  
> +        % Get the .int files of the modules imported using `use_module'
> +        % in the interface and `import_module' in the implementation.
> +        process_module_int123_files(Globals, HaveReadModuleMapInt,
> +            "int_used_imp_imported", pik_direct(int123_1, may_be_unqualified),
> +            make_ims_used_and_imported(import_locn_interface),
> +            make_ims_abstract_imported,
> +            module_and_imports_add_direct_int_item_blocks,
> +            IntUsedImpImported, !IntIndirectImported, set.init, _,
> +            !ModuleAndImports, !IO),
> +
>          % Get the .int3 files of the modules imported in .int3 files.
>          process_module_indirect_interfaces_transitively(Globals,
>              HaveReadModuleMapInt,

Can you explain why we get the .int files for "int used, imp imported"
modules, whereas we get the .int3 files for other modules?

Peter


More information about the reviews mailing list