Add Java support to the foreign language interface.

Estimated hours taken: 70
Branches: main

Add Java support to the foreign language interface.

mercury/compiler/compile_target_code.m:
mercury/compiler/make.module_target.m:
mercury/compiler/mercury_compile.m:
	Pass `compile_java_file' a Java filename rather than a module name.

mercury/compiler/globals.m:
	Add `java' as a `foreign_language'.

mercury/compiler/handle_options.m:
	Allow Java as a back-end foreign language if the target language
	is Java.

mercury/compiler/hlds_data.m:
	Allow Java foreign_types.

mercury/compiler/intermod.m:
mercury/compiler/foreign.m:
mercury/compiler/make.util.m:
mercury/compiler/make_hlds.m:
mercury/compiler/mercury_compile.m:
mercury/compiler/mercury_to_mercury.m:
mercury/compiler/ml_code_gen.m:
mercury/compiler/mlds.m:
mercury/compiler/mlds_to_c.m:
mercury/compiler/mlds_to_il.m:
mercury/compiler/mlds_to_ilasm.m:
mercury/compiler/mlds_to_java.m:
mercury/compiler/pragma_c_gen.m:
mercury/compiler/prog_data.m:
mercury/compiler/prog_io_pragma.m:
	Add or modify existing code to support `java' as a `foreign_language'
	and Java `foreign_type's.

mercury/compiler/mlds_to_java.m:
	Nicely indent the generated code that unboxes arguments from
	return-argument	arrays which are used for methods with multiple
	return arguments.
This commit is contained in:
Michael Wybrow
2003-02-11 02:14:28 +00:00
parent 1c30848641
commit cdca9fed0a
20 changed files with 410 additions and 54 deletions

View File

@@ -349,6 +349,7 @@
:- type foreign_language_type
---> il(il_foreign_type)
; c(c_foreign_type)
; java(java_foreign_type)
.
:- type il_foreign_type
@@ -365,6 +366,11 @@
string % The C type name
).
:- type java_foreign_type
---> java(
string % The Java type name
).
:- type ref_or_val
---> reference
; value.