Commit Graph

2 Commits

Author SHA1 Message Date
Zoltan Somogyi
fdd141bf77 Clean up the tests in the other test directories.
tests/invalid/*.{m,err_exp}:
tests/misc_tests/*.m:
tests/mmc_make/*.m:
tests/par_conj/*.m:
tests/purity/*.m:
tests/stm/*.m:
tests/string_format/*.m:
tests/structure_reuse/*.m:
tests/submodules/*.m:
tests/tabling/*.m:
tests/term/*.m:
tests/trailing/*.m:
tests/typeclasses/*.m:
tests/valid/*.m:
tests/warnings/*.{m,exp}:
    Make these tests use four-space indentation, and ensure that
    each module is imported on its own line. (I intend to use the latter
    to figure out which subdirectories' tests can be executed in parallel.)

    These changes usually move code to different lines. For the tests
    that check compiler error messages, expect the new line numbers.

browser/cterm.m:
browser/tree234_cc.m:
    Import only one module per line.

tests/hard_coded/boyer.m:
    Fix something I missed.
2015-02-16 12:32:18 +11:00
Peter Wang
2c16009dd7 Fix two compiler aborts in the structure sharing analysis.
Branches: main

Fix two compiler aborts in the structure sharing analysis.

compiler/ctgc.selector.m:
	Fix a problem with widening structure sharing pairs in the presence of
	existential types.  We'd try to reduce a term selector to a type
	selector of the type of the node selected by the term selector, but if
	that node would be existentially typed then the compiler would abort.
	To avoid that, we resort to reducing the selector to a type selector of
	the parent node's type instead.

	Make `type_of_node' and `select_subtype' into semidet predicates which
	fail if the selector would select an existentially typed node, rather
	than aborting.  Add det versions of the original functions.

	Make `select_subtype' able to succeed on existentially typed functors
	if the selector doesn't actually select an existentally typed
	argument.

compiler/structure_sharing.domain.m:
	Don't add a new sharing pair to a sharing set if the left and right
	hand sides of the sharing pair are the same after normalisation.  This
	avoids a different abort if such a pair needs to be removed: it tries
	to remove both (LHS - RHS) and (RHS - LHS) but since the two sides are
	equal, only one copy of the pair would exist in the sharing set to be
	removed.

tests/valid/Mercury.options:
tests/valid/Mmakefile:
tests/valid/sharing_exist.m:
	Add test case.
2008-03-17 01:56:11 +00:00