[m-rev.] diff: fix bug with '--target java' option

Julien Fischer juliensf at students.cs.mu.oz.au
Fri Nov 30 04:25:11 AEDT 2001


I just had a look at the Java backend and realised
that while '--grade java' is working, '--target java',
'--java' are not.

Estimated hours taken: 0.1
Branches: main

Fix '--target java' option so that it uses highlevel_data
and the Java backend generates classes for enumerations and
discriminated unions when the compiler is invoked with this
option.

compiler/handle_options.m:
	When compiling to java make sure highlevel_data is used.

Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.123
diff -u -r1.123 handle_options.m
--- compiler/handle_options.m	11 Nov 2001 10:10:16 -0000	1.123
+++ compiler/handle_options.m	29 Nov 2001 16:40:48 -0000
@@ -314,6 +314,7 @@
 	% XXX The Java backend should eventually support optimizing tailcalls.
 	( { Target = java } ->
 		globals__io_set_option(highlevel_code, bool(yes)),
+		globals__io_set_option(highlevel_data, bool(yes)),	
 		globals__io_set_option(gcc_nested_functions, bool(no)),
 		globals__io_set_option(nondet_copy_out, bool(yes)),
 		globals__io_set_option(det_copy_out, bool(yes)),

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list