[m-rev.] for review: TYPE_CTOR_REP_REFERENCE

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 11 17:31:33 AEDT 2003


On 11-Feb-2003, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 10-Feb-2003, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > Zoltan, what is the semantics of the first argument to return_unify_answer()?
> > (See the XXX at the end of this diff.  Did I get it right?)
> 
> Not quite.
> 
> There is a row of definitions of the form
> 
> 	MR_define_unify_compare_proc_statics(xxx);
> 
> in mercury_ho_call.c. The first argument of return_unify_answer is supposed
> to correspond to one of the xxx, identifying the kind of thing you are
> unifying. You should add MR_define_unify_compare_proc_statics(ref) to the
> block of MR_define_unify_compare_proc_statics, and a corresponding call
> in write_out_proc_statics.

Done.

Estimated hours taken: 0.25
Branches: main

runtime/mercury_ho_call.c:
	Define the `proc_static' structures for deep profiling of
	the new built-in reference type that I added recently.

runtime/mercury_unify_compare_body.h:
	Delete an XXX comment which is fixed by the change above.

Workspace: /home/ceres/fjh/mercury
Index: runtime/mercury_ho_call.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_ho_call.c,v
retrieving revision 1.58
diff -u -d -r1.58 mercury_ho_call.c
--- runtime/mercury_ho_call.c	8 Nov 2002 00:45:43 -0000	1.58
+++ runtime/mercury_ho_call.c	11 Feb 2003 06:27:07 -0000
@@ -94,6 +94,7 @@
   MR_define_unify_compare_proc_statics(float);
   MR_define_unify_compare_proc_statics(string);
   MR_define_unify_compare_proc_statics(c_pointer);
+  MR_define_unify_compare_proc_statics(reference);
   MR_define_unify_compare_proc_statics(typeinfo);
   MR_define_unify_compare_proc_statics(typectorinfo);
   MR_define_unify_compare_proc_statics(typedesc);
@@ -978,6 +979,10 @@
 		&MR_proc_static_user_builtin_name(c_pointer_unify, 2, 0));
 	MR_write_out_proc_static(fp, (MR_ProcStatic *)
 		&MR_proc_static_user_builtin_name(c_pointer_compare, 3, 0));
+	MR_write_out_proc_static(fp, (MR_ProcStatic *)
+		&MR_proc_static_user_builtin_name(reference_unify, 2, 0));
+	MR_write_out_proc_static(fp, (MR_ProcStatic *)
+		&MR_proc_static_user_builtin_name(reference_compare, 3, 0));
 	MR_write_out_proc_static(fp, (MR_ProcStatic *)
 		&MR_proc_static_user_builtin_name(typeinfo_unify, 2, 0));
 	MR_write_out_proc_static(fp, (MR_ProcStatic *)
Index: runtime/mercury_unify_compare_body.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_unify_compare_body.h,v
retrieving revision 1.28
diff -u -d -r1.28 mercury_unify_compare_body.h
--- runtime/mercury_unify_compare_body.h	10 Feb 2003 17:03:57 -0000	1.28
+++ runtime/mercury_unify_compare_body.h	11 Feb 2003 06:29:48 -0000
@@ -683,10 +683,6 @@
             */
             MR_fatal_error(attempt_msg "terms of a reference type");
 #else
-            /*
-            ** XXX what should the first argument to return_unify_answer()
-            ** be here?
-            */
             return_unify_answer(reference, (void *) x == (void *) y);
 #endif
 

-- 
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