[m-dev.] diff: remove old bootstrapping code

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Dec 12 22:33:49 AEDT 1999


On 12-Dec-1999, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Delete old bootstrapping code.

Oops, I missed a couple of things in that change.

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

Estimated hours taken: 0.5

Delete old bootstrapping code.

library/std_util.m:
        Delete code to handle old RTTI representations.

library/exception.m:
	Use mercury__do_call_closure rather than the
	old do_call_{det,semi,nondet}_closure.

Index: std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -d -u -r1.176 -r1.177
--- std_util.m  1999/12/09 04:40:58     1.176
+++ std_util.m  1999/12/11 15:41:06     1.177
@@ -2171,7 +2171,7 @@
     layout_for_tag = type_ctor_layout[data_tag];
     layout_vector_for_tag = MR_strip_tag(layout_for_tag);

-    switch(MR_get_new_type_ctor_rep(type_ctor_info)) {
+    switch(type_ctor_info->type_ctor_rep) {

         case MR_TYPECTOR_REP_ENUM:
         case MR_TYPECTOR_REP_ENUM_USEREQ:


Index: library/exception.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/exception.m,v
retrieving revision 1.6
diff -u -d -r1.6 exception.m
--- library/exception.m	1999/10/04 09:04:38	1.6
+++ library/exception.m	1999/12/12 10:08:53
@@ -569,10 +569,8 @@
 
 Define_extern_entry(mercury__exception__builtin_throw_1_0);
 
-/* the following are defined in runtime/mercury_ho_call.c */
-Declare_entry(do_call_det_closure);
-Declare_entry(do_call_semidet_closure);
-Declare_entry(do_call_nondet_closure);
+/* the following is defined in runtime/mercury_ho_call.c */
+Declare_entry(mercury__do_call_closure);
 
 /* the following is defined in runtime/mercury_trace_base.c */
 Declare_entry(MR_do_trace_redo_fail);
@@ -676,14 +674,14 @@
 	r1 = r2;	/* The Goal to call */
 	r2 = 0;		/* Zero additional input arguments */
 	r3 = 1;		/* One output argument */
-	call(ENTRY(do_call_det_closure), 
+	call(ENTRY(mercury__do_call_closure), 
 		LABEL(mercury__exception__builtin_catch_3_2_i2),
 		ENTRY(mercury__exception__builtin_catch_3_2));
 		
 Define_label(mercury__exception__builtin_catch_3_2_i2);
 	update_prof_current_proc(LABEL(mercury__exception__builtin_catch_3_2));
 	/*
-	** On exit from do_call_det_closure, Result is in r1
+	** On exit from mercury__do_call_closure, Result is in r1
 	**
 	** We must now deallocate the ticket and nondet stack frame that
 	** were allocated by MR_create_exception_handler().
@@ -726,7 +724,7 @@
 	r1 = r2;	/* The Goal to call */
 	r2 = 0;		/* Zero additional input arguments */
 	r3 = 1;		/* One output argument */
-	call(ENTRY(do_call_semidet_closure), 
+	call(ENTRY(mercury__do_call_closure), 
 		LABEL(mercury__exception__builtin_catch_3_3_i2),
 		ENTRY(mercury__exception__builtin_catch_3_3));
 		
@@ -784,7 +782,7 @@
 	r1 = r2;	/* the Goal to call */
 	r2 = 0;		/* Zero additional input arguments */
 	r3 = 1;		/* One output argument */
-	call(ENTRY(do_call_nondet_closure), 
+	call(ENTRY(mercury__do_call_closure), 
 		LABEL(mercury__exception__builtin_catch_3_5_i2),
 		ENTRY(mercury__exception__builtin_catch_3_5));
 		
@@ -1038,22 +1036,22 @@
 	/*
 	** If the catch was semidet, we need to set the success indicator
 	** r1 to TRUE and return the result in r2; otherwise, we return
-	** the result in r1, which is where do_call_det_closure puts it,
+	** the result in r1, which is where mercury__do_call_closure puts it,
 	** so we can to a tailcall.
 	*/
 	if (catch_code_model != MR_MODEL_SEMI_HANDLER) {
-		tailcall(ENTRY(do_call_det_closure), 
+		tailcall(ENTRY(mercury__do_call_closure), 
 			ENTRY(mercury__exception__builtin_throw_1_0));
 	}
 	MR_incr_sp_push_msg(1, ""builtin_throw/1"");
 	MR_stackvar(1) = (Word) MR_succip;
-	call(ENTRY(do_call_det_closure), 
+	call(ENTRY(mercury__do_call_closure), 
 		LABEL(mercury__exception__builtin_throw_1_0_i1),
 		ENTRY(mercury__exception__builtin_throw_1_0));
 }
 Define_label(mercury__exception__builtin_throw_1_0_i1);
 	update_prof_current_proc(LABEL(mercury__exception__builtin_throw_1_0));
-	/* we've just returned from do_call_det_closure */
+	/* we've just returned from mercury__do_call_closure */
 	r2 = r1;
 	r1 = TRUE;
 	MR_succip = (Code *) MR_stackvar(1);
-- 
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list