diff: mercury_ho_call.c: fix typeclass bug

Fergus Henderson fjh at cs.mu.oz.au
Sat Dec 20 22:11:09 AEDT 1997


The following bug was caught by the nightly tests.

runtime/mercury_ho_call.c:
	Fix a bug in dgj's recent changes to add support for
	type classes: the hand-written low-level C code for
	do_call_{det,semidet,nondet}_class_method was missing the
	Define_extern_entry(), MR_MAKE_STACK_LAYOUT_ENTRY(), and
	init_entry() macros for the newly added entry points.

Index: mercury_ho_call.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_ho_call.c,v
retrieving revision 1.4
diff -u -u -r1.4 mercury_ho_call.c
--- mercury_ho_call.c	1997/12/19 03:10:44	1.4
+++ mercury_ho_call.c	1997/12/20 11:04:51
@@ -36,6 +36,11 @@
 Declare_label(semidet_closure_return);
 Define_extern_entry(do_call_nondet_closure);
 Declare_label(nondet_closure_return);
+
+Define_extern_entry(do_call_det_class_method);
+Define_extern_entry(do_call_semidet_class_method);
+Define_extern_entry(do_call_nondet_class_method);
+
 Define_extern_entry(mercury__unify_2_0);
 Define_extern_entry(mercury__index_2_0);
 Declare_label(mercury__index_2_0_i1);
@@ -55,6 +60,10 @@
 MR_MAKE_STACK_LAYOUT_INTERNAL_WITH_ENTRY(nondet_closure_return,
 	do_call_nondet_closure);
 
+MR_MAKE_STACK_LAYOUT_ENTRY(do_call_det_class_method);
+MR_MAKE_STACK_LAYOUT_ENTRY(do_call_semidet_class_method);
+MR_MAKE_STACK_LAYOUT_ENTRY(do_call_nondet_class_method);
+
 MR_MAKE_STACK_LAYOUT_ENTRY(mercury__unify_2_0);
 MR_MAKE_STACK_LAYOUT_ENTRY(mercury__index_2_0);
 MR_MAKE_STACK_LAYOUT_INTERNAL(mercury__index_2_0, 1);
@@ -72,6 +81,11 @@
 	init_label(semidet_closure_return);
 	init_entry(do_call_nondet_closure);
 	init_label(nondet_closure_return);
+
+	init_entry(do_call_det_class_method);
+	init_entry(do_call_semidet_class_method);
+	init_entry(do_call_nondet_class_method);
+
 	init_entry(mercury__unify_2_0);
 	init_entry(mercury__index_2_0);
 	init_label(mercury__index_2_0_i1);

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list