mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-30 00:34:40 +00:00
Branches: main
Allow testing of java grade. Requires using `mmc --make' for now.
This patch does not attempt to fix test failures.
tests/Mmake.common:
Delete unneeded Java-specific rule, which was broken.
tests/benchmarks/Mmakefile:
tests/general/Mmakefile:
tests/general/string_format/Mmakefile:
tests/grade_subdirs/Mmakefile:
tests/hard_coded/Mmakefile:
tests/recompilation/Mmakefile:
tests/term/Mmakefile:
tests/valid/Mmakefile:
Don't deliberately disable tests in java grade.
tests/*.m:
Add Java foreign code.
Write dummy procedures instead of abusing `:- external'.
36 lines
703 B
Mathematica
36 lines
703 B
Mathematica
:- module intermod_c_code2.
|
|
|
|
:- interface.
|
|
|
|
:- some [U] pred c_code(T::in, U::out) is det.
|
|
|
|
:- implementation.
|
|
|
|
c_code(T, U) :- c_code_2(T, U).
|
|
|
|
:- some [U] pred c_code_2(T::in, U::out) is det.
|
|
|
|
:- pragma foreign_proc("C",
|
|
c_code_2(T::in, U::out),
|
|
[will_not_call_mercury, promise_pure],
|
|
"{
|
|
U = T;
|
|
TypeInfo_for_U = TypeInfo_for_T;
|
|
}").
|
|
:- pragma foreign_proc("C#", c_code_2(T::in, U::out), [promise_pure],
|
|
"{
|
|
U = T;
|
|
TypeInfo_for_U = TypeInfo_for_T;
|
|
}").
|
|
:- pragma foreign_proc("Java", c_code_2(T::in, U::out), [promise_pure],
|
|
"{
|
|
U = T;
|
|
TypeInfo_for_U = TypeInfo_for_T;
|
|
}").
|
|
:- pragma foreign_proc("Erlang", c_code_2(T::in, U::out), [promise_pure],
|
|
"
|
|
U = T,
|
|
TypeInfo_for_U = TypeInfo_for_T
|
|
").
|
|
|