[m-rev.] for review: delete module_names_contexts fields from parse_tree_module_src
Julien Fischer
jfischer at opturion.com
Sat Jul 1 16:43:33 AEST 2023
On Sat, 1 Jul 2023, Zoltan Somogyi wrote:
> Delete module_names_contexts fields from parse trees.
>
> compiler/prog_item.m:
> We used to include information about include_module, import_module
> and use_module declarations in a module in the parse_tree_module_src
> in two forms: an unchecked form, which had type module_names_contexts,
> and a checked form, which had types include_module_map and
> import_and_or_use_map respectively. We have been gradually switching
> more and more code working on parse trees from taking the unchecked form
> as input to taking the checked form as input.
>
> This diff completes the process.
>
> - It deletes the ptms_{int,imp}_includes and ptms_{int,imp}{imports,uses}
> fields from parse_tree_module_src. Their checked versions remain.
>
> - It changes the parse_tree_int3 type to store include and import
> information using checked rather than unchecked types. The reason
> why this wasn't done before is that the checked data structures
> could preserve the relevant invariants until subtypes were addeds
could not
s/addeds/added/
> to the language. This diff thus also defines the needed new subtype.
>
> Fix a typo (wrong int file number) in a field name.
That looks fine otherwise.
Julien.
More information about the reviews
mailing list