[m-rev.] for review: Box no-tag types in the Java back-end
Michael Wybrow
mjwybrow at cs.mu.OZ.AU
Mon Jan 13 14:12:41 AEDT 2003
Estimated hours taken: 2
Branches: main
Make no-tag types get boxed by the Java back-end.
mercury/compiler/handle_options.m:
For compilation to Java, set the `unboxed_no_tag_types' option
to `no'.
Index: handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.161
diff -u -r1.161 handle_options.m
--- handle_options.m 20 Dec 2002 09:46:18 -0000 1.161
+++ handle_options.m 13 Jan 2003 03:09:29 -0000
@@ -411,6 +411,11 @@
% - using no tags
% Because Java doesn't provide any mechanism for tagging
% pointers.
+ % - box no-tag types
+ % We require no-tag types to be boxed since in Java there
+ % are some types (such as java.lang.String) that can't be
+ % cast to another type and then successfully cast back to
+ % their original type.
% - store nondet environments on the heap
% Because Java has no way of allocating structs on the stack.
% - no static ground terms
@@ -434,6 +439,7 @@
globals__io_set_option(nondet_copy_out, bool(yes)),
globals__io_set_option(det_copy_out, bool(yes)),
globals__io_set_option(num_tag_bits, int(0)),
+ globals__io_set_option(unboxed_no_tag_types, bool(no)),
globals__io_set_option(static_ground_terms, bool(no)),
globals__io_set_option(put_nondet_env_on_heap, 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