[m-dev.] diff: more MR_ prefixes

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Nov 28 15:33:40 AEDT 2000


runtime/*.[ch]:
	Add some missing MR_ prefixes.

Zoltan.

Index: mercury_stack_trace.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_stack_trace.c,v
retrieving revision 1.39
diff -u -b -r1.39 mercury_stack_trace.c
--- mercury_stack_trace.c	2000/11/23 02:00:39	1.39
+++ mercury_stack_trace.c	2000/11/28 04:25:33
@@ -50,7 +50,7 @@
 
 	fprintf(stderr, "Stack dump follows:\n");
 
-	do_init_modules();
+	MR_do_init_modules();
 	label = MR_lookup_internal_by_addr(success_pointer);
 	if (label == NULL) {
 		fprintf(stderr, "internal label not found\n");
@@ -83,7 +83,7 @@
 	MR_Word				*old_trace_sp;
 	MR_Word				*old_trace_curfr;
 
-	do_init_modules();
+	MR_do_init_modules();
 	MR_dump_stack_record_init(include_trace_data, include_contexts);
 
 	stack_trace_sp = det_stack_pointer;
@@ -135,7 +135,7 @@
 		return NULL;
 	}
 
-	do_init_modules();
+	MR_do_init_modules();
 	*problem = NULL;
 	for (i = 0; i < ancestor_level && label_layout != NULL; i++) {
 		result = MR_stack_walk_step(label_layout->MR_sll_entry,
@@ -226,7 +226,7 @@
 {
 	int	frame_size;
 
-	do_init_modules();
+	MR_do_init_modules();
 
 	/*
 	** The comparison operator in the condition of the while loop
Index: mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.78
diff -u -b -r1.78 mercury_wrapper.c
--- mercury_wrapper.c	2000/11/23 02:00:50	1.78
+++ mercury_wrapper.c	2000/11/28 04:25:03
@@ -416,7 +416,7 @@
 #endif /* CONSERVATIVE_GC */
 
 void 
-do_init_modules(void)
+MR_do_init_modules(void)
 {
 	static	bool	done = FALSE;
 
@@ -428,7 +428,7 @@
 }
 
 void 
-do_init_modules_type_tables(void)
+MR_do_init_modules_type_tables(void)
 {
 	static	bool	done = FALSE;
 
@@ -442,12 +442,12 @@
 		** invoked by do_init_modules.
 		*/
 
-		do_init_modules();
+		MR_do_init_modules();
 	}
 }
 
 void 
-do_init_modules_debugger(void)
+MR_do_init_modules_debugger(void)
 {
 	static	bool	done = FALSE;
 
@@ -571,7 +571,6 @@
 	*argc_ptr = argc;
 } /* end make_argv() */
 
-
 /*  
 **  process_args() is a function that sets some global variables from the
 **  command line.  `mercury_arg[cv]' are `arg[cv]' without the program name.
@@ -579,14 +578,13 @@
 */
 
 static void
-process_args( int argc, char ** argv)
+process_args(int argc, char **argv)
 {
-	progname = argv[0];
+	MR_progname = argv[0];
 	mercury_argc = argc - 1;
 	mercury_argv = argv + 1;
 }
 
-
 /*
 **  process_environment_options() is a function to parse the MERCURY_OPTIONS
 **  environment variable.  
@@ -1235,7 +1233,7 @@
   #endif
 
 	/* call the Mercury predicate main/2 */
-	(*program_entry_point)();
+	(*MR_program_entry_point)();
 
   #ifdef  PROFILE_TIME
 	if (MR_profiling) MR_prof_turn_off_time_profiling();
@@ -1268,18 +1266,18 @@
 	MR_nondet_stack_trace_bottom = MR_maxfr;
 	MR_stack_trace_bottom = MR_LABEL(global_success);
 
