browser/declarative_oracle.m:
Optimize table lookups when checking whether a procedure is trusted.
Instead of doing three separate lookups to test
- whether the module in which the procedure is in is trusted,
- whether the Mercury standard library is trusted, and this module
is in the Mercury standard library, and
- whether the predicate or function the procedure is in is trusted,
look up the module the procedure is in just once, then
- replace both of the first two lookups above with testing a single flag
each, and then
- look up the procedure in a map of trusted predicate or function names.
The last test should be faster than its old equivalent, because the map
it searches will be local to the module, whereas it used to be global.
Print the list of trusted entities (which this module calls trusted
"objects") in the same order regardless of whether we are printing
for users or as commands. The order will be the order in which they were
trusted.
Undo an unnecessary capitalization in the list of trusted objects.
browser/declarative_debugger.m:
Improve the style of some related code.
tests/debugger/save.exp:
tests/declarative_debugger/skip.exp:
tests/declarative_debugger/trust.exp:
Expect the changes described above in the list of trusted objects.
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.
Specifically, rename the following subdirectories of the test directory:
old dir name new dir name
analysis/ext analysis_external
analysis/ctgc analysis_ctgc
analysis/excp analysis_excp
analysis/table analysis_table
analysis/trail analysis_trail
invalid/purity invalid_purity
analysis/sharing analysis_sharing
hard_coded/purity purity
general/accumulator accumulator
analysis/unused_args analysis_unused_args
debugger/declarative declarative_debugger
hard_coded/exceptions exceptions
general/string_format string_format
hard_coded/sub-modules submodules
hard_coded/typeclasses typeclasses
general/structure_reuse structure_reuse
Some subdirectories are still there, to wit, the subdirs of the inactive
test directory stm, each of which (if I remember correctly) holds only one
test case.
The general/structure_reuse directory previously wasn't enabled; I think
this was a bug.
tests/Mmakefile:
tools/bootcheck:
List the new test directories.
tests/Mmake.common:
The analysis_* directories each need to know whether the workspace
uses subdirs. This used to be controlled from one place,
analysis/Mmakefile, but since analysis_* are not subdirs of analysis,
we need a new central place to find this out.
tests/analysis/common.sh:
Update documentation for the move.
tests/OLDDIRS/Mmakefile:
Set the subdir list to empty.
tests/NEWDIRS/Mmakefile:
Update the "this" directory's name, as well as TESTS_DIR.
In analysis_*/Mmakefile, use the new mechanism for detecting the presence
of subdirs.