[m-rev.] diff: clean up library and compiler imports

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Sep 27 19:06:25 AEST 2006


On Wed, 27 Sep 2006, Julien Fischer wrote:

>
> On Wed, 27 Sep 2006, Peter Ross wrote:
>
>> Hi,
>> 
>> I've been slowly fixing some of the --warn-unused-imports errors.
>> Rather than waiting until all have been done.  I thought I would
>> check-in what I've done.
>
> This diff will break the Java and IL backends since
> your analysis doesn't check Mercury clauses if there are foreign clauses,
> e.g. some of the :- use_module rtti_implementation decls shouldn't
> have been deleted (the ones in construct and deconstruct).

I'm committing the following which fixes the above.

Estimated hours taken: 0.1
Branches: main

Fix library compilation in grades java and il.

library/builtin.m:
library/construct.m:
library/deconstruct.m:
 	Undo Pete's change that deleted some of the module imports required
 	by the Java and IL backends.

library/private_builtin.m:
 	Fix a purity mistmatch in one of the foreign clauses for Java.

Index: library/builtin.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/builtin.m,v
retrieving revision 1.123
diff -u -r1.123 builtin.m
--- library/builtin.m	27 Sep 2006 06:16:38 -0000	1.123
+++ library/builtin.m	27 Sep 2006 08:53:22 -0000
@@ -366,6 +366,11 @@
  % Everything below here is not intended to be part of the public interface,
  % and will not be included in the Mercury library reference manual.

+% This import is needed by the Mercury clauses for semidet_succeed/0
+% and semidet_fail/0.
+%
+:- import_module int.
+
  %-----------------------------------------------------------------------------%

  :- interface.
Index: library/construct.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/construct.m,v
retrieving revision 1.30
diff -u -r1.30 construct.m
--- library/construct.m	27 Sep 2006 06:16:38 -0000	1.30
+++ library/construct.m	27 Sep 2006 08:53:52 -0000
@@ -93,6 +93,10 @@

  :- implementation.

+% For use by the Java and IL backends.
+%
+:- use_module rtti_implementation.
+
  :- pragma foreign_decl("C", "

  #include ""mercury_type_desc.h""
Index: library/deconstruct.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/deconstruct.m,v
retrieving revision 1.40
diff -u -r1.40 deconstruct.m
--- library/deconstruct.m	27 Sep 2006 06:16:38 -0000	1.40
+++ library/deconstruct.m	27 Sep 2006 08:54:22 -0000
@@ -232,6 +232,10 @@
  :- import_module int.
  :- import_module require.

+% For use by the Java and IL backends.
+%
+:- use_module rtti_implementation.
+
  :- pragma foreign_decl("C", "

  #include ""mercury_deconstruct.h""
Index: library/private_builtin.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.162
diff -u -r1.162 private_builtin.m
--- library/private_builtin.m	27 Sep 2006 06:16:41 -0000	1.162
+++ library/private_builtin.m	27 Sep 2006 08:54:56 -0000
@@ -17,7 +17,7 @@
  % Note that the builtins used for tabling, deep profiling and parallelism are
  % in separate modules (table_builtin.m, profiling_builtin.m and
  % par_builtin.m).
-
+%
  % This module is a private part of the Mercury implementation; user modules
  % should never explicitly import this module. The interface for this module
  % does not get included in the Mercury library reference manual.
@@ -1058,7 +1058,7 @@

  :- pragma foreign_proc("Java",
      free_heap(_Val::di),
-    [will_not_call_mercury, promise_pure, thread_safe],
+    [will_not_call_mercury, thread_safe],
  "
      /*
      ** For the Java back-end, as for the .NET back-end, we don't define
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list