Permalink
Switch branches/tags
version-14_01_1 version-14_01 version-13_05_2 version-13_05_1 version-13_05 version-12_08-branchpoint version-12_08-GIT version-11_07_2 version-11_07_1 version-11_07 version-11_07-branchpoint version-11_01 version-11_01-branchpoint version-10_04_2 version-10_04_1 version-10_04 version-10_04-branchpoint version-0_13_1 version-0_13-branchpoint version-0_12_2 version-0_12_1 version-0_12-branchpoint version-0_11_0 version-0_11-branchpoint version-0_10 version-0_9_1 version-0_9 version-0_9_x-snapshot version-0_9_x-snapshot-19991220 unstable-version-0_13_1-x86_64-unknown-linux-gnu-libc2_3 unstable-version-0_13_1-i686-pc-linux-libc2_3-gnu-O5-intermod unstable-version-0_13-branch-x86_64-unknown-linux-gnu-libc2_3 unstable-version-0_13-branch-i686-pc-linux-libc2_3-gnu-O5-intermod unstable-version-0_12_2-i686-pc-linux-libc2_2-gnu-O5-intermod unstable-version-0_12_2-i386-pc-solaris2_8 unstable-version-0_12_1-i686-pc-linux-libc2_3-gnu-O4-intermod unstable-version-0_12_1-i686-pc-linux-libc2_3-gnu-O2 unstable-version-0_12_1-i686-pc-linux-libc2_2-gnu-O5-intermod unstable-version-0_12_1-i386-pc-solaris2_8 unstable-version-0_12-branch-i686-pc-linux-libc2_3-gnu-O5 unstable-version-0_12-branch-i686-pc-linux-libc2_3-gnu-O4-intermod unstable-version-0_12-branch-i686-pc-linux-libc2_3-gnu-O4-hlc unstable-version-0_12-branch-i686-pc-linux-libc2_3-gnu-O2 unstable-version-0_12-branch-i686-pc-linux-libc2_2-gnu-O5 unstable-version-0_12-branch-i686-pc-linux-libc2_2-gnu-O5-intermod unstable-version-0_12-branch-i686-pc-linux-libc2_2-gnu-O3 unstable-version-0_12-branch-i386-pc-solaris2_8 unstable-version-0_11_0-sparc-sun-solaris2_7 unstable-version-0_11_0-i686-pc-linux-libc2_3-gnu-O5-intermod unstable-version-0_11_0-i686-pc-linux-libc2_2-gnu-O5 unstable-version-0_11_0-i686-pc-linux-libc2_2-gnu-O5-lcc unstable-version-0_11_0-i686-pc-linux-libc2_2-gnu-O5-hlc unstable-version-0_11_0-i686-pc-linux-libc2_1-gnu-O4 unstable-version-0_11_0-i686-pc-linux-libc2_1-gnu-O4-asm unstable-version-0_11_0-i686-pc-linux-libc2_1-gnu-O3 unstable-version-0_11_0-i386-pc-solaris2_8 unstable-version-0_11-branch-i686-pc-linux-libc2_3-gnu-O5-intermod unstable-version-0_11-branch-i686-pc-linux-libc2_2-gnu-O5-intermod unstable-version-0_11-branch-i686-pc-linux-libc2_2-gnu-O5-hlc unstable-version-0_11-branch-i686-pc-linux-libc2_1-gnu-O5 unstable-version-0_11-branch-i686-pc-linux-libc2_1-gnu-O5-lcc unstable-version-0_11-branch-i686-pc-linux-libc2_1-gnu-O5-intermod unstable-version-0_11-branch-i686-pc-linux-libc2_1-gnu-O5-hlc unstable-version-0_11-branch-alpha-dec-osf5_1 unstable-version-0_10_y-sparc-sun-solaris2_7 unstable-version-0_10_y-i686-pc-linux-libc2_1-gnu-O5 unstable-version-0_10_y-i686-pc-linux-libc2_1-gnu-O5-lcc unstable-version-0_10_y-i686-pc-linux-libc2_1-gnu-O5-intermod unstable-version-0_10_y-i686-pc-linux-libc2_1-gnu-O5-hlc unstable-version-0_10_y-i686-pc-linux-libc2_1-gnu-O4 unstable-version-0_10_y-i686-pc-linux-libc2_1-gnu-O4-hlc unstable-version-0_10_y-i686-pc-linux-libc2_1-gnu-O2 unstable-version-0_10_y-i586-pc-linux-libc2_1-gnu-O0 unstable-version-0_10_y-alpha-dec-osf5_1 unstable-version-0_10_y-alpha-dec-osf3_2 unstable-version-0_10_x-sparc-sun-solaris2_7 unstable-version-0_10_x-i686-pc-linux-libc2_1-gnu-O5 unstable-version-0_10_x-i686-pc-linux-libc2_1-gnu-O5-lcc unstable-version-0_10_x-i686-pc-linux-libc2_1-gnu-O4 unstable-version-0_10_x-i686-pc-linux-libc2_1-gnu-O4-hlc unstable-version-0_10_x-i686-pc-linux-libc2_1-gnu-O3 unstable-version-0_10_x-i686-pc-linux-libc2_1-gnu-O2 unstable-version-0_10_x-i586-pc-linux-libc2_1-gnu-O0 unstable-version-0_10_x-alpha-dec-osf3_2 termination2_trunk stable-version-0_11_0-i686-pc-linux-libc2_3-gnu-O5-intermod stable-version-0_11_0-i686-pc-linux-libc2_2-gnu-O5 stable-version-0_11_0-i686-pc-linux-libc2_2-gnu-O5-lcc stable-version-0_11_0-i686-pc-linux-libc2_2-gnu-O5-hlc stable-version-0_11_0-i686-pc-linux-libc2_1-gnu-O4 stable-version-0_11_0-i686-pc-linux-libc2_1-gnu-O4-asm stable-version-0_11_0-i686-pc-linux-libc2_1-gnu-O3 stable-version-0_11-branch-i686-pc-linux-libc2_3-gnu-O5-intermod stable-version-0_11-branch-i686-pc-linux-libc2_2-gnu-O5-lcc stable-version-0_11-branch-i686-pc-linux-libc2_2-gnu-O5-intermod stable-version-0_11-branch-i686-pc-linux-libc2_1-gnu-O5 stable-version-0_11-branch-i686-pc-linux-libc2_1-gnu-O5-lcc stable-version-0_11-branch-i686-pc-linux-libc2_1-gnu-O5-intermod stable-version-0_11-branch-i686-pc-linux-libc2_1-gnu-O5-hlc stable-version-0_11-branch-alpha-dec-osf5_1
Nothing to show
Commits on Jun 22, 2017
  1. Simplify the code adding types a bit.

    compiler/make_hlds_passes.m:
        Get module_add_type_defn to set !:FoundInvalidType when it finds an error,
        instead of this module assuming that every error_spec it returns is
        for an actual error. (It could be for a warning.)
    
        Pass module_add_type_defn's input parameters in a larger, more cohesive
        package.
    
    compiler/make_hlds_error.m:
        Delete a predicate argument that all its callers always set to the same
        value.
    
        Give several predicates better names.
    
    compiler/add_type.m:
        Make the changes expected by make_hlds_passes.m.
    
        Don't look for abstract type declarations after we have seen concrete
        definitions. Since we now add all abstract type declarations
        before any concrete definitions, this can never happen.
    
        Conform to the change to make_hlds_error.m.
    
    compiler/add_class.m:
    compiler/add_foreign_proc.m:
    compiler/add_mode.m:
    compiler/add_pragma.m:
    compiler/add_pragma_type_spec.m:
    compiler/add_pred.m:
        Conform to the change to make_hlds_error.m.
    zsomogyi committed Jun 22, 2017
