[m-dev.] diff: remove support for bootstrapping pragma export in MLDS

Peter Ross peter.ross at miscrit.be
Tue Aug 1 19:03:04 AEST 2000


Hi,


===================================================================


Estimated hours taken: 0.5

Remove the support for bootstrapping pragma export in the MLDS.
This change is tagged with bootstrap_20000801_hlc_pragma_export

compiler/mlds_to_c.m:
    No longer output #define MR_BOOTSTRAP_PRAGMA_EXPORT.

library/io.m:
runtime/mercury.h:
    Remove the sections which check MR_BOOTSTRAP_PRAGMA_EXPORT.

Index: compiler/mlds_to_c.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_c.m,v
retrieving revision 1.45
diff -u -r1.45 mlds_to_c.m
--- compiler/mlds_to_c.m	2000/07/25 09:46:11	1.45
+++ compiler/mlds_to_c.m	2000/08/01 08:41:54
@@ -126,9 +126,6 @@
 :- mode mlds_output_hdr_file(in, in, di, uo) is det.
 
 mlds_output_hdr_file(Indent, MLDS) -->
-	% XXX for bootstrapping the use of pragma export.
-	io__write_string("#define MR_BOOTSTRAPPED_PRAGMA_EXPORT\n"),
-
 	{ MLDS = mlds(ModuleName, ForeignCode, Imports, Defns) },
 	mlds_output_hdr_start(Indent, ModuleName), io__nl,
 	mlds_output_hdr_imports(Indent, Imports), io__nl,
Index: library/io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.199
diff -u -r1.199 io.m
--- library/io.m	2000/07/20 10:39:34	1.199
+++ library/io.m	2000/08/01 08:42:12
@@ -1809,29 +1809,6 @@
 
 :- pragma export(io__print(in, in, di, uo), "ML_io_print_to_stream").
 
-:- pragma c_code("
-/*
-** XXX this is a hack to work-around the current lack of
-** support for `pragma export'.
-*/
-#ifdef MR_HIGHLEVEL_CODE
- #ifndef MR_BOOTSTRAPPED_PRAGMA_EXPORT
-  extern void mercury__io__print_3_p_0(MR_Word ti, MR_Box x);
-  extern void mercury__io__print_4_p_0(MR_Word ti, MR_Word stream, MR_Box x);
-
-  void
-  ML_io_print_to_cur_stream(MR_Word ti, MR_Word x) {
-	mercury__io__print_3_p_0(ti, (MR_Box) x);
-  }
-
-  void
-  ML_io_print_to_stream(MR_Word ti, MR_Word stream, MR_Word x) {
-	mercury__io__print_4_p_0(ti, stream, (MR_Box) x);
-  }
- #endif
-#endif
-").
-
 io__print(Stream, Term) -->
 	io__set_output_stream(Stream, OrigStream),
 	io__print(Term),
Index: runtime/mercury.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury.h,v
retrieving revision 1.14
diff -u -r1.14 mercury.h
--- runtime/mercury.h	2000/07/20 10:39:36	1.14
+++ runtime/mercury.h	2000/08/01 08:42:15
@@ -40,24 +40,6 @@
 
 /*---------------------------------------------------------------------------*/
 /*
-** XXX this is a hack to work-around the current lack of
-** support for `pragma export'.
-*/
-#ifndef MR_BOOTSTRAPPED_PRAGMA_EXPORT
-  #ifndef MR_HIGHLEVEL_DATA
-    #define ML_report_uncaught_exception \
-			 mercury__exception__report_uncaught_exception_3_p_0
-    #define ML_throw_io_error		mercury__io__throw_io_error_1_p_0
-    #define ML_io_finalize_state	mercury__io__finalize_state_2_p_0
-    #define ML_io_init_state		mercury__io__init_state_2_p_0
-    #define ML_io_stderr_stream		mercury__io__stderr_stream_3_p_0
-    #define ML_io_stdin_stream		mercury__io__stdin_stream_3_p_0
-    #define ML_io_stdout_stream		mercury__io__stdout_stream_3_p_0
-  #endif
-#endif
-
-/*---------------------------------------------------------------------------*/
-/*
 ** Type definitions
 */
 
@@ -418,19 +400,6 @@
 void mercury__private_builtin____Compare____base_typeclass_info_1_0(
 	MR_Type_Info type_info, MR_Comparison_Result *result,
 	MR_Base_TypeClass_Info x, MR_Base_TypeClass_Info y);
-
-/*---------------------------------------------------------------------------*/
-
-/*
-** XXX this is a hack to work-around the current lack of
-** support for `pragma export'.
-*/
-#ifndef MR_BOOTSTRAPPED_PRAGMA_EXPORT
-void ML_io_print_to_cur_stream(MR_Word ti, MR_Word x);
-void ML_io_print_to_stream(MR_Word ti, MR_Word stream, MR_Word x);
-void ML_report_uncaught_exception(MR_Word ti);
-void ML_throw_io_error(MR_String);
-#endif
 
 /*---------------------------------------------------------------------------*/
 

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