Files
mercury/tests/invalid/test_feature_set.err_exp2
Zoltan Somogyi cc1711071e Make all the pre-HLDS and front-end passes of the compiler gather up
Estimated hours taken: 50
Branches: main

Make all the pre-HLDS and front-end passes of the compiler gather up
all their error messages and print them all at once, in sorted order,
unless the user asked for progress messages, in which case we print all the
errors accumulated so far just before each printing each progress message.

This should make error message output significantly easier to interpret.

compiler/module_imports.m:
	Add a new field to the module_imports structure (the main pre-HLDS
	representation of the parse tree) to hold the list of error messages
	generated so far.

	Rename the module_imports structure as the module_and_imports
	structure, since it holds the module's items as well as information
	about its imports.

	Update the access predicates to encourage getting the items, the error
	messages and the error indication all at once.

	Add mechanisms for updating the error indication and the error
	messages.

	Add a distinguishing prefix to the field names of the structure.

compiler/error_util.m:
compiler/hlds_error_util.m:
	Add facilities for printing error messages in batches.

	In error_util.m, delete an unused argument from several predicates.

compiler/mercury_compile.m:
compiler/intermod.m:
	Gather up error messages to print in batches.

	In the parts of the code affected by the above, explicitly pass
	around a globals structure, instead of having all the predicates
	get it of the I/O state. Since some code (e.g. the start recompilation
	system) still uses the copy in the I/O state, we ensure that this copy
	is kept in sync with the explicitly passed around copy.

	Rename some predicates to avoid ambiguities.

compiler/modules.m:
	Return errors in the module_and_imports structure, not separately.

	Gather up error messages to print in batches.

	Explicitly pass around globals structures.

compiler/read_modules.m:
	Rename the read_modules type to have_read_module_map, since this is
	more explicit.

	For each module we have already read, remember not just the items we
	read from it, but also the error messages we generated during the
	reading. This is so these error messages can be printed together with
	other errors from other sources.

	Explicitly pass around globals structures.

compiler/prog_io.m:
compiler/purity.m:
compiler/stratify.m:
	Rename several predicates to avoid ambiguities.

compiler/modes.m:
	Change the interface of the main predicate to avoid the need for a
	lambda expression in mercury_compile.m.

compiler/recompilation.check.m:
	Add a distinguishing prefix to the field names of a structure.

	Fix a wrong definition of this_file.

	Conform to the changes above.

compiler/compiler_target_code.m:
compiler/deps_map.m:
compiler/make.m:
compiler/make.dependencies.m:
compiler/make.module_dep_file.m:
compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/make.util.m:
compiler/make_hlds.m:
compiler/make_hlds_passes.m:
compiler/trans_opt.m:
compiler/write_deps_file.m:
	Conform to the changes above.

compiler/add_clause.m:
compiler/add_pragma.m:
compiler/state_var.m:
	Add an import of io, since their parent make_hlds.m does not import io
	anymore.

	In add_pragma, update an error message that did not mention trseg as
	well as tr as indicating a trailing grade.

tests/hard_coded/Mmakefile:
	Move two tests that cannot pass in debug grades due to the lack of tail
	recursion to the list containing the other tests with this property.

tests/invalid/test_feature_set.err_exp:
	Update the expected output of this test to expect the updated error
	message from add_pragma.

tests/invalid/test_feature_set.err_exp2:
	Add this file as the expected output for trailing grades.

tests/invalid/*.err_exp:
tests/warnings/*.err_exp:
	Update the expected output for many tests to expect the error messages
	in sorted order.
2009-08-14 20:37:57 +00:00

9 lines
515 B
Plaintext

test_feature_set.m:008: Error: this module must be compiled in a grade that
test_feature_set.m:008: supports concurrent execution.
test_feature_set.m:008: Error: this module must be compiled in a grade that
test_feature_set.m:008: supports memoisation.
test_feature_set.m:008: Error: this module must be compiled in a grade that
test_feature_set.m:008: uses single precision floats.
test_feature_set.m:008: Grades that use single precision floats contain the
test_feature_set.m:008: grade modifier `spf'.