Commits on Jun 21, 2017
  1. Avoid co-traversals when creating unify/compare preds.

    compiler/unify_proc.m:
        When creating goals of the form
    
            X = f(ArgX1, ArgX2),
            Y = f(ArgY1, ArgY2),
            ...
    
        don't traverse (a) the types of the arguments of f, (b) the ArgXi, and
        (c) the ArgYi separately, living with the possibility that the lists
        containing them have different lengths. Instead, create a list of triples,
        and traverse that.
    
        Give names such as ArgX1 to these variables. (They used to be unnamed.)
    
        Reorder things to ensure that the order of predicate/function declarations
        is matched by the order of their definitions.
    
    tests/invalid/partial_implied_mode.err_exp:
        Expect ArgX2 to be a named variable in an error message.
    zsomogyi committed Jun 21, 2017
Commits on Jun 19, 2017
  1. Fix broken HTML.

    wangp committed Jun 19, 2017
  2. Fix broken HTML.

    wangp committed Jun 19, 2017
Commits on Jun 18, 2017
  1. Fix an optimization.

    Apply an optimization meant only for automatically generated unify predicates
    only to them.
    zsomogyi committed Jun 18, 2017
  2. Fix term deconstruction for uints.

    runtime/mercury_ml_expand_body.h:
    library/rtti_implementation.m:
    library/erlang_rtti_implementation.m:
        As above.
    
    tests/hard_coded/deconstruct_arg.m:
         Add a test for uints.
    
         Avoid the use of a deprecated predicate.
    
    tests/hard_coded/deconstruct_arg.{exp,exp2}:
         Update expected outputs for the above.
    juliensf committed Jun 18, 2017
  3. Minor improvements.

    compiler/mode_errors.m:
        Make some predicates tail recursive, and give them more expressive names.
    
    compiler/modes.m:
        Make some other predicates tail recursive.
    
        Make the spelling of some progress messages consistent with the
        way we spell the same word in other progress messages.
    
        Fix some comments.
    
    compiler/prog_type.m:
        Fix some comments.
    zsomogyi committed Jun 18, 2017
  4. Carve mode_comparison.m out of modecheck_call.m.

    modecheck_call.m had three different predicates for comparing the
    different modes of a predicate in different ways. Mode checking calls,
    the job of modecheck_call.m, needs only one of these three predicates.
    The other two were there only because, due to the commonalities between
    the three comparison predicates, it is easier to maintain them
    if they are all in the same place.
    
    Moving the comparison predicates to their own module improves
    the cohesion of the both the old module and the new.
    
    compiler/mode_comparison.m:
        Move the predicates dealing with comparing the different modes of a
        predicate here from modecheck_call.m. Make the comment describing
        one of the moved predicates easier to read.
    
    compiler/modecheck_call.m:
        Delete the moved code.
    
    compiler/modecheck_util.m:
        Add a simple utility predicate needed both by the code moved out of
        modecheck_call.m and the code that stays there.
    
    compiler/check_hlds.m:
    compiler/notes/compiler_design.html:
        Mention the new module.
    
        In check_hlds.m, add some more structure.
    
        In compiler_design.html, delete a stray line.
    
    compiler/det_analysis.m:
    compiler/post_typecheck.m:
        Import mode_comparison.m instead modecheck_call.m to get access
        to predicates that compare the different modes of a predicate.
    zsomogyi committed Jun 18, 2017
