Commit Graph

2 Commits

Author SHA1 Message Date
Simon Taylor
6991a104d2 When writing a mode-specific clause in a `.opt' file, get the modes
Estimated hours taken: 0.5
Branches: main

compiler/hlds_out.m:
	When writing a mode-specific clause in a `.opt' file, get the modes
	of the procedure using proc_info_declared_argmodes rather than
	proc_info_argmodes. This is necessary because the test in
	make_hlds.m to work out whether a clause matches a mode declaration
	uses syntactic equality on the modes, but the modes returned by
	proc_info_argmodes may have been expanded by
	propagate_types_into_modes.

compiler/intermod.m:
	Tell hlds_out.m to use the declared modes when writing clauses.

tests/hard_coded/multimode.m:
tests/hard_coded/multimode_main.exp:
	Test case.
2001-08-18 11:33:54 +00:00
Fergus Henderson
2bd50c8c37 Fix a bug in my earlier change to add support for writing
Estimated hours taken: 3
Branches: main

Fix a bug in my earlier change to add support for writing
different clauses for different modes -- it didn't handle
intermodule optimization, because the `.opt' files weren't
being output correctly.

compiler/hlds_out.m:
	Change hlds_out__write_clause so that it outputs the
	mode annotations, if needed.

tests/hard_coded/Mmakefile:
tests/hard_coded/intermod_multimode.m:
tests/hard_coded/intermod_multimode_main.m:
tests/hard_coded/intermod_multimode_main.exp:
	Add a multi-module test case for using different clauses
	for different modes.
2001-05-27 09:58:37 +00:00