Peter Wang
573e6f2f00
Support unboxed float fields in high-level C grades.
...
Branches: main
Support unboxed float fields in high-level C grades.
When the representation of `float' is no wider than a machine word, d.u.
functor arguments of type `float' (or equivalent) will be stored directly
within cells constructed for that functor, instead of a pointer to the box
containing the value. This was already so for low-level C grades.
compiler/mlds.m:
Add an option to mlds_type, equivalent to
`mlds_array_type(mlds_generic_type)' except that some elements are
known to be floats.
Update some comments.
compiler/ml_global_data.m:
Remember the `--unboxed-float' option in `ml_global_data'.
Special case generic arrays in `ml_gen_static_scalar_const_addr' and
`ml_gen_static_scalar_const_value'. Float literals cannot be used to
initialize an element of a generic array in C. If any appear, replace
the generic array type by an instance of
`mlds_mostly_generic_array_type' with float fields in the positions
which have float initializers.
compiler/ml_code_util.m:
Make `ml_must_box_field_type' and `ml_gen_box_const_rval' depend on the
`--unboxed-float' option.
Delete some now-misleading comments.
Delete an unused predicate.
compiler/mlds_to_c.m:
Update code that writes out scalar static data to handle
`mlds_mostly_generic_array_type'.
In one case, for `--high-level-data' only, output float constants by
their integer representation, so that they may be cast to pointer
types.
compiler/ml_unify_gen.m:
Rename some predicates for clarity.
compiler/ml_accurate_gc.m:
compiler/ml_lookup_switch.m:
compiler/ml_proc_gen.m:
compiler/ml_simplify_switch.m:
compiler/mlds_to_cs.m:
compiler/mlds_to_gcc.m:
compiler/mlds_to_il.m:
compiler/mlds_to_java.m:
Conform to changes.
library/float.m:
Add hidden functions to return the integer representation of the bit
layout of floating point values.
library/exception.m:
Delete mention of MR_AVOID_MACROS.
runtime/mercury.c:
runtime/mercury.h:
Make MR_box_float/MR_unbox_float act like "casts" when MR_BOXED_FLOAT
is undefined, and only define them in high-level grades. I think they
should be replaced by MR_float_to_word/MR_word_to_float (which have
less confusing names when there is no boxing) but that would require
some header file reshuffling which I don't want to undertake yet.
Delete references to MR_AVOID_MACROS. Apparently it existed to support
the defunct gcc back-end but I cannot see it ever being defined.
runtime/mercury_conf_param.h:
MR_HIGHLEVEL_CODE no longer implies MR_BOXED_FLOAT.
Delete mention of MR_AVOID_MACROS.
runtime/mercury_float.h:
Fix a comment.
tests/hard_coded/Mmakefile:
tests/hard_coded/float_ground_term.exp:
tests/hard_coded/float_ground_term.m:
Add a test case.
2011-08-22 07:56:10 +00:00
..
2010-04-15 02:56:02 +00:00
2009-10-21 06:34:32 +00:00
2010-09-30 07:23:36 +00:00
2010-09-10 05:15:05 +00:00
2007-10-19 05:18:28 +00:00
2007-11-14 03:45:14 +00:00
2007-11-14 03:45:14 +00:00
2011-05-24 07:35:29 +00:00
2011-05-24 07:35:29 +00:00
2010-07-20 07:38:46 +00:00
2011-05-06 15:19:34 +00:00
2007-02-27 02:12:37 +00:00
2007-02-27 02:12:37 +00:00
2008-03-09 09:39:25 +00:00
2008-03-09 09:39:25 +00:00
2008-07-30 02:57:55 +00:00
2008-07-30 02:57:55 +00:00
2008-04-21 05:15:31 +00:00
2008-04-21 05:15:31 +00:00
2008-04-23 05:16:50 +00:00
2008-04-23 05:16:50 +00:00
2008-04-21 05:15:31 +00:00
2008-04-21 05:15:31 +00:00
2008-04-21 05:15:31 +00:00
2008-04-21 05:15:31 +00:00
2007-03-12 02:19:31 +00:00
2007-03-12 02:19:31 +00:00
2007-08-29 02:53:13 +00:00
2011-08-10 05:11:57 +00:00
2011-05-05 03:59:00 +00:00
2007-05-30 02:47:10 +00:00
2007-05-31 02:23:06 +00:00
2011-03-07 03:59:43 +00:00
2010-03-02 00:32:37 +00:00
2010-03-02 00:32:37 +00:00
2007-05-30 02:47:10 +00:00
2007-05-30 02:47:10 +00:00
2007-05-30 02:47:10 +00:00
2007-02-13 01:59:04 +00:00
2011-05-19 13:11:47 +00:00
2011-03-08 07:37:45 +00:00
2011-03-08 07:37:45 +00:00
2010-09-10 04:02:30 +00:00
2010-09-10 04:02:30 +00:00
2009-02-04 23:10:50 +00:00
2009-02-04 23:10:50 +00:00
2010-08-19 06:33:42 +00:00
2010-08-19 06:33:42 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2007-01-15 02:50:58 +00:00
2007-01-15 02:50:58 +00:00
2007-02-15 00:41:59 +00:00
2011-06-15 03:35:47 +00:00
2011-06-15 03:35:47 +00:00
2011-08-17 03:28:17 +00:00
2011-08-17 03:28:17 +00:00
2007-02-15 00:41:59 +00:00
2010-09-10 05:15:05 +00:00
2011-05-03 14:22:15 +00:00
2010-09-22 04:11:34 +00:00
2010-09-30 03:16:23 +00:00
2010-09-30 03:16:23 +00:00
2007-01-05 02:19:46 +00:00
2011-06-16 06:42:19 +00:00
2011-06-16 06:42:19 +00:00
2009-06-29 06:21:49 +00:00
2011-04-04 07:10:42 +00:00
2010-09-10 05:15:05 +00:00
2010-09-10 05:15:05 +00:00
2009-05-07 07:42:16 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2011-05-05 03:59:00 +00:00
2007-02-15 00:41:59 +00:00
2010-07-16 07:19:12 +00:00
2010-09-23 05:32:01 +00:00
2011-05-25 02:02:53 +00:00
2007-06-25 00:58:14 +00:00
2007-06-25 00:58:14 +00:00
2007-06-25 00:58:14 +00:00
2007-06-25 00:58:14 +00:00
2007-02-15 00:41:59 +00:00
2009-10-02 03:55:36 +00:00
2009-10-02 03:55:36 +00:00
2007-09-21 03:21:36 +00:00
2007-10-01 05:40:43 +00:00
2007-10-01 05:40:43 +00:00
2010-03-04 00:39:48 +00:00
2010-02-09 03:39:39 +00:00
2011-06-16 06:42:19 +00:00
2011-06-16 06:42:19 +00:00
2011-06-16 06:42:19 +00:00
2011-06-16 06:42:19 +00:00
2011-06-16 06:42:19 +00:00
2011-06-16 06:42:19 +00:00
2011-06-16 06:42:19 +00:00
2011-06-16 06:42:19 +00:00
2011-06-16 06:42:19 +00:00
2011-06-16 06:42:19 +00:00
2011-06-16 06:42:19 +00:00
2011-07-25 03:32:07 +00:00
2011-07-25 03:32:07 +00:00
2008-08-27 03:58:44 +00:00
2008-08-27 03:58:44 +00:00
2008-08-27 03:58:44 +00:00
2009-08-14 03:21:55 +00:00
2007-07-25 06:12:32 +00:00
2010-09-23 05:32:01 +00:00
2007-07-25 06:12:32 +00:00
2010-09-23 05:32:01 +00:00
2009-09-29 02:10:25 +00:00
2009-09-29 02:10:25 +00:00
2010-09-23 05:32:01 +00:00
2007-06-06 06:46:39 +00:00
2007-06-06 06:46:39 +00:00
2007-02-15 00:41:59 +00:00
2007-08-24 07:56:27 +00:00
2007-08-24 07:56:27 +00:00
2010-07-16 07:19:12 +00:00
2011-03-27 23:07:28 +00:00
2010-09-23 05:32:01 +00:00
2011-05-25 02:02:53 +00:00
2010-09-23 05:32:01 +00:00
2007-08-20 03:39:31 +00:00
2010-09-23 05:32:01 +00:00
2010-09-23 05:32:01 +00:00
2008-12-03 05:06:07 +00:00
2007-02-22 11:39:27 +00:00
2007-02-11 03:28:04 +00:00
2008-09-22 01:23:54 +00:00
2008-09-22 01:23:54 +00:00
2009-09-02 00:30:35 +00:00
2009-09-02 00:30:35 +00:00
2011-08-22 07:56:10 +00:00
2011-08-22 07:56:10 +00:00
2007-02-15 00:41:59 +00:00
2010-09-23 05:32:01 +00:00
2011-05-03 04:35:04 +00:00
2010-07-16 07:19:12 +00:00
2010-09-23 05:32:01 +00:00
2007-02-15 00:41:59 +00:00
2008-03-26 11:02:16 +00:00
2008-03-26 11:02:16 +00:00
2008-03-26 11:02:16 +00:00
2008-03-26 11:02:16 +00:00
2007-08-20 03:39:31 +00:00
2010-09-30 07:23:36 +00:00
2007-08-20 03:39:31 +00:00
2007-08-20 03:39:31 +00:00
2007-08-20 03:39:31 +00:00
2007-08-20 03:39:31 +00:00
2007-08-20 03:39:31 +00:00
2007-09-07 09:56:05 +00:00
2007-09-07 09:56:05 +00:00
2010-09-23 05:32:01 +00:00
2009-08-14 03:21:55 +00:00
2010-09-23 05:32:01 +00:00
2007-07-14 02:33:27 +00:00
2010-09-23 05:32:01 +00:00
2010-09-23 05:32:01 +00:00
2010-09-23 05:32:01 +00:00
2010-09-10 05:15:05 +00:00
2009-09-25 03:55:07 +00:00
2009-09-25 03:55:07 +00:00
2009-03-26 06:32:19 +00:00
2009-03-26 06:32:19 +00:00
2009-03-26 06:32:19 +00:00
2009-03-26 06:32:19 +00:00
2009-03-26 06:32:19 +00:00
2011-08-10 05:11:57 +00:00
2011-05-03 04:35:04 +00:00
2011-05-03 04:35:04 +00:00
2009-08-14 03:21:55 +00:00
2009-08-14 03:21:55 +00:00
2011-03-07 03:59:43 +00:00
2011-03-07 03:59:43 +00:00
2008-04-03 05:26:48 +00:00
2008-04-03 05:26:48 +00:00
2008-04-03 05:26:48 +00:00
2008-04-04 04:57:00 +00:00
2008-04-03 05:26:48 +00:00
2010-02-05 06:13:13 +00:00
2010-02-05 06:13:13 +00:00
2009-08-14 03:21:55 +00:00
2010-09-23 05:32:01 +00:00
2009-08-14 03:21:55 +00:00
2007-02-22 05:56:45 +00:00
2007-02-08 01:08:11 +00:00
2010-11-01 04:03:06 +00:00
2010-11-01 04:03:06 +00:00
2009-08-14 03:21:55 +00:00
2009-08-14 03:21:55 +00:00
2010-09-23 05:32:01 +00:00
2007-02-11 04:05:45 +00:00
2009-06-26 01:12:00 +00:00
2009-06-26 01:12:00 +00:00
2010-05-07 03:12:27 +00:00
2011-03-10 05:45:35 +00:00
2011-03-10 05:45:35 +00:00
2011-03-10 05:45:35 +00:00
2011-03-10 05:45:35 +00:00
2008-10-07 05:27:44 +00:00
2008-10-07 05:27:44 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2010-11-01 04:03:06 +00:00
2010-11-01 04:03:06 +00:00
2009-10-02 03:55:36 +00:00
2009-10-02 03:55:36 +00:00
2010-11-30 04:06:59 +00:00
2010-11-30 04:06:59 +00:00
2009-09-21 04:09:06 +00:00
2009-09-21 04:09:06 +00:00
2009-09-21 04:09:06 +00:00
2009-09-21 04:09:06 +00:00
2009-09-21 04:09:06 +00:00
2009-09-21 04:09:06 +00:00
2010-10-13 02:42:03 +00:00
2009-10-23 05:17:55 +00:00
2009-10-23 05:17:55 +00:00
2010-04-21 04:50:28 +00:00
2010-04-21 04:50:28 +00:00
2010-10-13 02:42:03 +00:00
2011-05-06 15:19:34 +00:00
2007-07-30 06:03:08 +00:00
2007-07-30 06:03:08 +00:00
2006-09-16 10:46:41 +00:00
2006-09-16 10:46:41 +00:00
2011-07-05 03:34:39 +00:00
2009-02-19 03:49:20 +00:00
2011-08-22 07:56:10 +00:00
2010-09-10 05:15:05 +00:00
2009-08-25 23:47:00 +00:00
2009-08-25 23:47:00 +00:00
2008-08-29 05:33:51 +00:00
2008-08-29 05:33:51 +00:00
2008-08-29 05:33:51 +00:00
2011-07-12 07:11:06 +00:00
2011-07-12 07:11:06 +00:00
2008-04-28 00:50:56 +00:00
2008-04-28 00:50:56 +00:00
2010-09-23 05:32:01 +00:00
2007-01-15 02:24:28 +00:00
2007-01-15 02:24:28 +00:00
2007-02-22 11:39:27 +00:00
2007-02-11 03:28:04 +00:00
2007-02-11 03:28:04 +00:00
2007-02-11 03:28:04 +00:00
2007-06-06 01:48:15 +00:00
2010-09-10 05:15:05 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2007-09-04 03:12:21 +00:00
2007-09-04 03:12:21 +00:00
2007-03-18 23:35:04 +00:00
2007-03-19 23:00:23 +00:00
2007-03-18 23:35:04 +00:00
2006-11-14 21:36:27 +00:00
2006-11-14 21:36:27 +00:00
2009-09-03 23:57:51 +00:00
2009-09-03 23:57:51 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2011-05-19 13:11:47 +00:00
2010-09-23 05:32:01 +00:00
2010-09-23 05:32:01 +00:00
2011-05-20 16:54:30 +00:00
2011-05-20 16:54:30 +00:00
2007-02-15 00:41:59 +00:00
2006-10-09 06:40:29 +00:00
2006-10-09 06:40:29 +00:00
2007-04-13 04:56:46 +00:00
2007-04-13 04:56:46 +00:00
2007-01-15 02:24:28 +00:00
2007-01-15 02:24:28 +00:00
2010-09-23 05:32:01 +00:00
2007-06-22 04:42:23 +00:00
2010-12-29 04:52:23 +00:00
2010-12-29 04:52:23 +00:00
2011-05-03 04:31:19 +00:00
2011-05-03 04:31:19 +00:00
2011-05-06 15:19:34 +00:00
2008-06-16 04:52:32 +00:00
2008-06-17 03:57:08 +00:00
2008-06-16 04:52:32 +00:00
2009-08-14 03:21:55 +00:00
2006-10-04 23:59:46 +00:00
2006-10-04 23:59:46 +00:00
2007-06-25 00:47:35 +00:00
2007-06-22 04:42:23 +00:00
2007-06-22 04:42:23 +00:00
2007-12-30 04:09:26 +00:00
2007-12-30 04:09:26 +00:00
2008-05-22 04:11:30 +00:00
2008-05-22 04:11:30 +00:00
2009-07-02 05:31:08 +00:00
2009-07-02 05:31:08 +00:00
2007-10-31 03:58:33 +00:00
2008-02-01 05:45:30 +00:00
2008-02-01 05:45:30 +00:00
2011-04-04 07:10:42 +00:00
2008-01-16 08:34:54 +00:00
2008-01-16 08:34:54 +00:00
2011-07-05 03:34:39 +00:00
2011-07-05 03:34:39 +00:00
2006-11-09 00:47:27 +00:00
2006-12-21 11:11:37 +00:00
2006-11-09 00:47:27 +00:00
2006-11-09 00:47:27 +00:00
2006-11-09 00:47:27 +00:00
2009-08-26 03:51:10 +00:00
2009-08-26 03:51:10 +00:00
2009-08-26 03:51:10 +00:00
2009-08-26 03:51:10 +00:00
2009-08-26 03:51:10 +00:00
2006-10-26 07:56:11 +00:00
2006-10-26 07:56:11 +00:00
2006-10-26 07:56:11 +00:00
2007-11-19 05:45:01 +00:00
2011-05-03 04:35:04 +00:00
2009-06-29 06:21:49 +00:00
2009-06-29 06:21:49 +00:00
2009-06-29 06:21:49 +00:00
2009-06-29 06:21:49 +00:00
2009-06-29 06:21:49 +00:00
2009-06-29 06:21:49 +00:00
2007-04-20 05:18:40 +00:00
2007-04-20 05:18:40 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2011-06-15 01:05:34 +00:00
2011-06-15 01:05:34 +00:00
2011-06-15 01:05:34 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2011-08-02 00:05:44 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2009-06-29 06:21:49 +00:00
2009-06-29 06:21:49 +00:00
2007-06-06 02:09:45 +00:00
2007-06-06 02:09:45 +00:00
2007-02-15 00:41:59 +00:00
2011-04-04 07:10:42 +00:00
2010-09-23 05:32:01 +00:00
2011-04-04 07:10:42 +00:00
2009-06-29 06:21:49 +00:00
2011-04-04 07:10:42 +00:00
2009-06-29 06:21:49 +00:00
2011-06-15 01:05:34 +00:00
2010-11-01 04:03:06 +00:00
2010-11-01 04:03:06 +00:00
2010-11-01 04:03:06 +00:00
2010-11-01 04:03:06 +00:00
2010-11-01 04:03:06 +00:00
2010-11-01 04:03:06 +00:00
2007-02-02 05:39:58 +00:00
2007-02-02 05:39:58 +00:00
2007-06-01 12:54:15 +00:00
2007-06-01 12:54:15 +00:00
2009-01-02 03:12:09 +00:00
2009-01-02 03:12:09 +00:00
2010-08-20 02:38:21 +00:00
2006-12-21 11:11:37 +00:00
2011-05-20 16:54:30 +00:00
2011-05-20 16:54:30 +00:00
2011-05-17 05:37:30 +00:00
2011-05-17 05:37:30 +00:00
2007-10-24 00:50:01 +00:00
2007-10-24 00:50:01 +00:00
2011-08-10 05:11:57 +00:00
2011-08-10 05:11:57 +00:00
2007-10-24 00:50:01 +00:00
2007-10-24 00:50:01 +00:00
2008-03-19 05:30:01 +00:00
2008-03-19 05:30:01 +00:00
2008-03-19 05:30:01 +00:00
2006-11-06 07:56:21 +00:00
2006-11-06 07:56:21 +00:00
2010-07-26 05:05:48 +00:00
2011-03-27 23:07:28 +00:00
2007-02-22 03:50:38 +00:00
2007-02-22 03:50:38 +00:00
2011-05-18 15:40:35 +00:00
2011-08-04 02:01:39 +00:00
2011-08-04 02:01:39 +00:00
2011-08-10 05:11:57 +00:00
2009-03-10 05:00:34 +00:00
2009-03-10 05:00:34 +00:00
2009-03-10 05:00:34 +00:00
2009-03-10 05:00:34 +00:00
2009-03-10 05:00:34 +00:00
2009-03-10 05:00:34 +00:00
2009-03-10 05:00:34 +00:00
2009-03-10 05:00:34 +00:00
2009-03-10 05:00:34 +00:00
2009-03-10 05:00:34 +00:00
2009-03-10 05:00:34 +00:00
2011-03-07 03:59:43 +00:00
2009-03-10 05:00:34 +00:00
2009-03-10 05:00:34 +00:00
2011-05-03 04:35:04 +00:00
2009-09-22 07:34:20 +00:00
2009-09-22 07:34:20 +00:00
2011-05-05 03:59:00 +00:00
2006-10-01 04:57:41 +00:00
2011-05-03 05:12:05 +00:00
2011-05-23 14:36:11 +00:00
2011-05-23 14:36:11 +00:00
2008-02-27 09:46:08 +00:00
2010-09-23 05:32:01 +00:00
2008-05-19 01:03:46 +00:00
2008-05-19 01:03:46 +00:00
2008-05-19 01:03:46 +00:00
2008-05-19 01:03:46 +00:00
2008-05-22 09:06:23 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2010-12-07 03:09:14 +00:00
2010-12-07 03:09:14 +00:00
2007-02-15 00:41:59 +00:00
2009-09-25 03:55:07 +00:00
2009-09-25 03:55:07 +00:00
2010-09-23 05:32:01 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2009-05-25 02:29:20 +00:00
2009-05-25 02:29:20 +00:00
2007-05-30 02:42:46 +00:00
2007-05-30 02:42:46 +00:00
2009-03-26 06:32:19 +00:00
2009-03-26 06:32:19 +00:00
2009-03-26 06:32:19 +00:00
2011-08-10 05:11:57 +00:00
2008-07-11 06:01:50 +00:00
2009-03-26 06:32:19 +00:00
2011-04-04 07:10:42 +00:00
2011-04-04 07:10:42 +00:00
2010-07-16 07:19:12 +00:00
2011-05-25 02:02:53 +00:00
2010-07-16 07:19:12 +00:00
2011-03-27 23:07:28 +00:00
2010-07-26 03:31:11 +00:00
2011-05-25 02:02:53 +00:00
2010-07-16 07:19:12 +00:00
2010-07-26 03:31:11 +00:00
2011-05-03 04:35:04 +00:00
2011-05-20 16:54:30 +00:00
2011-03-27 23:07:28 +00:00
2011-03-27 23:07:28 +00:00
2011-05-25 02:02:53 +00:00
2006-10-30 07:20:57 +00:00
2011-07-13 00:41:22 +00:00
2011-07-13 00:41:22 +00:00