[m-rev.] diff: fix MLDS profiling

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Aug 22 16:51:06 AEST 2002


Estimated hours taken: 2
Branches: main

runtime/mercury_builtin_types.c:
	Fix a bug in Zoltan's recent change which broke MLDS profiling:
	for MLDS grades, don't call MR_init_entry() for the unify and
	compare procedures for c_pointer.  This is not needed since
	the MLDS code generator will generate the appropriate MR_init_entry()
	calls when it sees the declaration for c_pointer in library/builtin.m,
	and breaks profiling because calling MR_init_entry twice results
	in duplicate entries in the Prof.Decl file.

Workspace: /home/ceres/fjh/ws-ceres2/mercury
Index: runtime/mercury_builtin_types.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_builtin_types.c,v
retrieving revision 1.2
diff -u -d -r1.2 mercury_builtin_types.c
--- runtime/mercury_builtin_types.c	19 Aug 2002 06:04:36 -0000	1.2
+++ runtime/mercury_builtin_types.c	22 Aug 2002 06:39:13 -0000
@@ -1262,7 +1262,9 @@
 	/*
 	** We need to call MR_init_entry() for the unification and comparison
 	** predicates for the types that are automatically predefined
-	** by the type checker.
+	** by the type checker.  (Note that c_pointer is *not* predefined
+	** by the type checker, instead it is explicitly declared in
+	** library/builtin.m.)
 	*/
 	
 	MR_init_entry(mercury__builtin____Unify____int_0_0);
@@ -1270,7 +1272,6 @@
 	MR_init_entry(mercury__builtin____Unify____float_0_0);
 	MR_init_entry(mercury__builtin____Unify____character_0_0);
 	MR_init_entry(mercury__builtin____Unify____void_0_0);
-	MR_init_entry(mercury__builtin____Unify____c_pointer_0_0);
 	MR_init_entry(mercury__builtin____Unify____pred_0_0);
 	MR_init_entry(mercury__builtin____Unify____func_0_0);
 	MR_init_entry(mercury__builtin____Unify____tuple_0_0);
@@ -1280,7 +1281,6 @@
 	MR_init_entry(mercury__builtin____Compare____string_0_0);
 	MR_init_entry(mercury__builtin____Compare____character_0_0);
 	MR_init_entry(mercury__builtin____Compare____void_0_0);
-	MR_init_entry(mercury__builtin____Compare____c_pointer_0_0);
 	MR_init_entry(mercury__builtin____Compare____pred_0_0);
 	MR_init_entry(mercury__builtin____Compare____func_0_0);
 	MR_init_entry(mercury__builtin____Compare____tuple_0_0);

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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