Commits on Jun 17, 2017
  1. Extend hard_coded/construct_test to cover uints.

    tests/hard_coded/construct_test.{m,exp}:
        As above.
    juliensf committed Jun 17, 2017
  2. Extend type_to_term test to cover uints.

    tests/hard_coded/type_to_term.{m,exp}:
        As above.
    juliensf committed Jun 17, 2017
  3. Prevent a syntax error from causing a compiler abort.

    This fixes mantis bug #410.
    
    compiler/modes.m:
        The reason why the old compiler used to get a compiler abort was that
        while doing mode inference on one procedure of a predicate (e.g. proc_id 0
        of make_titles in bug410.m below), we could add a new mode (procedure)
        to that predicate (proc_id 1 of make_titles), but when we finished
        the mode inference on the original procedure (proc_id 0), we updated
        its proc_info in the OLD pred_info, the one that did not have proc_id 1
        added to it yet. This effectively undid the addition of proc_id 1.
        However, the request to modecheck proc_id 1 was left unaffected.
        When the compiler came around to act on it, its lookup of proc_id 1
        aborted the compiler.
    
        The fix is to put the updated proc_info back into a version of the
        pred_info that we look up fresh, so we get all the updates done to it.
    
    compiler/unify_proc.m:
        Fix a comment.
    
    tests/invalid/bug410.{m,err_exp}:
        The regression test for the bug.
    
    tests/invalid/Mmakefile:
        Enable the regression test case.
    zsomogyi committed Jun 17, 2017
