Zoltan Somogyi
c3b1c2003e
Support constant "mutables". Though this sounds like a contradiction in terms,
...
Estimated hours taken: 3
Branches: main
Support constant "mutables". Though this sounds like a contradiction in terms,
they can be useful, because in some cases they are the best alternative.
- For some types, e.g. arrays, there is no way to write manifest constants.
- For some other types, one can write manifest constants, but the compiler
may be too slow in compiling clauses containing them if the constant is
very large (even after my recent improvements).
- Using a tabled zero-arity function incurs overhead on every access to check
whether the result was recorded previously or not. This is a bad idea e.g.
in the inner loop of a scanner (which may want to use an array for the
representation of the DFA).
compiler/prog_item.m:
Add a new attribute to say whether the mutable is constant or not.
compiler/prog_io.m:
Recognize the "constant" mutable attribute.
compiler/prog_mutable.m:
Provide predicates to construct the signatures of the get and set
predicates of constant mutables. Rename some existing predicates
to better reflect their purpose.
compiler/make_hlds_passes.m:
compiler/modules.m:
Modify the code for creating mutables' get, set and init predicates
to do the right thing for constant mutables.
doc/reference_manual.texi:
Document the new attribute.
tests/hard_coded/pure_mutable.{m,exp}:
Test the new attribute.
2006-04-27 07:34:37 +00:00
..
2006-04-04 02:39:23 +00:00
2005-03-24 05:34:41 +00:00
2006-03-22 02:56:44 +00:00
2006-04-04 02:39:23 +00:00
2004-03-24 00:39:36 +00:00
2004-03-24 00:39:36 +00:00
2004-03-24 00:39:36 +00:00
2006-03-29 08:09:58 +00:00
2003-02-21 01:57:38 +00:00
2006-03-29 08:09:58 +00:00
2003-06-02 04:56:31 +00:00
2005-12-14 05:14:17 +00:00
2005-03-10 02:36:04 +00:00
2005-03-10 02:36:04 +00:00
2005-09-02 09:27:34 +00:00
2004-01-07 05:47:46 +00:00
2004-01-08 04:49:47 +00:00
2006-03-29 08:09:58 +00:00
2006-03-29 08:09:58 +00:00
2005-03-07 04:01:32 +00:00
2005-03-07 04:01:32 +00:00
2006-03-29 08:09:58 +00:00
2003-05-26 09:01:46 +00:00
2003-05-07 06:42:44 +00:00
2003-05-07 06:42:44 +00:00
2003-03-03 03:25:14 +00:00
2003-03-04 05:18:00 +00:00
2003-03-03 03:25:14 +00:00
2005-09-12 09:22:52 +00:00
2004-04-08 03:51:46 +00:00
2006-04-05 05:06:58 +00:00
2004-07-26 03:19:28 +00:00
2004-07-26 03:19:28 +00:00
2004-07-14 05:39:14 +00:00
2006-03-29 08:09:58 +00:00
2006-03-29 08:09:58 +00:00
2004-02-10 13:13:11 +00:00
2004-02-10 13:13:11 +00:00
2004-02-19 07:17:31 +00:00
2006-03-24 04:40:59 +00:00
2006-03-29 08:09:58 +00:00
2004-02-16 02:28:09 +00:00
2004-02-16 02:28:09 +00:00
2004-12-14 01:07:32 +00:00
2006-03-29 08:09:58 +00:00
2004-12-14 01:07:32 +00:00
2006-03-29 08:09:58 +00:00
2003-07-28 21:50:45 +00:00
2004-08-25 08:21:34 +00:00
2003-07-28 21:50:45 +00:00
2004-11-06 05:28:10 +00:00
2006-03-22 02:56:44 +00:00
2006-03-29 08:09:58 +00:00
2006-03-29 08:09:58 +00:00
2003-12-05 05:15:14 +00:00
2003-12-05 05:15:14 +00:00
2004-08-25 08:21:34 +00:00
2003-05-26 09:01:46 +00:00
2004-08-25 08:21:34 +00:00
2003-05-26 09:01:46 +00:00
2006-04-04 02:39:23 +00:00
2006-04-26 03:06:29 +00:00
2006-03-29 08:09:58 +00:00
2006-03-22 02:56:44 +00:00
2006-03-29 08:09:58 +00:00
2006-04-05 05:06:58 +00:00
2006-03-29 08:09:58 +00:00
2006-03-29 08:09:58 +00:00
2006-03-30 02:46:08 +00:00
2006-03-30 02:46:08 +00:00
2006-03-30 02:46:08 +00:00
2006-03-30 02:46:08 +00:00
2006-04-26 03:06:29 +00:00
2006-04-26 03:06:29 +00:00
2006-03-29 08:09:58 +00:00
2003-07-28 15:50:45 +00:00
2003-07-28 15:50:45 +00:00
2003-07-28 15:50:45 +00:00
2006-03-29 08:09:58 +00:00
2006-04-07 01:32:58 +00:00
2006-04-07 01:32:58 +00:00
2005-09-07 08:30:02 +00:00
2005-09-07 08:30:02 +00:00
2003-01-17 05:57:20 +00:00
2003-01-17 05:57:20 +00:00
2003-12-17 05:32:16 +00:00
2006-03-29 08:09:58 +00:00
2005-11-19 07:43:49 +00:00
2005-11-19 07:43:49 +00:00
2006-03-29 08:09:58 +00:00
2003-12-01 22:31:36 +00:00
2003-12-01 22:31:36 +00:00
2006-03-29 08:09:58 +00:00
2003-01-17 05:57:20 +00:00
2006-03-22 02:56:44 +00:00
2006-03-29 08:09:58 +00:00
2006-03-29 08:09:58 +00:00
2006-03-29 08:09:58 +00:00
2006-03-29 08:09:58 +00:00
2003-01-17 05:57:20 +00:00
2006-03-29 08:09:58 +00:00
2003-12-01 15:56:15 +00:00
2004-01-01 05:57:13 +00:00
2003-12-03 16:12:10 +00:00
2003-12-03 16:12:10 +00:00
2006-03-29 08:09:58 +00:00
2003-07-22 06:27:26 +00:00
2003-07-22 06:27:26 +00:00
2003-07-22 06:27:26 +00:00
2003-05-26 09:01:46 +00:00
2003-01-16 02:34:35 +00:00
2003-01-16 02:34:35 +00:00
2005-09-29 06:33:17 +00:00
2005-10-04 07:20:24 +00:00
2003-06-12 04:06:01 +00:00
2006-02-24 01:42:19 +00:00
2006-02-24 01:42:19 +00:00
2002-12-23 12:34:20 +00:00
2002-12-24 12:27:29 +00:00
2002-12-23 12:34:20 +00:00
2005-09-28 09:02:17 +00:00
2005-09-28 09:02:17 +00:00
2003-01-17 05:57:20 +00:00
2006-03-22 02:56:44 +00:00
2004-05-12 14:24:35 +00:00
2004-05-12 14:24:35 +00:00
2003-06-25 14:03:23 +00:00
2003-07-02 06:40:53 +00:00
2006-03-29 08:09:58 +00:00
2004-08-25 08:21:34 +00:00
2005-09-12 09:22:52 +00:00
2004-08-25 08:21:34 +00:00
2003-03-20 06:25:54 +00:00
2003-03-20 06:25:54 +00:00
2003-03-13 01:10:02 +00:00
2003-03-13 01:10:02 +00:00
2003-01-17 05:57:20 +00:00
2006-03-22 02:56:44 +00:00
2004-08-25 08:21:34 +00:00
2006-03-29 08:09:58 +00:00
2006-03-29 08:09:58 +00:00
2006-04-05 05:06:58 +00:00
2006-03-29 08:09:58 +00:00
2004-08-25 08:21:34 +00:00
2005-04-26 07:38:03 +00:00
2005-04-26 07:38:03 +00:00
2005-04-26 07:38:03 +00:00
2005-04-26 07:38:03 +00:00
2005-10-04 07:20:24 +00:00
2005-10-04 07:20:24 +00:00
2005-08-31 12:40:18 +00:00
2005-10-04 07:20:24 +00:00
2006-03-29 08:09:58 +00:00
2004-04-10 13:05:59 +00:00
2006-04-05 05:06:58 +00:00
2004-11-11 06:41:52 +00:00
2005-11-03 07:03:16 +00:00
2005-11-03 07:03:16 +00:00
2005-11-03 07:03:16 +00:00
2006-01-04 07:14:35 +00:00
2006-01-04 07:14:35 +00:00
2006-01-04 07:14:35 +00:00
2003-12-05 05:15:14 +00:00
2003-12-05 05:15:14 +00:00
2004-12-20 05:26:05 +00:00
2004-12-20 05:26:05 +00:00
2003-02-18 03:38:19 +00:00
2004-02-09 08:32:59 +00:00
2004-02-10 09:33:06 +00:00
2003-02-18 03:38:19 +00:00
2004-02-10 09:33:06 +00:00
2003-02-18 03:38:19 +00:00
2004-02-09 08:32:59 +00:00
2004-02-09 08:32:59 +00:00
2004-02-09 08:32:59 +00:00
2004-02-09 08:32:59 +00:00
2006-03-29 08:09:58 +00:00
2006-04-20 04:05:26 +00:00
2005-09-12 09:22:52 +00:00
2006-04-26 03:06:29 +00:00
2005-05-23 03:15:49 +00:00
2006-03-29 08:09:58 +00:00
2003-06-25 17:21:27 +00:00
2005-09-05 02:29:59 +00:00
2005-09-05 02:29:59 +00:00
2006-04-05 02:12:58 +00:00
2003-01-17 05:57:20 +00:00
2003-01-18 17:08:40 +00:00
2003-01-30 05:59:30 +00:00
2003-01-30 05:59:30 +00:00
2004-11-05 03:09:35 +00:00
2004-11-05 03:09:35 +00:00
2004-11-05 03:09:35 +00:00
2006-03-29 08:09:58 +00:00
2003-05-26 09:01:46 +00:00
2006-04-04 02:39:23 +00:00
2006-03-22 02:56:44 +00:00
2006-03-21 22:25:39 +00:00
2006-03-30 00:42:01 +00:00
2004-12-02 07:51:28 +00:00
2005-10-06 08:26:12 +00:00
2003-02-07 03:55:37 +00:00
2006-04-05 02:12:58 +00:00
2005-09-12 09:22:52 +00:00
2004-04-01 04:51:21 +00:00
2005-09-12 09:22:52 +00:00
2006-04-05 02:12:58 +00:00
2006-04-20 04:05:26 +00:00
2006-04-20 04:05:26 +00:00
2006-04-20 04:05:26 +00:00
2006-04-20 04:05:26 +00:00
2005-04-14 06:51:03 +00:00
2005-04-14 06:51:03 +00:00
2006-03-08 02:25:43 +00:00
2006-04-04 02:39:23 +00:00
2005-03-24 05:34:41 +00:00
2005-03-24 05:34:41 +00:00
2006-04-27 07:34:37 +00:00
2006-04-27 07:34:37 +00:00
2004-12-02 08:03:57 +00:00
2004-12-08 08:05:50 +00:00
2005-09-12 09:22:52 +00:00
2005-09-12 09:02:30 +00:00
2004-07-07 07:11:22 +00:00
2005-09-12 09:02:30 +00:00
2005-09-12 13:00:15 +00:00
2005-09-12 13:00:15 +00:00
2004-08-25 08:21:34 +00:00
2004-08-25 08:21:34 +00:00
2005-01-15 11:41:40 +00:00
2003-12-22 22:59:42 +00:00
2003-12-22 22:59:42 +00:00
2003-12-22 22:59:42 +00:00
2005-01-21 03:32:20 +00:00
2006-03-29 08:09:58 +00:00
2004-08-25 08:21:34 +00:00
2006-03-29 08:09:58 +00:00
2006-04-05 07:07:46 +00:00
2006-04-05 07:07:46 +00:00
2005-10-26 03:04:25 +00:00
2005-11-08 06:42:03 +00:00
2005-03-15 02:51:26 +00:00
2005-03-15 02:51:26 +00:00
2005-03-18 01:18:17 +00:00
2005-03-18 01:18:17 +00:00
2005-03-18 01:18:17 +00:00
2005-03-18 01:18:17 +00:00
2006-04-04 02:39:23 +00:00
2004-06-28 04:50:10 +00:00
2004-06-28 04:50:10 +00:00
2006-03-29 08:09:58 +00:00
2004-03-19 10:13:14 +00:00
2005-08-04 04:45:19 +00:00
2006-03-29 08:09:58 +00:00
2003-10-26 12:43:34 +00:00
2003-10-26 12:43:34 +00:00
2006-03-29 08:09:58 +00:00
2003-07-16 06:54:34 +00:00
2003-07-16 06:54:34 +00:00
2005-09-28 09:32:03 +00:00
2005-09-02 05:00:29 +00:00
2005-09-28 09:32:03 +00:00
2004-01-14 05:08:36 +00:00
2004-01-14 05:08:36 +00:00
2004-01-14 05:08:36 +00:00
2006-03-07 01:03:46 +00:00
2006-03-07 01:03:46 +00:00
2006-03-07 01:03:46 +00:00
2006-03-29 08:09:58 +00:00
2003-01-23 04:25:47 +00:00
2004-03-19 09:06:56 +00:00
2003-02-18 06:27:32 +00:00
2006-04-04 02:39:23 +00:00
2005-09-12 09:02:30 +00:00
2006-03-07 22:23:58 +00:00
2006-03-29 08:09:58 +00:00
2005-04-26 07:38:03 +00:00
2005-04-26 07:38:03 +00:00
2004-08-25 08:21:34 +00:00
2004-08-25 08:21:34 +00:00
2004-08-25 08:21:34 +00:00
2006-03-29 08:09:58 +00:00
2003-07-22 07:04:26 +00:00
2003-07-22 07:04:26 +00:00
2003-07-22 07:04:26 +00:00
2003-07-22 07:04:26 +00:00
2005-01-13 11:04:38 +00:00
2005-01-13 11:04:38 +00:00
2003-07-22 07:04:26 +00:00
2003-07-22 07:04:26 +00:00
2003-07-22 07:04:26 +00:00
2003-07-22 07:04:26 +00:00
2005-08-31 03:08:11 +00:00
2005-08-31 03:08:11 +00:00
2006-04-04 02:39:23 +00:00
2003-01-17 05:57:20 +00:00
2006-03-22 02:56:44 +00:00
2005-09-09 07:00:57 +00:00
2005-09-09 07:00:57 +00:00
2003-01-17 05:57:20 +00:00
2006-03-22 02:56:44 +00:00
2003-02-17 03:36:45 +00:00
2003-02-17 03:36:45 +00:00
2006-03-29 08:09:58 +00:00
2005-09-28 09:02:17 +00:00
2005-09-28 09:02:17 +00:00
2003-02-12 22:58:20 +00:00
2003-10-26 12:43:34 +00:00
2003-01-17 05:57:20 +00:00
2004-10-08 07:01:29 +00:00
2004-10-08 07:01:29 +00:00
2004-01-22 04:35:13 +00:00
2005-09-12 09:02:30 +00:00
2006-03-29 08:09:58 +00:00
2006-03-29 08:09:58 +00:00
2004-12-15 04:40:24 +00:00
2004-12-15 04:40:24 +00:00
2006-03-22 02:56:44 +00:00
2006-03-29 08:09:58 +00:00
2005-08-22 03:55:23 +00:00
2006-03-29 08:09:58 +00:00