Commit Graph

3 Commits

Author SHA1 Message Date
Zoltan Somogyi
d23c4f74a3 Update the style of more tests. 2020-10-06 19:20:18 +11:00
Zoltan Somogyi
33eb3028f5 Clean up the tests in half the test directories.
tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
    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 debugger tests,
    specify the new line numbers in .inp files and expect them in .exp files.
2015-02-14 20:14:03 +11:00
Peter Wang
6e3784ae7c Replace the implementation of `ctgc.selector.subsumed_by', which was not
Estimated hours taken: 25
Branches: main

Replace the implementation of `ctgc.selector.subsumed_by', which was not
working correctly for some selectors which contained type selectors.  For
instance, `subsumed_by(ModuleInfo, S1, S2, Extension)' wouldn't succeed if
S1 = [typesel(t1)], S2 = [termsel(f/1,1)] even if it would be possible to
select a node with the selector [termsel(f/1,1), typesel(t1)].  In this
case S2 does subsume S1, with Extension = [typesel(t1)].

The bug caused the structure sharing "comb" operation to not work as
intended, so that information about sharing between data structures would be
lost when `--structure-sharing-widening' was enabled, as it introduces type
selectors.

compiler/ctgc.selector.m:
	Replace `subsumed_by' by a more direct version which hopefully works
	as intended.

	Delete procedures which are longer used.

tests/hard_coded/Mercury.options:
tests/hard_coded/Mmakefile:
tests/hard_coded/sharing_comb.exp:
tests/hard_coded/sharing_comb.m:
	Add a test case.
2008-05-22 04:11:30 +00:00