tests/hard_coded/backend_external.m:
tests/hard_coded/backend_external_pred.m:
tests/hard_coded/c_write_string.m:
tests/hard_coded/ee_dummy.m:
tests/hard_coded/pragma_c_code.m:
tests/hard_coded/pragma_foreign_export.m:
tests/hard_coded/target_mlobjs.m:
tests/hard_coded/type_tables.m:
tests/submodules/sm_exp_bug.m:
Use don't-care variables to handle the I/O state in foreign procs.
Assigning the I/O state at the end of the foreign_proc body results
in spurious warnings about uninitialized variables from MSVC.
tests/hard_coded/*.m:
Update programming style, unless doing so would change
the meaning of the test, in particular:
- use '.' as a module qualifier in place of '__'
- use {write,print}_line where appropriate
- use if-then-else in place of C -> T ; E
- use state variables in place of DCGs
tests/hard_coded/dir_test.m:
Document what the expected outputs correspond to.
Use a uniform module qualifier in the output.
tests/hard_coded/dir_test.exp*:
Conform to the above change.
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: 0.1
Branches: main
Remove deprecated syntax from some test cases.
(This was done on the release branch some time ago.)
tests/*/*.m:
Replace deprecated syntax.
Estimated hours taken: 3
Branches: main
Get the tests in hard_coded to compile in the grade il. The tests may
still fail because of other reasons.
tests/hard_coded/constraint_order.m:
tests/hard_coded/copy_pred.m:
tests/hard_coded/copy_pred_2.m:
tests/hard_coded/dupcall_impurity.m:
tests/hard_coded/export_test.m:
tests/hard_coded/foreign_import_module.m:
tests/hard_coded/foreign_type3.m:
tests/hard_coded/ho_solns.m:
tests/hard_coded/ho_univ_to_type.m:
tests/hard_coded/impure_foreign.m:
tests/hard_coded/impure_prune.m:
tests/hard_coded/intermod_c_code2.m:
tests/hard_coded/intermod_multimode.m:
tests/hard_coded/multimode.m:
tests/hard_coded/no_inline.m:
tests/hard_coded/rnd.m:
Provide C# implementation of C code.
tests/hard_coded/existential_types_test.m:
tests/hard_coded/frameopt_pragma_redirect.m:
tests/hard_coded/mode_choice.m:
tests/hard_coded/pragma_c_code.m:
tests/hard_coded/pragma_inline.m:
tests/hard_coded/target_mlobjs.m:
tests/hard_coded/unused_float_box_test.m:
Provide Mercury implementation of C code.
tests/hard_coded/redoip_clobber.m:
Provide MC++ implementation of C code.
Estimated hours taken: 8
Various changes to get things to work with the DEC Alpha OSF1 C
compiler in grade hlc.gc.
compiler/equiv_type.m:
Change the code for equiv_type__replace_item_in_item_list
so that it is tail recursive, by using an accumulator and
calling list__reverse at the end. This is needed to avoid
a stack overflow (with the default 2M stack limit) when
bootstrapping with the DEC Alpha OSF1 C compiler in grade hlc.gc.
The dec-alpha-osf3.2 `cc' was generating code that used
280 bytes of space per stack frame for this procedure.
compiler/fact_table.m:
Ensure that there is a statement after every label, since
ANSI/ISO C doesn't allow labels at the end of a block without
an empty statement following them.
library/exception.m:
Use a different name for the local typedef in different functions.
This allows the code to work with the DEC Alpha OSF1 C in
`-std' ("ANSI C with popular extensions") mode, rather than
the `-std1' (strict ANSI/ISO C). The supposedly popular
extension here is treating local typedefs as if they were
global. It's probably not worth expending much effort to
cater for non-ANSI modes of compilers, but in this case the
effort is small and arguably the different names are more
descriptive anyway.
runtime/mercury.c:
Avoid the use of a GNU C extension (returning void values).
runtime/mercury_deep_copy.c:
Change `#undef FOO(ARGS)' to `#undef FOO', since the former
is not allowed in ANSI/ISO C.
trace/mercury_trace_internal.c:
Change `#endif FOO' to `#endif /* FOO */', since the former
is not allowed in ANSI/ISO C.
tests/hard_coded/pragma_c_code.m:
tests/hard_coded/type_tables.m:
Use `\\n' rather than `\n' for newlines in strings inside
`pragma c_code'. This is needed because the first level of
slashes gets processed when converting from Mercury to C, and
ANSI/ISO C doesn't allow literal newlines in strings.
Estimated hours taken: 0.25
tests/pragma_c_code.m:
tests/pragma_inline.m:
Add `#include <stdio.h>', to avoid warnings now that it is
no longer included by "imp.h".
Estimated hours taken: 0.25
tests/hard_coded/pragma_c_code.m:
Fix bug detected by singleton variable warning.
Work around name clash between variable name in
pragma(c_code, ...) declaration and type defined
in "imp.h".
Estimated hours taken: 1
Made the testing of the C interface a little more robust, and added tests of
the pragma(inline, ...) declaration.
pragma_c_code.m:
Made the tests a little more rigorous.
pragma_c_code.exp:
Changed the expected results to reflect changes to the .m file.
pragma_inline.m:
Simple test of inlining:
pragma_inline.exp:
Expected results for the inlining test.