[m-dev.] Status of the IL backend

Jonathan Morgan jonmmorgan at gmail.com
Mon Jan 22 22:37:03 AEDT 2007


While the IL backend still works fairly well in the current released
version, the CVS version still has problems which need fixing.

In particular:
* Default implementations for some of the C foreign procedures in the
standard library do not work.  I include a patch to fix these
problems.
* The standard library will not build, due to stream.string_writer.  I
believe this is the first nested sub-module in the standard library,
and it appears to have confused it. I will look into why at some
point.
* Support for .NET 2.0, 3.0, Mono and DotGnu should be added.  I
suspect that this is mostly a build system problem, but I will need to
evaluate this.

Jon

--------------------------------------------------------------------------

Estimated hours taken: 0.2
Branches: main

Fix problems with a few Mercury clauses in the standard library that
have C foreign procedure declarations, and will not build with the
default Mercury clause.

library/rtti_implementation.m:
    Alter num_functors to fail rather than returning -1 for types
without functors, to conform to the recent change in construct.

library/term_size_prof_builtin.m:
    Import require, so that error can be used to indicate that the
function is unsupported for any backends that do not implement this
module's functionality.

Index: library/rtti_implementation.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/rtti_implementation.m,v
retrieving revision 1.72
diff -u -r1.72 rtti_implementation.m
--- library/rtti_implementation.m	25 Sep 2006 01:56:16 -0000	1.72
+++ library/rtti_implementation.m	21 Jan 2007 13:24:22 -0000
@@ -84,7 +84,7 @@
 %
 % Implementations for use from construct.

-:- func num_functors(type_desc.type_desc) = int.
+:- func num_functors(type_desc.type_desc) = int is semidet.

 :- pred get_functor(type_desc.type_desc::in, int::in, string::out, int::out,
     list(type_desc.type_desc)::out) is semidet.
@@ -240,7 +240,7 @@
         ; TypeCtorRep = tcr_stable_foreign
         ; TypeCtorRep = tcr_reference
         ),
-        NumFunctors = -1
+        false
     ;
         TypeCtorRep = tcr_unknown,
         error("num_functors: unknown type_ctor_rep")
Index: library/term_size_prof_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/term_size_prof_builtin.m,v
retrieving revision 1.9
diff -u -r1.9 term_size_prof_builtin.m
--- library/term_size_prof_builtin.m	27 Sep 2006 06:16:44 -0000	1.9
+++ library/term_size_prof_builtin.m	21 Jan 2007 13:24:23 -0000
@@ -76,6 +76,7 @@

 :- implementation.

+:- import_module require.
 %---------------------------------------------------------------------------%
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list