Commits on Jun 16, 2017
  1. Optimize a common case.

    zsomogyi committed Jun 16, 2017
  2. Update programming style.

    zsomogyi committed Jun 16, 2017
  3. Fix comments.

    zsomogyi committed Jun 16, 2017
  4. Improve quantification.m.

    compiler/quantification.m:
        Break a 300-line predicate into smaller pieces.
    
        Put the pieces into a logical order.
    
        Put the quant_info type next to its access predicates.
    
        Put related fields of the quant_info type next to each other.
    
        Optimize updates to quant_infos that turn out to be no-ops.
    zsomogyi committed Jun 16, 2017
  5. Fix bug in my previous change.

    zsomogyi committed Jun 16, 2017
  6. Use explicit streams in several modules.

    compiler/export.m:
    compiler/hlds_dependency_graph.m:
    compiler/hlds_goal.m:
    compiler/hlds_out_goal.m:
    compiler/switch_util.m:
        As above.
    zsomogyi committed Jun 16, 2017
  7. Clarify behaviour of list.find_index_of_match.

    library/list.m:
        Clarify meaning of Index0 parameter in list.find_index_of_match.
    wangp committed Jun 16, 2017
Commits on Jun 15, 2017
  1. Adding missing uint code.

    runtime/mercury_ml_expand_body.h:
         Add missing code for the uint case.
    juliensf committed Jun 15, 2017
Commits on Jun 12, 2017
  1. Make module_name_to_file_name currying-friendly.

    compiler/file_names.m:
        Change the order of arguments of module_name_to_file_name and related
        predicates to make it easier to construct closures from them. Delete
        the previous higher-order-friendly versions, which the previous step
        has made unnecessary.
    
    compiler/compile_target_code.m:
    compiler/elds_to_erlang.m:
    compiler/export.m:
    compiler/find_module.m:
    compiler/generate_dep_d_files.m:
    compiler/intermod.m:
    compiler/llds_out_file.m:
    compiler/make.m:
    compiler/make.module_dep_file.m:
    compiler/make.module_target.m:
    compiler/make.program_target.m:
    compiler/make.util.m:
    compiler/mercury_compile_front_end.m:
    compiler/mercury_compile_llds_back_end.m:
    compiler/mercury_compile_main.m:
    compiler/mercury_compile_middle_passes.m:
    compiler/mercury_compile_mlds_back_end.m:
    compiler/mlds_to_c.m:
    compiler/mlds_to_cs.m:
    compiler/mlds_to_java.m:
    compiler/mmc_analysis.m:
    compiler/mode_constraints.m:
    compiler/module_cmds.m:
    compiler/modules.m:
    compiler/read_modules.m:
    compiler/recompilation.check.m:
    compiler/recompilation.usage.m:
    compiler/write_deps_file.m:
    compiler/write_module_interface_files.m:
    compiler/xml_documentation.m:
        Conform to the change above. In several places, this means replacing
        explicit lambda expressions with simple partial application of the
        relevant predicates.
    zsomogyi committed Jun 12, 2017
  2. Fix wording of a NEWS entry.

    NEWS:
        As above.
    juliensf committed Jun 12, 2017
  3. Announce the addition of uint to the language.

    NEWS:
        List uint as one of the reserved type names.
    
        Announce the addition of the uint/0 type, the 'uint' standard library
        module and various other standard library predicates using the new type.
    
        Announce the changes to the term and lexer module needed for supporting
        the (upcoming) new integer types.  Mention the existence of the
        'old_term_parser' library in the extras for cases where backwards
        compatibility is required.
    juliensf committed Jun 12, 2017
