Commit Graph

3 Commits

Author SHA1 Message Date
Zoltan Somogyi
3dc4babb24 Update the style of more test cases.
And update expected output files for changes in line numbers.
2021-07-27 13:29:46 +10:00
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
Simon Taylor
5f7880aca3 Fix a code generator abort reported by Stephane Marie
Estimated hours taken: 10

Fix a code generator abort reported by Stephane Marie
<stephane.marie@detexis.thomson-csf.com>.

The bug was in the code to work out the instmap after a deconstruction
unification with complicated sub-unifications.
The instmap_delta for the unification contained only the bindings for
the first argument for which a new variable was created.

The test case now gives an error during mode analysis
rather than a code generator abort (for unification procedures
of imported types) or a mode error during unique mode analysis
(for local types).

compiler/modes.m:
compiler/modecheck_call.m:
compiler/modecheck_unify.m:
	Simplify the code to handle extra goals by not attempting
	to bodge together the instmap after the main goal.
	Instead, the code now creates the extra unifications and
	rechecks the goal with the unifications added.

compiler/mode_info.m:
	Add a field to say whether we are reprocessing a goal after
	adding extra goals. Abort if the reprocessing adds more extra goals.

	The `may_changed_called_proc' field is now separate from
	the `how_to_check_goal' field. This is used to avoid
	repeating the search for the best procedure when rerunning
	mode analysis after adding the extra goals.

compiler/modecheck_unify.m:
	Removed predicate unify_vars - it is no longer used.

compiler/unify_proc.m:
	Call module_info_remove_predid if there are mode errors
	in a unification procedure to avoid spurious determinism
	errors.

tests/hard_coded/Mmakefile:
tests/hard_coded/partial_implied_mode.m:
tests/hard_coded/partial_implied_mode.err_exp:
	Test case. It would be nicer if the error message pointed
	to the unification which caused the unification procedure
	to be created, rather than the type declaration in the
	interface file.
1999-05-18 03:09:21 +00:00