-	if (program_entry_point == NULL) {
+	if (MR_program_entry_point == NULL) {
 		MR_fatal_error("no program entry point supplied");
 	}
 
 #ifdef  PROFILE_TIME
-	MR_set_prof_current_proc(program_entry_point);
+	MR_set_prof_current_proc(MR_program_entry_point);
 	if (MR_profiling) {
 		MR_prof_turn_on_time_profiling();
 	}
 #endif
 
-	noprof_call(program_entry_point, MR_LABEL(global_success));
+	MR_noprof_call(MR_program_entry_point, MR_LABEL(global_success));
 
 MR_define_label(global_success);
 #ifdef	MR_LOWLEVEL_DEBUG
Index: mercury_label.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_label.c,v
retrieving revision 1.17
diff -u -b -r1.17 mercury_label.c
--- mercury_label.c	2000/11/23 02:00:32	1.17
+++ mercury_label.c	2000/11/28 04:23:03
@@ -240,7 +240,7 @@
 MR_lookup_internal_by_addr(const MR_Code *addr)
 {
 	MR_do_init_label_tables();
-	do_init_modules();
+	MR_do_init_modules();
 
 #ifdef	MR_LOWLEVEL_DEBUG
 	if (MR_progdebug) {
Index: mercury_type_info.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_type_info.c,v
retrieving revision 1.42
diff -u -b -r1.42 mercury_type_info.c
--- mercury_type_info.c	2000/11/23 02:00:47	1.42
+++ mercury_type_info.c	2000/11/28 04:21:33
@@ -56,7 +56,7 @@
 #define	exist_func_string	"MR_create_type_info_maybe_existq"
 #define	MAYBE_DECLARE_ALLOC_ARG
 #define	MAYBE_PASS_ALLOC_ARG
-#define	ALLOCATE_WORDS(target, size)	incr_saved_hp(			      \
+#define	ALLOCATE_WORDS(target, size)	MR_incr_saved_hp(		      \
 						MR_LVALUE_CAST(MR_Word,	      \
 							(target)),	      \
 						(size))
Index: mercury_trace_base.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_trace_base.c,v
retrieving revision 1.29
diff -u -b -r1.29 mercury_trace_base.c
--- mercury_trace_base.c	2000/11/23 02:00:46	1.29
+++ mercury_trace_base.c	2000/11/28 04:29:27
@@ -334,15 +334,15 @@
 
 #endif	/* MR_TRACE_HISTOGRAM */
 
-Define_extern_entry(MR_do_trace_redo_fail_shallow);
-Define_extern_entry(MR_do_trace_redo_fail_deep);
+MR_define_extern_entry(MR_do_trace_redo_fail_shallow);
+MR_define_extern_entry(MR_do_trace_redo_fail_deep);
 
 MR_BEGIN_MODULE(MR_trace_labels_module)
 	MR_init_entry_ai(MR_do_trace_redo_fail_shallow);
 	MR_init_entry_ai(MR_do_trace_redo_fail_deep);
 MR_BEGIN_CODE
 
-Define_entry(MR_do_trace_redo_fail_shallow);
+MR_define_entry(MR_do_trace_redo_fail_shallow);
 	/*
 	** If this code ever needs changing, you may also need to change
 	** the code in extras/exceptions/exception.m similarly.
@@ -360,7 +360,7 @@
 	}
 	MR_fail();
 
-Define_entry(MR_do_trace_redo_fail_deep);
+MR_define_entry(MR_do_trace_redo_fail_deep);
 #if 0
 	/* For use in case this ever needs to be debugged again. */
 	printf("MR_curfr = %p\n", MR_curfr);
Index: mercury_string.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_string.h,v
retrieving revision 1.19
diff -u -b -r1.19 mercury_string.h
--- mercury_string.h	2000/11/23 02:00:42	1.19
+++ mercury_string.h	2000/11/28 04:19:16
@@ -111,7 +111,7 @@
 		MR_Word make_aligned_string_tmp;			\
 		char * make_aligned_string_ptr;				\
 									\
-	  	incr_hp_atomic_msg(make_aligned_string_tmp,		\
+	  	MR_incr_hp_atomic_msg(make_aligned_string_tmp,		\
 	    	    ((len) + sizeof(MR_Word)) / sizeof(MR_Word),	\
 		    proclabel, "string:string/0");			\
 	    	make_aligned_string_ptr =				\
Index: mercury_string.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_string.c,v
retrieving revision 1.10
diff -u -b -r1.10 mercury_string.c
--- mercury_string.c	2000/11/23 02:00:42	1.10
+++ mercury_string.c	2000/11/28 04:18:58
@@ -75,8 +75,7 @@
 	p = fixed;
 #endif
 	MR_restore_transient_hp();      
-	MR_allocate_aligned_string_msg(result, strlen(p),
-			proclabel);
+	MR_allocate_aligned_string_msg(result, strlen(p), proclabel);
 	MR_save_transient_hp();
 	strcpy(result, p);
 
Index: mercury_tabling.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_tabling.c,v
retrieving revision 1.31
diff -u -b -r1.31 mercury_tabling.c
--- mercury_tabling.c	2000/11/23 02:00:43	1.31
+++ mercury_tabling.c	2000/11/28 04:18:17
@@ -432,7 +432,7 @@
 #define	key_cast		double
 #define	table_type		MR_FloatHashTableSlot
 #define	table_field		float_slot_ptr
-#define	hash(key)		(hash_float(key))
+#define	hash(key)		(MR_hash_float(key))
 #define	equal_keys(k1, k2)	(memcmp(&(k1), &(k2), sizeof(MR_Float)) == 0)
 MR_GENERIC_HASH_LOOKUP_OR_ADD
 #undef	key_format
Index: mercury_ho_call.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_ho_call.c,v
retrieving revision 1.40
diff -u -b -r1.40 mercury_ho_call.c
--- mercury_ho_call.c	2000/11/23 02:00:30	1.40
+++ mercury_ho_call.c	2000/11/28 04:17:09
@@ -221,7 +221,7 @@
 	do {								\
 		r1 = (answer);						\
 		MR_succip = saved_succip;				\
-		proceed();						\
+		MR_proceed();						\
 	} while(0)
 
 #define	tailcall_user_pred()						\
@@ -291,7 +291,7 @@
 	do {								\
 		r1 = (answer);						\
 		MR_succip = saved_succip;				\
-		proceed();						\
+		MR_proceed();						\
 	} while(0)
 
 #define	tailcall_user_pred()						\
--------------------------------------------------------------------------
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