[m-dev.] diff: prepare for phasing out non-compact higher order calls

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Jan 19 12:04:59 AEDT 2004


Eliminate the last references to the non-compact versions of do_call_closure
and do_call_class_method, and prepare for their deletion.

compiler/options.m:
	Add an option name that can be used to check for Mercury
	implementations that do not need those non-compact versions.

library/exception.m:
runtime/mercury_exception_catch_body.h:
runtime/mercury_prof.h:
	Replace references to the non-compact versions with references to the
	compact versions.

Zoltan.

cvs diff: Diffing .
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.420
diff -u -b -r1.420 options.m
--- compiler/options.m	15 Jan 2004 07:36:17 -0000	1.420
+++ compiler/options.m	18 Jan 2004 13:05:19 -0000
@@ -1971,6 +1971,7 @@
 long_option("bug-foreign_import-2002-08-06", compiler_sufficiently_recent).
 long_option("install-opt-files-2002-08-30", compiler_sufficiently_recent).
 long_option("read-config-file-2003-03-01", compiler_sufficiently_recent).
+long_option("no-noncompact-ho-call-2004-01-15", compiler_sufficiently_recent).
  
 %-----------------------------------------------------------------------------%
 
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing java
cvs diff: Diffing java/library
cvs diff: Diffing java/runtime
cvs diff: Diffing library
Index: library/exception.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/exception.m,v
retrieving revision 1.84
diff -u -b -r1.84 exception.m
--- library/exception.m	1 Dec 2003 13:17:10 -0000	1.84
+++ library/exception.m	19 Jan 2004 00:46:36 -0000
@@ -1544,7 +1544,7 @@
 MR_define_extern_entry(mercury__exception__builtin_throw_1_0);
 
 /* the following is defined in runtime/mercury_ho_call.c */
-MR_declare_entry(mercury__do_call_closure);
+MR_declare_entry(mercury__do_call_closure_compact);
 
 /* the following is defined in runtime/mercury_trace_base.c */
 MR_declare_entry(MR_do_trace_redo_fail);
@@ -2173,8 +2173,7 @@
 
 	MR_r1 = handler;	/* get the Handler closure */
 	MR_r2 = 1;		/* One additional input argument */
-	MR_r3 = 1;		/* One output argument */
-	MR_r4 = exception;	/* This is our one input argument */
+	MR_r3 = exception;	/* This is our one input argument */
 
 	/*
 	** Restore the value of MR_trace_from_full that we saved at the
@@ -2185,23 +2184,23 @@
 	/*
 	** If the catch was semidet, we need to set the success indicator
 	** MR_r1 to MR_TRUE and return the result in MR_r2; otherwise, we return
-	** the result in MR_r1, which is where mercury__do_call_closure puts
-	** it, so we can do a tailcall.
+	** the result in MR_r1, which is where mercury__do_call_closure_compact
+	** puts it, so we can do a tailcall.
 	*/
 	if (catch_code_model != MR_MODEL_SEMI_HANDLER) {
-		MR_tailcall(MR_ENTRY(mercury__do_call_closure), 
+		MR_tailcall(MR_ENTRY(mercury__do_call_closure_compact),
 			MR_ENTRY(mercury__exception__builtin_throw_1_0));
 	}
 	MR_incr_sp_push_msg(1, ""pred builtin_throw/1"");
 	MR_stackvar(1) = (MR_Word) MR_succip;
-	MR_call(MR_ENTRY(mercury__do_call_closure), 
+	MR_call(MR_ENTRY(mercury__do_call_closure_compact), 
 		MR_LABEL(mercury__exception__builtin_throw_1_0_i1),
 		MR_ENTRY(mercury__exception__builtin_throw_1_0));
 }
 MR_define_label(mercury__exception__builtin_throw_1_0_i1);
 	MR_update_prof_current_proc(
 		MR_LABEL(mercury__exception__builtin_throw_1_0));
-	/* we've just returned from mercury__do_call_closure */
+	/* we've just returned from mercury__do_call_closure_compact */
 	MR_r2 = MR_r1;
 	MR_r1 = MR_TRUE;
 	MR_succip = (MR_Code *) MR_stackvar(1);
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/mercury_exception_catch_body.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_exception_catch_body.h,v
retrieving revision 1.3
diff -u -b -r1.3 mercury_exception_catch_body.h
--- runtime/mercury_exception_catch_body.h	7 Aug 2002 03:18:55 -0000	1.3
+++ runtime/mercury_exception_catch_body.h	15 Jan 2004 04:40:03 -0000
@@ -81,11 +81,10 @@
 	MR_r1 = MR_r2;		/* The Goal to call */
 #endif
 	MR_r2 = 0;		/* Zero additional input arguments */
-	MR_r3 = 1;		/* One output argument */
 	/*
 	** Now call `Goal(Result)'.
 	*/
-	MR_call(MR_ENTRY(mercury__do_call_closure),
+	MR_call(MR_ENTRY(mercury__do_call_closure_compact),
 		MR_LABEL(CLOSURE_RETURN_LABEL(proc_label)),
 		MR_ENTRY(proc_label));
 
Index: runtime/mercury_prof.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_prof.h,v
retrieving revision 1.14
diff -u -b -r1.14 mercury_prof.h
--- runtime/mercury_prof.h	16 Aug 2002 07:46:48 -0000	1.14
+++ runtime/mercury_prof.h	15 Jan 2004 04:40:58 -0000
@@ -42,7 +42,8 @@
 
 /*
 ** This variable holds the address of the calling procedure
-** for a call to mercury__do_call_closure or mercury__do_call_class_method.
+** for a call to mercury__do_call_closure_compact or
+** mercury__do_call_class_method_compact.
 */
 
 #ifdef MR_MPROF_PROFILE_CALLS
--------------------------------------------------------------------------
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