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.
Estimated hours taken: 1
Branches: main
The `thread.yield', `semaphore.wait', `semaphore.signal' procedures were
crashing in debug and deep profiling grades. The problem is that they caused
the calling context to suspend but resume in an auxiliary function instead of
back into the foreign_proc, so code inserted at the end of the foreign_proc by
those transforms wouldn't be executed.
Work around this by reverting to the original method of taking the address of
labels so that suspended contexts will resume back within the foreign_proc.
library/thread.m:
library/thread.semaphore.m:
#define ML_THREAD_AVOID_LABEL_ADDRS if execution tracing or deep
profiling are enabled in low-level C grades.
In the problematic foreign_procs, test for ML_THREAD_AVOID_LABEL_ADDRS
and use the workaround if necessary.
Unrelated: add missing `tabled_for_io' attributes on foreign_procs in
these modules.
tests/hard_coded/Mmakefile:
tests/hard_coded/test_semaphore.exp:
tests/hard_coded/test_semaphore.m:
tests/hard_coded/test_yield.exp:
tests/hard_coded/test_yield.m:
Add test cases.