Commit Graph

2 Commits

Author SHA1 Message Date
Zoltan Somogyi
d634e23105 Standardize %---% line lengths in the tests. 2019-07-26 01:29:53 +02:00
Zoltan Somogyi
bf324f88cc Fix Mantis bug 50.
compiler/liveness.m:
    The bug was a violation of an invariant required by delay_death_proc_body.
    Document the requirement that this invariant places on cse_detection.m,
    the requirement whose non-fulfillment caused the bug.

compiler/cse_detection.m:
    When hoisting a deconstruction unification and creating new variables
    for its arguments, if any of the arguments were named variables holding
    type_infos, typeclass_infos or their components, then give a name
    to the variable holding the corresponding argument as well. This fixes
    the bug by fixing the violation of the above invariant. Add a pointer
    to the invariant in liveness.m.

    Document the reason why another change that looks like a potential fix
    wouldn't actually work.

    Give some predicates better names and argument orders.

    Update the module qualifier (from : to .) in an example. We haven't used
    : in a LONG time.

compiler/continuation_info.m:
    Simplify the code where the bug originally caused the compiler to crash.
    (This code was not actually in error.)

compiler/simplify_goal_conj.m:
    Fix a small performance bug I noted while hunting the bug. When the
    excess_assign optimization replaced all occurrences of a variable,
    it delete the variable from the varset, but not the vartypes,
    leaving lookups on it slower than necessary.

    Record the reason why do not choose to fix a potential performance bug
    that to the best of my knowledge, we haven't actually seen yet in the wild.

compiler/hlds_goal.m:
    Define a type as a shorter and more meaningful synonym for a particular
    type used in a predicate (incremental_rename_vars_in_goal) that I thought
    would have been useful to implement the change to cse_detection.m
    that turned out to be NOT a good fix.

compiler/state_var.m:
    Use the new type synonym.

tests/valid/bug50_full.m:
tests/valid/bug50.m:
    Two versions of the Mantis test case; the original version (slightly
    cleaned up), and the minimal version I actually debugged. The latter
    has a detailed description of the bug.

tests/valid/Mercury.options:
tests/valid/Mmakefile:
    Enable the new test cases.
2015-11-15 23:13:02 +11:00