Commits on Jun 11, 2017
  1. Generate Mmakefile fragments via an internal representation.

    The compiler generates several kinds of files (including .d, .dv, and
    .dep files) that contain mmakefile fragments. Imposing structure on
    those fragments makes it easier to compare different versions
    of those fragments. This should make it easier to find the reason
    why modifications to a module in a directory that is compiled with
    intermodule optimization (such as the library directory) usually requires
    rebuilding those mmakefile fragments via an "mmake depend".
    
    One advantage of the new way of creating mmakefile fragments
    is that the internal representation makes it clear where the code
    that constructs one mmakefile entry ends and code that constructs
    the next one begins. With the old approach, this was often significantly
    less clear than one would expect and want.
    
    compiler/mmakefiles.m:
        A new module that defines a representation for mmakefiles and mmakefile
        fragments, and for printing them out.
    
        It provides the means for a gradual transition from the current code
        writing out mmakefile fragments directly to printing them out
        via this module. The main technique it uses for this is to let both
        the manually-written and the generated-from-internal-representation
        versions of a mmakefile fragment be printed, with one version
        or the other being disabled via the make equivalent of C's "#ifdef 0".
    
    compiler/libs.m:
        Add mmakefiles.m to the libs package.
    
    compiler/notes/compiler_design.html:
        Document mmakefiles.m.
    
    compiler/write_deps_file.m:
        After each piece of code that prints out a part of an mmakefile,
        add code to construct the internal representation of that part,
        and let mmakefiles.m print it if that the current state of the transition
        calls for it.
    
        This change duplicates a significant amount of functionality.
        However, this should be only a short time. After a transition period,
        we can delete the old version of each such piece of code.
    
        The new versions of the code use "some [!StateVar]" scopes
        reasonably extensively. I refrained from indenting the bodies
        of those scopes to avoid having to wrap the code inside them,
        since that would make this diff harder to review.
    
        Put a vim modeline at the top of generated mmakefile fragments,
        to make it easier to look at them with vim.
    
        Move all the code that opens and closes I/O streams to one predicate.
    
        Delete the tests of the assume_gmake option. While this was useful
        at one time in the past, we have, for a long time now, generated
        mmakefile fragments that assumed gmake even when assume_gmake
        was NOT set.
    
        In several places, give variables more meaningful names.
    
    compiler/file_names.m:
        Provide versions of some predicates that are easier to use
        with higher-order code.
    
    compiler/Mercury.options:
        Specify --warn-implicit-stream-calls for both mmakefiles.m and
        write_deps_file.m
    zsomogyi committed Jun 11, 2017
  2. Use uint literals in library and compiler.

    configure.ac:
         Require that the bootstrap compiler support uint literals.
    
    library/integer.m:
    library/uint.m:
    compiler/const_prop.m:
    compiler/ml_lookup_switch.m:
    compiler/simplify_goal_call.m:
    compiler/uint_emu.m:
         Use uint literals rather than casting from ints.
    
         Delete imports of the uint module where we can now do so.
    juliensf committed Jun 11, 2017
