[m-rev.] diff: fixes for deletion of RTTI access preds from std_util
Julien Fischer
juliensf at cs.mu.OZ.AU
Tue Mar 28 17:26:28 AEDT 2006
Estimated hours taken: 0.5
Branches: main
Make some more updates required by the deletion of the RTTI access predicates
from std_util.m.
library/deconstruct.m:
Include the runtime header files for deconstructing terms here rather
than in std_util.m since the relevant RTTI access preds are now
defined here.
library/std_util.m:
Don't #include them here.
library/term.m:
Replace std_util.type_info with type_desc.type_desc.
runtime/mercury_type_info.h:
Update some comments to reflect the fact the recent move of the RTTI
access preds.
trace/mercury_trace_vars.c:
Remove the extern declarations for the MR_TypeCtorInfo_Structs for
std_util.type_desc and std_util.type_ctor_desc since those types no
longer exist.
Julien.
Index: library/deconstruct.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/deconstruct.m,v
retrieving revision 1.34
diff -u -r1.34 deconstruct.m
--- library/deconstruct.m 22 Mar 2006 02:56:16 -0000 1.34
+++ library/deconstruct.m 28 Mar 2006 05:56:04 -0000
@@ -230,7 +230,12 @@
:- import_module rtti_implementation.
:- import_module string.
-:- pragma foreign_import_module("C", std_util).
+:- pragma foreign_decl("C", "
+
+#include ""mercury_deconstruct.h""
+#include ""mercury_deconstruct_macros.h""
+
+").
%-----------------------------------------------------------------------------%
Index: library/std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.308
diff -u -r1.308 std_util.m
--- library/std_util.m 24 Mar 2006 04:40:53 -0000 1.308
+++ library/std_util.m 28 Mar 2006 05:55:59 -0000
@@ -394,17 +394,6 @@
:- use_module private_builtin. % for the `heap_pointer' type.
:- use_module solutions.
-% XXX This should not be necessary, but the current compiler is broken in that
-% it puts foreign_proc clauses into deconstruct.opt without also putting the
-% foreign_decl they require into deconstruct.opt as well.
-
-:- pragma foreign_decl("C", "
-
-#include ""mercury_deconstruct.h""
-#include ""mercury_deconstruct_macros.h""
-
-").
-
%-----------------------------------------------------------------------------%
map_maybe(_, no, no).
Index: library/term.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/term.m,v
retrieving revision 1.116
diff -u -r1.116 term.m
--- library/term.m 22 Mar 2006 02:56:20 -0000 1.116
+++ library/term.m 28 Mar 2006 05:51:01 -0000
@@ -647,7 +647,7 @@
% like all the other results returned from this procedure.
Result = ok(univ(Univ)).
-term_to_univ_special_case(_, "std_util", "type_info", _, _, _, _, _) :-
+term_to_univ_special_case(_, "type_desc", "type_desc", _, _, _, _, _) :-
% Ditto.
fail.
@@ -759,7 +759,7 @@
univ_to_term_special_case("builtin", "string", [], Univ, Context,
functor(string(String), [], Context)) :-
det_univ_to_type(Univ, String).
-univ_to_term_special_case("std_util", "type_info", [], Univ, Context,
+univ_to_term_special_case("type_desc", "type_desc", [], Univ, Context,
functor(atom("type_info"), [Term], Context)) :-
det_univ_to_type(Univ, TypeInfo),
type_info_to_term(Context, TypeInfo, Term).
Index: runtime/mercury_type_info.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_type_info.h,v
retrieving revision 1.118
diff -u -r1.118 mercury_type_info.h
--- runtime/mercury_type_info.h 5 Oct 2005 06:34:21 -0000 1.118
+++ runtime/mercury_type_info.h 28 Mar 2006 05:48:43 -0000
@@ -32,7 +32,7 @@
** library/array.m
** library/builtin.m
** library/private_builtin.m
-** library/std_util.m
+** library/type_desc.m
** runtime/mercury_bootstrap.c
** runtime/mercury_mcpp.h
** (for updating the hand-written RTTI
@@ -44,7 +44,7 @@
** runtime/mercury_deep_copy_body.h
** runtime/mercury_tabling.c
** runtime/mercury_type_info.c
-** library/std_util.m
+** library/type_desc.m
**
** runtime/mercury_mcpp.h:
** (for updating the MC++ backend RTTI structures)
Index: trace/mercury_trace_vars.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_vars.c,v
retrieving revision 1.68
diff -u -r1.68 mercury_trace_vars.c
--- trace/mercury_trace_vars.c 2 Nov 2005 14:02:16 -0000 1.68
+++ trace/mercury_trace_vars.c 28 Mar 2006 05:51:58 -0000
@@ -171,10 +171,6 @@
extern const struct MR_TypeCtorInfo_Struct
MR_TYPE_CTOR_INFO_NAME(private_builtin, base_typeclass_info, 0);
extern const struct MR_TypeCtorInfo_Struct
- MR_TYPE_CTOR_INFO_NAME(std_util, type_desc, 0);
-extern const struct MR_TypeCtorInfo_Struct
- MR_TYPE_CTOR_INFO_NAME(std_util, type_ctor_desc, 0);
-extern const struct MR_TypeCtorInfo_Struct
MR_TYPE_CTOR_INFO_NAME(type_desc, type_desc, 0);
extern const struct MR_TypeCtorInfo_Struct
MR_TYPE_CTOR_INFO_NAME(type_desc, type_ctor_desc, 0);
--------------------------------------------------------------------------
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