Commit Graph

2 Commits

Author SHA1 Message Date
Zoltan Somogyi
de0a5f13b7 Delete item_nothing.
compiler/prog_item.m:
    Delete item_nothing as an alternative in the item type.

    These items never occur in parse trees, being handled fully at the time
    when the parse tree is constructed. Nevertheless, their presence in
    the item type required code that handles parse trees to worry NOW about
    how they should handle item_nothings in case a possible future change
    let them survive the parse tree construction process.

compiler/parse_types.m:
    Replace item_nothing with iom_handled in the item_or_marker type,
    whose values are used only during the parse tree construction process.

    The replacement is significantly simplified compared with the original,
    containing only the functionality that our current use cases need.

compiler/parse_error.m:
    Remove rme_warn_item_nothing from the read_module_error type.
    It was being added to error sets, but nothing ever tested for its presence.
    Its task as a signifier of the presence of a compilation-stopping error
    now belongs to the severity of the associated error_specs.

compiler/parse_item.m:
    Fix the logic of the code that decides whether the format of the
    version_numbers_map item is recorded in an obsolete format
    (i.e. whether its *own* version is too old). Specificially,
    treat non-numerical "version number" terms as being malformed,
    not as being obsolete.

compiler/canonicalize_interface.m:
compiler/check_raw_comp_unit.m:
compiler/comp_unit_interface.m:
compiler/equiv_type.m:
compiler/get_dependencies.m:
compiler/item_util.m:
compiler/make_hlds_separate_items.m:
compiler/module_qual.collect_mq_info.m:
compiler/module_qual.qualify_items.m:
compiler/modules.m:
compiler/parse_module.m:
compiler/parse_pragma.m:
compiler/parse_tree_out.m:
compiler/prog_item_stats.m:
compiler/recompilation.check.m:
compiler/recompilation.version.m:
    Conform to the changes above.
2019-04-15 03:30:15 +10:00
Zoltan Somogyi
f1df5d2dd1 Give parsing-related modules more meaningful names.
The mapping from the old to the new module names is:

    prog_io ->                  parse_module
    prog_io_dcg ->              parse_dcg_goal
    prog_io_error ->            parse_error
    prog_io_find ->             find_module
    prog_io_goal ->             parse_goal
    prog_io_inst_mode_defn ->   parse_inst_mode_defn
    prog_io_inst_mode_name ->   parse_inst_mode_name
    prog_io_iom ->              parse_types
    prog_io_item ->             parse_item
    prog_io_mutable ->          parse_mutable
    prog_io_pragma ->           parse_pragma
    prog_io_sym_name ->         parse_sym_name
    prog_io_type_defn ->        parse_type_defn
    prog_io_type_name ->        parse_type_name
    prog_io_typeclass ->        parse_class
    prog_io_util ->             parse_util
    prog_io_vars ->             parse_vars
    unparse ->                  parse_tree_to_term
2016-02-09 13:50:37 +11:00