Commits on Jun 8, 2017
  1. Document the uint type.

    doc/reference_manual.texi:
          As above.
    juliensf committed Jun 8, 2017
  2. Improve diagnostics for currying multi-mode predicates.

    The improvements take two forms.
    
    The first is that when the mode checker tries to schedule a unification
    of the form X = curried_pred(A1, ... An), but fails, perhaps because
    curried_pred has more than one declared mode matching the current insts
    of the Ai, we record this fact in the mode_info. Then, if later we find
    that X is insufficiently instantiated, we print the message we originally
    generated for the X = curried_pred(A1, ... An) unification (but which we
    threw away when the scheduling attempt failed) as a possible explanation
    of this insufficient instantiation.
    
    The second is that when scheduling X = curried_pred(A1, ... An) but fails,
    we record more information about the reason, to print it later in the hope that
    it may help the user diagnose the problem.
    
    compiler/mode_errors.m:
        Change the representation of the errors resulting for not being able
        to schedule rhs_lambda unifications of the form X = curried_pred(Ai).
        Merge the previous two separate errors into one, and add a parameter
        that that distinguishes the three (not two) possible different causes
        of the error. Print better diagnostics for all three, based on a common
        template.
    
        Change the representation of the errors that say a variable is not
        sufficiently instantiated, to make it possible (but of course not
        compulsory) to record what error of the X = curried_pred(Ai) kind
        may be responsible for it. Include the error message for this cause
        in the error message about the insufficiently instantiated variable.
    
    compiler/mode_info.m:
        Add a field to the mode_info that allows a failed attempt to schedule
        X = curried_pred(Ai) to record the error it generates as a possible
        cause of the later insufficient instantiation of X.
    
    compiler/modecheck_unify.m:
        Gather the extra information now needed by the representation of mode
        errors for failed attempts to schedule X = curried_pred(Ai).
        Record the errors for such attempts in the new mode_info field.
    
    compiler/modecheck_util.m:
        When generating "variable is not sufficiently instantiated" errors,
        see if the new mode_info field say that the insufficiently instantiated
        variable was, in a previous conjunct, involved in a failed
        X = curried_pred(Ai) unification, and if yes, record this fact
        as a possible cause of the error.
    
    compiler/modecheck_goal.m:
        Reset the new field at the start of every branched control structure,
        to prevent us from using information about X = curried_pred(Ai)
        unifications in one branch in other, parallel branches.
    
        Avoid allocating a context at every goal.
    
    library/term.m:
        Add a utility predicate to enable that avoidance.
    
    NEWS:
        Mention the new utility predicate.
    
        Fix some no-longer-valid entries.
    
    compiler/modecheck_call.m:
        Make some code need less stack space.
    
        Fix some comments.
    
    compiler/modecheck_conj.m:
        Clarify some code.
    
    tests/invalid/uint_bitwise_xor_mode.{m,err_exp}:
        A new test case for both improvements. It is a version of
        tests/hard_coded/uint_bitwise.m cut down to contain just the bug
        that previously we generate only a misleading error message for.
    
    tests/invalid/Mmakefile:
        Enable the new test.
    
    tests/invalid/multimode_addr_problems.err_exp:
        Update this expected output to account for the second improvement.
    zsomogyi committed Jun 8, 2017
  3. Improve diagnostics for currying multi-mode predicates.

    The improvements take two forms.
    
    The first is that when the mode checker tries to schedule a unification
    of the form X = curried_pred(A1, ... An), but fails, perhaps because
    curried_pred has more than one declared mode matching the current insts
    of the Ai, we record this fact in the mode_info. Then, if later we find
    that X is insufficiently instantiated, we print the message we originally
    generated for the X = curried_pred(A1, ... An) unification (but which we
    threw away when the scheduling attempt failed) as a possible explanation
    of this insufficient instantiation.
    
    The second is that when scheduling X = curried_pred(A1, ... An) but fails,
    we record more information about the reason, to print it later in the hope
    that it may help the user diagnose the problem.
    
    compiler/mode_errors.m:
        Change the representation of the errors resulting for not being able
        to schedule rhs_lambda unifications of the form X = curried_pred(Ai).
        Merge the previous two separate errors into one, and add a parameter
        that that distinguishes the three (not two) possible different causes
        of the error. Print better diagnostics for all three, based on a common
        template.
    
        Change the representation of the errors that say a variable is not
        sufficiently instantiated, to make it possible (but of course not
        compulsory) to record what error of the X = curried_pred(Ai) kind
        may be responsible for it. Include the error message for this cause
        in the error message about the insufficiently instantiated variable.
    
    compiler/mode_info.m:
        Add a field to the mode_info that allows a failed attempt to schedule
        X = curried_pred(Ai) to record the error it generates as a possible
        cause of the later insufficient instantiation of X.
    
    compiler/modecheck_unify.m:
        Gather the extra information now needed by the representation of mode
        errors for failed attempts to schedule X = curried_pred(Ai).
        Record the errors for such attempts in the new mode_info field.
    
    compiler/modecheck_util.m:
        When generating "variable is not sufficiently instantiated" errors,
        see if the new mode_info field say that the insufficiently instantiated
        variable was, in a previous conjunct, involved in a failed
        X = curried_pred(Ai) unification, and if yes, record this fact
        as a possible cause of the error.
    
    compiler/modecheck_goal.m:
        Reset the new field at the start of every branched control structure,
        to prevent us from using information about X = curried_pred(Ai)
        unifications in one branch in other, parallel branches.
    
        Avoid allocating a context at every goal.
    
    library/term.m:
        Add a utility predicate to enable that avoidance.
    
    NEWS:
        Mention the new utility predicate.
    
        Fix some no-longer-valid entries.
    
    compiler/modecheck_call.m:
        Make some code need less stack space.
    
        Fix some comments.
    
    compiler/modecheck_conj.m:
        Clarify some code.
    
    tests/invalid/currying_multimode_func.{m,err_exp}:
        A new test case for both improvements. It is a version of
        tests/hard_coded/uint_bitwise.m cut down to contain just the bug
        that previously we generated only a misleading error message for.
    
    tests/invalid/Mmakefile:
        Enable the new test.
    
    tests/invalid/multimode_addr_problems.err_exp:
        Update this expected output to account for the second improvement.
    zsomogyi committed Jun 8, 2017
Commits on Jun 6, 2017
Commits on Jun 5, 2017
  1. Add reverse modes for uint.xor/2 (part 2).

    library/uint.m:
          Uncomment the declarations for the reverse modes of xor/2.
    juliensf committed Jun 5, 2017
  2. Improve diagnostics for foreign_{export_,}enum pragmas.

    We can now generate error messages for types that have both foreign_enum
    and reserve_tag pragmas, which we couldn't before. (In some cases,
    we used to get a compiler abort.)
    
    compiler/add_foreign_enum.m:
        Don't stop after finding the first problem with a foreign_export_enum
        or foreign_enum pragma; if a pragma has more than one problem,
        generate reports for them all.
    
        When reporting that the type named in a foreign_export_enum or
        foreign_enum is not an enum type, have the error message say *why*.
    
        Fill in the two new fields in exported_enum_infos (see below).
    
    compiler/make_hlds_passes.m:
        Add reserve_tag pragmas to the HLDS before adding foreign_export_enum
        and foreign_enum pragmas. Since such a pragma would convert an enum
        type into a non-enum type, this is needed to ensure that the code
        in add_foreign_enum.m that checks whether a type is an enum type
        is operating on data that is final. Without that, it may make
        wrong decisions.
    
    compiler/make_hlds_separate_items.m:
    compiler/add_pragma.m:
        Provide the support needed by the new code in make_hlds_passes.m.
    
        In add_pragma.m, rename some insts to avoid name ambiguities,
        and simplify an if-then-else.
    
    compiler/hlds_module.m:
        Add two fields to exported_enum_infos, to make processing them easier.
        (We couldn't do this earlier, since add_foreign_enum.m didn't have
        access to the final forms of the bodies of du type definitions,
        which is where the values of the two new fields come from.)
    
    compiler/export.m:
    compiler/ml_type_gen.m:
        Simplify some code using the new fields in exported_enum_infos.
    
    compiler/error_util.m:
        Provide a mechanism to control whether sym_names in cons_ids
        are module qualified or not. This is "needed" by the new error
        messages created in add_foreign_enum.m.
    
    compiler/check_promise.m:
    compiler/det_report.m:
    compiler/parse_inst_mode_name.m:
    compiler/typecheck_errors.m:
        Conform to the change to error_util.m.
    
    compiler/make_tags.m:
        Clean up some code and some comments.
    
    tests/invalid/exported_foreign_enum.{m,err_exp}:
        A new test case to test the new capability to print more than one
        error message for the same pragma.
    
    tests/invalid/Mmakefile:
        Enable the new test case.
    
    tests/invalid/ee_invalid.err_exp:
        Expect improved error messages.
    zsomogyi committed Jun 5, 2017
Commits on Jun 2, 2017
  1. Fix formatting.

    zsomogyi committed Jun 2, 2017
  2. Delete a duplicate comment.

    zsomogyi committed Jun 2, 2017
Commits on May 31, 2017
  1. Delete now-unused predicates.

    zsomogyi committed May 31, 2017