[m-dev.] diff: MR_NO_BACKWARDS_COMPAT
Zoltan Somogyi
zs at cs.mu.OZ.AU
Mon Oct 16 13:30:33 AEDT 2000
Get the compiler to bootstrap with -DMR_NO_BACKWARDS_COMPAT.
compiler/c_util.m:
compiler/rtti_out.m:
Add MR_ prefixes to various type names in generated code.
compiler/*.m:
browser/*.m:
library/*.m:
Add MR_prefixes to various type and function names in pragma C code.
runtime/*.[ch]:
trace/*.[ch]:
Add MR_prefixes to various type and function names in
hand-written code.
Zoltan.
cvs diff: Diffing .
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/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing browser
Index: browser/collect_lib.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/collect_lib.m,v
retrieving revision 1.4
diff -u -b -r1.4 collect_lib.m
--- browser/collect_lib.m 2000/02/04 03:45:25 1.4
+++ browser/collect_lib.m 2000/10/15 04:04:48
@@ -120,7 +120,7 @@
:- pred set_to_null_pointer(c_pointer::out) is det.
:- pragma c_code(set_to_null_pointer(Pointer::out),
[will_not_call_mercury, thread_safe],
- "(Pointer = (Word) NULL)").
+ "(Pointer = (MR_Word) NULL)").
%------------------------------------------------------------------------------%
Index: browser/declarative_execution.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/declarative_execution.m,v
retrieving revision 1.13
diff -u -b -r1.13 declarative_execution.m
--- browser/declarative_execution.m 2000/10/01 03:13:39 1.13
+++ browser/declarative_execution.m 2000/10/15 04:04:12
@@ -495,7 +495,7 @@
[will_not_call_mercury, thread_safe],
"
Node = Id;
- SUCCESS_INDICATOR = (Id != (Word) NULL);
+ SUCCESS_INDICATOR = (Id != (MR_Word) NULL);
"
).
@@ -850,7 +850,7 @@
:- pragma c_code(
null_trace_node_id(Id::out),
[will_not_call_mercury, thread_safe],
- "Id = (Word) NULL;"
+ "Id = (MR_Word) NULL;"
).
@@ -952,7 +952,7 @@
:- pragma c_code(node_id_to_key(Id::in, Key::out),
[will_not_call_mercury, thread_safe],
- "Key = (Integer) Id;").
+ "Key = (MR_Integer) Id;").
:- pred convert_node(trace_node(trace_node_id), trace_node(trace_node_key)).
:- mode convert_node(in, out) is det.
Index: browser/dl.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/dl.m,v
retrieving revision 1.4
diff -u -b -r1.4 dl.m
--- browser/dl.m 2000/02/04 03:45:28 1.4
+++ browser/dl.m 2000/10/15 04:03:55
@@ -97,9 +97,9 @@
#ifdef RTLD_GLOBAL
if (Scope) mode |= RTLD_GLOBAL;
#endif
- Result = (Word) dlopen(FileName, mode);
+ Result = (MR_Word) dlopen(FileName, mode);
#else
- Result = (Word) NULL;
+ Result = (MR_Word) NULL;
#endif
}").
@@ -205,9 +205,9 @@
_IO0::di, _IO::uo), [will_not_call_mercury], "
{
#if defined(HAVE_DLFCN_H) && defined(HAVE_DLSYM)
- Pointer = (Word) dlsym((void *) Handle, Name);
+ Pointer = (MR_Word) dlsym((void *) Handle, Name);
#else
- Pointer = (Word) NULL;
+ Pointer = (MR_Word) NULL;
#endif
}").
Index: browser/interactive_query.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/interactive_query.m,v
retrieving revision 1.7
diff -u -b -r1.7 interactive_query.m
--- browser/interactive_query.m 2000/02/04 03:45:29 1.7
+++ browser/interactive_query.m 2000/10/15 04:13:25
@@ -446,7 +446,7 @@
:- pragma c_header_code("#include ""mercury_grade.h""").
:- pragma c_code(grade_option = (GradeOpt::out),
[thread_safe, will_not_call_mercury],
- "MR_make_aligned_string(GradeOpt, (String) MR_GRADE_OPT);").
+ "MR_make_aligned_string(GradeOpt, (MR_String) MR_GRADE_OPT);").
:- func verbose = bool.
verbose = no.
Index: browser/mdb.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/mdb.m,v
retrieving revision 1.2
diff -u -b -r1.2 mdb.m
--- browser/mdb.m 2000/09/01 09:13:45 1.2
+++ browser/mdb.m 2000/10/15 04:03:30
@@ -31,13 +31,13 @@
:- pragma c_code(mdb__version(Version::out),
will_not_call_mercury, "
- ConstString version_string =
+ MR_ConstString version_string =
MR_VERSION "", configured for "" MR_FULLARCH;
/*
** Cast away const needed here, because Mercury declares Version
- ** with type String rather than ConstString.
+ ** with type MR_String rather than MR_ConstString.
*/
- Version = (String) (Word) version_string;
+ Version = (MR_String) (MR_Word) version_string;
").
%---------------------------------------------------------------------------%
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/bytecode_data.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/bytecode_data.m,v
retrieving revision 1.6
diff -u -b -r1.6 bytecode_data.m
--- compiler/bytecode_data.m 2000/04/17 04:32:16 1.6
+++ compiler/bytecode_data.m 2000/10/15 06:12:11
@@ -244,10 +244,10 @@
"
{
- Float64 float64;
+ MR_Float64 float64;
unsigned char *raw_mem_p;
- float64 = (Float64) FloatVal;
+ float64 = (MR_Float64) FloatVal;
raw_mem_p = (unsigned char*) &float64;
#if defined(MR_BIG_ENDIAN)
Index: compiler/c_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/c_util.m,v
retrieving revision 1.5
diff -u -b -r1.5 c_util.m
--- compiler/c_util.m 2000/10/06 10:18:11 1.5
+++ compiler/c_util.m 2000/10/15 03:17:23
@@ -208,7 +208,7 @@
c_util__unary_prefix_op(hash_string, "MR_hash_string").
c_util__unary_prefix_op(bitwise_complement, "~").
c_util__unary_prefix_op(not, "!").
-c_util__unary_prefix_op(cast_to_unsigned, "(Unsigned)").
+c_util__unary_prefix_op(cast_to_unsigned, "(MR_Unsigned)").
c_util__string_compare_op(str_eq, "==").
c_util__string_compare_op(str_ne, "!=").
Index: compiler/llds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/llds.m,v
retrieving revision 1.266
diff -u -b -r1.266 llds.m
--- compiler/llds.m 2000/10/13 04:04:50 1.266
+++ compiler/llds.m 2000/10/15 03:18:51
@@ -999,49 +999,51 @@
% to avoid unnecessary boxing/unboxing of floats.
:- type llds_type
---> bool % A boolean value
- % represented using the C type `Integer'.
+ % represented using the C type `MR_Integer'.
; int_least8 % A signed value that fits that contains
% at least eight bits, represented using the
- % C type int_least8_t. Intended for use in
+ % C type MR_int_least8_t. Intended for use in
% static data declarations, not for data
% that gets stored in registers, stack slots
% etc.
; uint_least8 % An unsigned version of int_least8,
- % represented using the C type uint_least8_t.
+ % represented using the C type
+ % MR_uint_least8_t.
; int_least16 % A signed value that fits that contains
% at least sixteen bits, represented using the
- % C type int_least16_t. Intended for use in
+ % C type MR_int_least16_t. Intended for use in
% static data declarations, not for data
% that gets stored in registers, stack slots
% etc.
; uint_least16 % An unsigned version of int_least16,
- % represented using the C type uint_least16_t.
+ % represented using the C type
+ % MR_uint_least16_t.
; int_least32 % A signed value that fits that contains
% at least 32 bits, represented using the
- % C type int_least32_t. Intended for use in
+ % C type MR_int_least32_t. Intended for use in
% static data declarations, not for data
% that gets stored in registers, stack slots
% etc.
; uint_least32 % An unsigned version of intleast_32,
% represented using the C type uint_least32_t.
; integer % A Mercury `int', represented in C as a
- % value of type `Integer' (which is
+ % value of type `MR_Integer' (which is
% a signed integral type of the same
% size as a pointer).
- ; unsigned % Something whose C type is `Unsigned'
- % (the unsigned equivalent of `Integer').
+ ; unsigned % Something whose C type is `MR_Unsigned'
+ % (the unsigned equivalent of `MR_Integer').
; float % A Mercury `float', represented in C as a
- % value of type `Float' (which may be either
+ % value of type `MR_Float' (which may be either
% `float' or `double', but is usually
% `double').
; string % A Mercury string; represented in C as a
- % value of type `String'.
+ % value of type `MR_String'.
; data_ptr % A pointer to data; represented in C
- % as a value of C type `Word *'.
+ % as a value of C type `MR_Word *'.
; code_ptr % A pointer to code; represented in C
- % as a value of C type `Code *'.
+ % as a value of C type `MR_Code *'.
; word. % Something that can be assigned to a value
- % of C type `Word', i.e., something whose
+ % of C type `MR_Word', i.e., something whose
% size is a word but which may be either
% signed or unsigned
% (used for registers, stack slots, etc).
Index: compiler/rtti_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/rtti_out.m,v
retrieving revision 1.13
diff -u -b -r1.13 rtti_out.m
--- compiler/rtti_out.m 2000/10/11 02:59:58 1.13
+++ compiler/rtti_out.m 2000/10/15 04:07:51
@@ -399,8 +399,9 @@
% XXX It would be nice to avoid generating redundant declarations
% of base_typeclass_infos, but currently we don't.
{ DeclSet1 = DeclSet },
- io__write_string(" = {\n\t(Code *) "),
- io__write_list([N1, N2, N3, N4, N5], ",\n\t(Code *) ", io__write_int),
+ io__write_string(" = {\n\t(MR_Code *) "),
+ io__write_list([N1, N2, N3, N4, N5],
+ ",\n\t(MR_Code *) ", io__write_int),
io__write_string(",\n\t"),
io__write_list(CodeAddrs, ",\n\t", output_static_code_addr),
io__write_string("\n};\n").
@@ -1003,7 +1004,7 @@
rtti_name_c_type(exist_locns(_), "MR_DuExistLocn", "[]").
rtti_name_c_type(exist_info(_), "MR_DuExistInfo", "").
-rtti_name_c_type(field_names(_), "ConstString", "[]").
+rtti_name_c_type(field_names(_), "MR_ConstString", "[]").
rtti_name_c_type(field_types(_), "MR_PseudoTypeInfo", "[]").
rtti_name_c_type(enum_functor_desc(_), "MR_EnumFunctorDesc", "").
rtti_name_c_type(notag_functor_desc, "MR_NotagFunctorDesc", "").
@@ -1015,7 +1016,7 @@
rtti_name_c_type(du_ptag_ordered_table, "MR_DuPtagLayout", "[]").
rtti_name_c_type(type_ctor_info, "struct MR_TypeCtorInfo_Struct",
"").
-rtti_name_c_type(base_typeclass_info(_, _), "Code *", "[]").
+rtti_name_c_type(base_typeclass_info(_, _), "MR_Code *", "[]").
rtti_name_c_type(pseudo_type_info(Pseudo), TypePrefix, TypeSuffix) :-
pseudo_type_info_name_c_type(Pseudo, TypePrefix, TypeSuffix).
rtti_name_c_type(type_hashcons_pointer, "union MR_TableNode_Union **", "").
Index: compiler/stack_layout.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.55
diff -u -b -r1.55 stack_layout.m
--- compiler/stack_layout.m 2000/10/13 13:55:57 1.55
+++ compiler/stack_layout.m 2000/10/15 23:29:15
@@ -417,11 +417,11 @@
:- pragma c_code(stack_layout__concat_string_list(StringList::in,
ArenaSize::in, Arena::out),
[will_not_call_mercury, thread_safe], "{
- Word cur_node;
- Integer cur_offset;
- Word tmp;
+ MR_Word cur_node;
+ MR_Integer cur_offset;
+ MR_Word tmp;
- incr_hp_atomic(tmp, (ArenaSize + sizeof(Word)) / sizeof(Word));
+ incr_hp_atomic(tmp, (ArenaSize + sizeof(MR_Word)) / sizeof(MR_Word));
Arena = (char *) tmp;
cur_offset = 0;
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
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/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
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/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/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
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 library
Index: library/array.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/array.m,v
retrieving revision 1.73
diff -u -b -r1.73 array.m
--- library/array.m 2000/09/25 15:18:34 1.73
+++ library/array.m 2000/10/15 00:45:09
@@ -382,14 +382,14 @@
").
:- pragma c_header_code("
-MR_ArrayType *ML_make_array(Integer size, Word item);
+MR_ArrayType *ML_make_array(MR_Integer size, MR_Word item);
").
:- pragma c_code("
MR_ArrayType *
-ML_make_array(Integer size, Word item)
+ML_make_array(MR_Integer size, MR_Word item)
{
- Integer i;
+ MR_Integer i;
MR_ArrayType *array;
array = MR_make_array(size);
@@ -404,13 +404,13 @@
:- pragma c_code(array__init(Size::in, Item::in, Array::array_uo),
[will_not_call_mercury, thread_safe], "
MR_maybe_record_allocation(Size + 1, MR_PROC_LABEL, ""array:array/1"");
- Array = (Word) ML_make_array(Size, Item);
+ Array = (MR_Word) ML_make_array(Size, Item);
").
:- pragma c_code(array__make_empty_array(Array::array_uo),
[will_not_call_mercury, thread_safe], "
MR_maybe_record_allocation(1, MR_PROC_LABEL, ""array:array/1"");
- Array = (Word) ML_make_array(0, 0);
+ Array = (MR_Word) ML_make_array(0, 0);
").
%-----------------------------------------------------------------------------%
@@ -478,7 +478,7 @@
[will_not_call_mercury, thread_safe], "{
MR_ArrayType *array = (MR_ArrayType *)Array;
#ifndef ML_OMIT_ARRAY_BOUNDS_CHECKS
- if ((Unsigned) Index >= (Unsigned) array->size) {
+ if ((MR_Unsigned) Index >= (MR_Unsigned) array->size) {
MR_fatal_error(""array__lookup: array index out of bounds"");
}
#endif
@@ -488,7 +488,7 @@
[will_not_call_mercury, thread_safe], "{
MR_ArrayType *array = (MR_ArrayType *)Array;
#ifndef ML_OMIT_ARRAY_BOUNDS_CHECKS
- if ((Unsigned) Index >= (Unsigned) array->size) {
+ if ((MR_Unsigned) Index >= (MR_Unsigned) array->size) {
MR_fatal_error(""array__lookup: array index out of bounds"");
}
#endif
@@ -502,7 +502,7 @@
[will_not_call_mercury, thread_safe], "{
MR_ArrayType *array = (MR_ArrayType *)Array0;
#ifndef ML_OMIT_ARRAY_BOUNDS_CHECKS
- if ((Unsigned) Index >= (Unsigned) array->size) {
+ if ((MR_Unsigned) Index >= (MR_Unsigned) array->size) {
MR_fatal_error(""array__set: array index out of bounds"");
}
#endif
@@ -514,17 +514,17 @@
:- pragma c_header_code("
MR_ArrayType * ML_resize_array(MR_ArrayType *old_array,
- Integer array_size, Word item);
+ MR_Integer array_size, MR_Word item);
").
:- pragma c_code("
MR_ArrayType *
-ML_resize_array(MR_ArrayType *old_array, Integer array_size,
- Word item)
+ML_resize_array(MR_ArrayType *old_array, MR_Integer array_size,
+ MR_Word item)
{
- Integer i;
+ MR_Integer i;
MR_ArrayType* array;
- Integer elements_to_copy;
+ MR_Integer elements_to_copy;
elements_to_copy = old_array->size;
if (elements_to_copy == array_size) return old_array;
@@ -532,7 +532,7 @@
elements_to_copy = array_size;
}
- array = (MR_ArrayType *) MR_GC_NEW_ARRAY(Word, array_size + 1);
+ array = (MR_ArrayType *) MR_GC_NEW_ARRAY(MR_Word, array_size + 1);
array->size = array_size;
for (i = 0; i < elements_to_copy; i++) {
array->elements[i] = old_array->elements[i];
@@ -554,7 +554,7 @@
:- pragma c_code(array__resize(Array0::array_di, Size::in, Item::in,
Array::array_uo), [will_not_call_mercury, thread_safe], "
MR_maybe_record_allocation(Size + 1, MR_PROC_LABEL, ""array:array/1"");
- Array = (Word) ML_resize_array(
+ Array = (MR_Word) ML_resize_array(
(MR_ArrayType *) Array0, Size, Item);
").
@@ -562,16 +562,16 @@
:- pragma c_header_code("
MR_ArrayType * ML_shrink_array(MR_ArrayType *old_array,
- Integer array_size);
+ MR_Integer array_size);
").
:- pragma c_code("
MR_ArrayType *
-ML_shrink_array(MR_ArrayType *old_array, Integer array_size)
+ML_shrink_array(MR_ArrayType *old_array, MR_Integer array_size)
{
- Integer i;
+ MR_Integer i;
MR_ArrayType* array;
- Integer old_array_size;
+ MR_Integer old_array_size;
old_array_size = old_array->size;
if (old_array_size == array_size) return old_array;
@@ -580,7 +580,7 @@
""array__shrink: can't shrink to a larger size"");
}
- array = (MR_ArrayType *) MR_GC_NEW_ARRAY(Word, array_size + 1);
+ array = (MR_ArrayType *) MR_GC_NEW_ARRAY(MR_Word, array_size + 1);
array->size = array_size;
for (i = 0; i < array_size; i++) {
array->elements[i] = old_array->elements[i];
@@ -599,7 +599,7 @@
:- pragma c_code(array__shrink(Array0::array_di, Size::in, Array::array_uo),
[will_not_call_mercury, thread_safe], "
MR_maybe_record_allocation(Size + 1, MR_PROC_LABEL, ""array:array/1"");
- Array = (Word) ML_shrink_array(
+ Array = (MR_Word) ML_shrink_array(
(MR_ArrayType *) Array0, Size);
").
@@ -618,9 +618,9 @@
** changes to deepcopy() in runtime/deep_copy.c.
*/
- Integer i;
+ MR_Integer i;
MR_ArrayType* array;
- Integer array_size;
+ MR_Integer array_size;
array_size = old_array->size;
array = MR_make_array(array_size);
@@ -636,14 +636,14 @@
[will_not_call_mercury, thread_safe], "
MR_maybe_record_allocation((((MR_ArrayType *) Array0)->size) + 1,
MR_PROC_LABEL, ""array:array/1"");
- Array = (Word) ML_copy_array((MR_ArrayType *) Array0);
+ Array = (MR_Word) ML_copy_array((MR_ArrayType *) Array0);
").
:- pragma c_code(array__copy(Array0::in, Array::array_uo),
[will_not_call_mercury, thread_safe], "
MR_maybe_record_allocation((((MR_ArrayType *) Array0)->size) + 1,
MR_PROC_LABEL, ""array:array/1"");
- Array = (Word) ML_copy_array((MR_ArrayType *) Array0);
+ Array = (MR_Word) ML_copy_array((MR_ArrayType *) Array0);
").
%-----------------------------------------------------------------------------%
Index: library/benchmarking.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/benchmarking.m,v
retrieving revision 1.34
diff -u -b -r1.34 benchmarking.m
--- library/benchmarking.m 2000/04/21 02:47:28 1.34
+++ library/benchmarking.m 2000/10/15 00:45:26
@@ -616,15 +616,15 @@
*/
:- pragma c_header_code("
- extern volatile Word ML_benchmarking_dummy_word;
+ extern volatile MR_Word ML_benchmarking_dummy_word;
").
:- pragma c_code("
- volatile Word ML_benchmarking_dummy_word;
+ volatile MR_Word ML_benchmarking_dummy_word;
").
:- impure pred do_nothing(T::in) is det.
:- pragma c_code(do_nothing(X::in), [will_not_call_mercury, thread_safe], "
- ML_benchmarking_dummy_word = (Word) X;
+ ML_benchmarking_dummy_word = (MR_Word) X;
").
%-----------------------------------------------------------------------------%
@@ -638,7 +638,7 @@
:- pragma inline(new_int_reference/2).
:- pragma c_code(new_int_reference(X::in, Ref::out), will_not_call_mercury, "
incr_hp(Ref, 1);
- *(Integer *)Ref = X;
+ * (MR_Integer *) Ref = X;
").
:- impure pred incr_ref(int_reference::in) is det.
@@ -649,13 +649,13 @@
:- semipure pred ref_value(int_reference::in, int::out) is det.
:- pragma inline(ref_value/2).
:- pragma c_code(ref_value(Ref::in, X::out), will_not_call_mercury, "
- X = *(Integer *) Ref;
+ X = * (MR_Integer *) Ref;
").
:- impure pred update_ref(int_reference::in, T::in) is det.
:- pragma inline(update_ref/2).
:- pragma c_code(update_ref(Ref::in, X::in), will_not_call_mercury, "
- *(Integer *) Ref = X;
+ * (MR_Integer *) Ref = X;
").
%-----------------------------------------------------------------------------%
Index: library/builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/builtin.m,v
retrieving revision 1.39
diff -u -b -r1.39 builtin.m
--- library/builtin.m 2000/09/18 11:52:14 1.39
+++ library/builtin.m 2000/10/15 00:40:23
@@ -429,7 +429,7 @@
fallthru(ENTRY(mercury__copy_2_1), ENTRY(mercury__copy_2_0))
Define_entry(mercury__copy_2_1);
{
- Word value, copy, type_info;
+ MR_Word value, copy, type_info;
type_info = r1;
value = r2;
Index: library/char.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/char.m,v
retrieving revision 1.28
diff -u -b -r1.28 char.m
--- library/char.m 1999/07/07 15:19:37 1.28
+++ library/char.m 2000/10/15 03:16:34
@@ -401,12 +401,12 @@
:- pragma c_code(char__to_int(Character::in, Int::out),
[will_not_call_mercury, thread_safe] , "
- Int = (UnsignedChar) Character;
+ Int = (MR_UnsignedChar) Character;
").
:- pragma c_code(char__to_int(Character::in, Int::in),
[will_not_call_mercury, thread_safe] , "
- SUCCESS_INDICATOR = ((UnsignedChar) Character == Int);
+ SUCCESS_INDICATOR = ((MR_UnsignedChar) Character == Int);
").
:- pragma c_code(char__to_int(Character::out, Int::in),
@@ -418,7 +418,7 @@
** the result was not truncated.
*/
Character = Int;
- SUCCESS_INDICATOR = ((UnsignedChar) Character == Int);
+ SUCCESS_INDICATOR = ((MR_UnsignedChar) Character == Int);
").
% We used unsigned character codes, so the minimum character code
Index: library/exception.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/exception.m,v
retrieving revision 1.29
diff -u -b -r1.29 exception.m
--- library/exception.m 2000/08/31 11:34:29 1.29
+++ library/exception.m 2000/10/15 03:25:17
@@ -534,7 +534,7 @@
{
typedef void FuncType(void *, MR_Box *);
FuncType *code = (FuncType *)
- MR_field(MR_mktag(0), closure, (Integer) 1);
+ MR_field(MR_mktag(0), closure, (MR_Integer) 1);
(*code)((void *) closure, result);
}
@@ -543,7 +543,7 @@
{
typedef bool FuncType(void *, MR_Box *);
FuncType *code = (FuncType *)
- MR_field(MR_mktag(0), closure, (Integer) 1);
+ MR_field(MR_mktag(0), closure, (MR_Integer) 1);
return (*code)((void *) closure, result);
}
@@ -555,7 +555,7 @@
{
typedef void FuncType(void *, MR_Box *, MR_NestedCont);
FuncType *code = (FuncType *)
- MR_field(MR_mktag(0), closure, (Integer) 1);
+ MR_field(MR_mktag(0), closure, (MR_Integer) 1);
(*code)((void *) closure, result, cont);
}
@@ -567,7 +567,7 @@
{
typedef void FuncType(void *, MR_Box *, MR_Cont, void *);
FuncType *code = (FuncType *)
- MR_field(MR_mktag(0), closure, (Integer) 1);
+ MR_field(MR_mktag(0), closure, (MR_Integer) 1);
(*code)((void *) closure, result, cont, cont_env);
}
@@ -581,7 +581,7 @@
{
typedef void FuncType(void *, MR_Box, MR_Box *);
FuncType *code = (FuncType *)
- MR_field(MR_mktag(0), closure, (Integer) 1);
+ MR_field(MR_mktag(0), closure, (MR_Integer) 1);
(*code)((void *) closure, (MR_Box) exception, result);
}
@@ -884,9 +884,9 @@
""being omitted from the trace.\\n"", (msg)); \\
} while (0)
-static Code *
-MR_trace_throw(Code *success_pointer, Word *det_stack_pointer,
- Word *current_frame)
+static MR_Code *
+MR_trace_throw(MR_Code *success_pointer, MR_Word *det_stack_pointer,
+ MR_Word *current_frame)
{
const MR_Internal *label;
const MR_Stack_Layout_Label *return_label_layout;
@@ -903,7 +903,7 @@
while (return_label_layout != NULL) {
const MR_Stack_Layout_Entry *entry_layout;
- Code *MR_jumpaddr;
+ MR_Code *MR_jumpaddr;
MR_Stack_Walk_Step_Result result;
const char *problem;
@@ -951,7 +951,7 @@
#define swap_heaps() \\
{ \\
/* save the current heap */ \\
- Word *swap_heaps_temp_hp = MR_hp; \\
+ MR_Word *swap_heaps_temp_hp = MR_hp; \\
MemoryZone *swap_heaps_temp_hp_zone = MR_heap_zone; \\
\\
/* set heap to solutions heap */ \\
@@ -1224,17 +1224,17 @@
*/
Define_entry(mercury__exception__builtin_throw_1_0);
{
- Word exception = r1;
- Word handler;
+ MR_Word exception = r1;
+ MR_Word handler;
enum MR_HandlerCodeModel catch_code_model;
- Word *orig_curfr;
- Unsigned exception_event_number = MR_trace_event_number;
+ MR_Word *orig_curfr;
+ MR_Unsigned exception_event_number = MR_trace_event_number;
/*
** let the debugger trace exception throwing
*/
if (MR_trace_enabled) {
- Code *MR_jumpaddr;
+ MR_Code *MR_jumpaddr;
MR_trace_set_exception_value(exception);
save_transient_registers();
MR_jumpaddr = MR_trace_throw(MR_succip, MR_sp, MR_curfr);
@@ -1256,7 +1256,7 @@
while (MR_redoip_slot(MR_curfr) != ENTRY(exception_handler_do_fail)) {
MR_curfr = MR_succfr_slot(MR_curfr);
if (MR_curfr < MR_CONTEXT(nondetstack_zone)->min) {
- Word *save_succip;
+ MR_Word *save_succip;
/*
** There was no exception handler.
**
@@ -1349,7 +1349,7 @@
** the real heap will leave all the pointers in the correct place.
*/
{
- Word * saved_solns_heap_ptr;
+ MR_Word * saved_solns_heap_ptr;
/* switch to the solutions heap */
if (MR_heap_zone == MR_EXCEPTION_FRAMEVARS->heap_zone) {
@@ -1436,7 +1436,7 @@
*(MR_ENGINE(e_jmp_buf)));
#endif
- MR_ENGINE(e_exception) = (Word *) exception;
+ MR_ENGINE(e_exception) = (MR_Word *) exception;
save_registers();
longjmp(*(MR_ENGINE(e_jmp_buf)), 1);
}
@@ -1461,7 +1461,7 @@
ENTRY(mercury__exception__builtin_throw_1_0));
}
MR_incr_sp_push_msg(1, ""builtin_throw/1"");
- MR_stackvar(1) = (Word) MR_succip;
+ MR_stackvar(1) = (MR_Word) MR_succip;
call(ENTRY(mercury__do_call_closure),
LABEL(mercury__exception__builtin_throw_1_0_i1),
ENTRY(mercury__exception__builtin_throw_1_0));
@@ -1471,7 +1471,7 @@
/* we've just returned from mercury__do_call_closure */
r2 = r1;
r1 = TRUE;
- MR_succip = (Code *) MR_stackvar(1);
+ MR_succip = (MR_Code *) MR_stackvar(1);
MR_decr_sp_pop_msg(1);
proceed(); /* return to the caller of `builtin_catch' */
Index: library/float.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/float.m,v
retrieving revision 1.30
diff -u -b -r1.30 float.m
--- library/float.m 2000/09/22 01:44:21 1.30
+++ library/float.m 2000/10/15 00:46:04
@@ -379,7 +379,7 @@
:- pragma c_code(float__ceiling_to_int(X :: in) = (Ceil :: out),
[will_not_call_mercury, thread_safe],
"
- Ceil = (Integer) ceil(X);
+ Ceil = (MR_Integer) ceil(X);
").
float__ceiling_to_int(X, float__ceiling_to_int(X)).
@@ -389,7 +389,7 @@
:- pragma c_code(float__floor_to_int(X :: in) = (Floor :: out),
[will_not_call_mercury, thread_safe],
"
- Floor = (Integer) floor(X);
+ Floor = (MR_Integer) floor(X);
").
float__floor_to_int(X, float__floor_to_int(X)).
@@ -399,7 +399,7 @@
:- pragma c_code(float__round_to_int(X :: in) = (Round :: out),
[will_not_call_mercury, thread_safe],
"
- Round = (Integer) floor(X + 0.5);
+ Round = (MR_Integer) floor(X + 0.5);
").
float__round_to_int(X, float__round_to_int(X)).
@@ -409,7 +409,7 @@
:- pragma c_code(float__truncate_to_int(X :: in) = (Trunc :: out),
[will_not_call_mercury, thread_safe],
"
- Trunc = (Integer) X;
+ Trunc = (MR_Integer) X;
").
float__truncate_to_int(X, float__truncate_to_int(X)).
Index: library/int.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/int.m,v
retrieving revision 1.68
diff -u -b -r1.68 int.m
--- library/int.m 2000/05/08 13:48:35 1.68
+++ library/int.m 2000/10/15 00:46:30
@@ -414,25 +414,25 @@
:- pragma c_code(int__max_int(Max::out), will_not_call_mercury, "
- if (sizeof(Integer) == sizeof(int))
+ if (sizeof(MR_Integer) == sizeof(int))
Max = INT_MAX;
- else if (sizeof(Integer) == sizeof(long))
+ else if (sizeof(MR_Integer) == sizeof(long))
Max = LONG_MAX;
else
MR_fatal_error(""Unable to figure out max integer size"");
").
:- pragma c_code(int__min_int(Min::out), will_not_call_mercury, "
- if (sizeof(Integer) == sizeof(int))
+ if (sizeof(MR_Integer) == sizeof(int))
Min = INT_MIN;
- else if (sizeof(Integer) == sizeof(long))
+ else if (sizeof(MR_Integer) == sizeof(long))
Min = LONG_MIN;
else
MR_fatal_error(""Unable to figure out min integer size"");
").
:- pragma c_code(int__bits_per_int(Bits::out), will_not_call_mercury, "
- Bits = sizeof(Integer) * CHAR_BIT;
+ Bits = sizeof(MR_Integer) * CHAR_BIT;
").
%-----------------------------------------------------------------------------%
Index: library/io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.207
diff -u -b -r1.207 io.m
--- library/io.m 2000/10/10 05:36:48 1.207
+++ library/io.m 2000/10/15 03:40:46
@@ -1113,18 +1113,18 @@
% for cases such as `type_name(main)'.
:- pragma c_header_code("
- extern Word ML_io_stream_names;
- extern Word ML_io_user_globals;
+ extern MR_Word ML_io_stream_names;
+ extern MR_Word ML_io_user_globals;
#if 0
- extern Word ML_io_ops_table;
+ extern MR_Word ML_io_ops_table;
#endif
").
:- pragma c_code("
- Word ML_io_stream_names;
- Word ML_io_user_globals;
+ MR_Word ML_io_stream_names;
+ MR_Word ML_io_user_globals;
#if 0
- extern Word ML_io_ops_table;
+ extern MR_Word ML_io_ops_table;
#endif
").
@@ -1362,11 +1362,11 @@
[will_not_call_mercury, thread_safe],
"
#define ML_IO_READ_LINE_GROW(n) ((n) * 3 / 2)
-#define ML_IO_BYTES_TO_WORDS(n) (((n) + sizeof(Word) - 1) / sizeof(Word))
+#define ML_IO_BYTES_TO_WORDS(n) (((n) + sizeof(MR_Word) - 1) / sizeof(MR_Word))
#define ML_IO_READ_LINE_START 1024
- Char initial_read_buffer[ML_IO_READ_LINE_START];
- Char *read_buffer = initial_read_buffer;
+ MR_Char initial_read_buffer[ML_IO_READ_LINE_START];
+ MR_Char *read_buffer = initial_read_buffer;
size_t read_buf_size = ML_IO_READ_LINE_START;
size_t i;
int char_code = '\\0';
@@ -1380,7 +1380,7 @@
}
break;
}
- if (char_code != (Char) char_code) {
+ if (char_code != (MR_Char) char_code) {
Res = -2;
break;
}
@@ -1390,21 +1390,21 @@
/* Grow the read buffer */
read_buf_size = ML_IO_READ_LINE_GROW(read_buf_size);
if (read_buffer == initial_read_buffer) {
- read_buffer = MR_NEW_ARRAY(Char,
+ read_buffer = MR_NEW_ARRAY(MR_Char,
read_buf_size);
memcpy(read_buffer, initial_read_buffer,
ML_IO_READ_LINE_START);
} else {
read_buffer = MR_RESIZE_ARRAY(read_buffer,
- Char, read_buf_size);
+ MR_Char, read_buf_size);
}
}
}
if (Res == 0) {
- incr_hp_atomic_msg(LVALUE_CAST(Word, RetString),
- ML_IO_BYTES_TO_WORDS((i + 1) * sizeof(Char)),
+ incr_hp_atomic_msg(LVALUE_CAST(MR_Word, RetString),
+ ML_IO_BYTES_TO_WORDS((i + 1) * sizeof(MR_Char)),
MR_PROC_LABEL, ""string:string/0"");
- memcpy(RetString, read_buffer, i * sizeof(Char));
+ memcpy(RetString, read_buffer, i * sizeof(MR_Char));
RetString[i] = '\\0';
} else {
RetString = NULL;
@@ -1614,7 +1614,8 @@
[will_not_call_mercury, thread_safe],
"{
incr_hp_atomic_msg(Buffer,
- (Size * sizeof(Char) + sizeof(Word) - 1) / sizeof(Word),
+ (Size * sizeof(MR_Char) + sizeof(MR_Word) - 1)
+ / sizeof(MR_Word),
MR_PROC_LABEL, ""io:buffer/0"");
}").
@@ -1623,26 +1624,28 @@
Buffer::uo),
[will_not_call_mercury, thread_safe],
"{
- Char *buffer0 = (Char *) Buffer0;
- Char *buffer;
+ MR_Char *buffer0 = (MR_Char *) Buffer0;
+ MR_Char *buffer;
#ifdef CONSERVATIVE_GC
- buffer = GC_REALLOC(buffer0, NewSize * sizeof(Char));
+ buffer = GC_REALLOC(buffer0, NewSize * sizeof(MR_Char));
#else
- if (buffer0 + OldSize == (Char *) MR_hp) {
- Word next;
+ if (buffer0 + OldSize == (MR_Char *) MR_hp) {
+ MR_Word next;
incr_hp_atomic_msg(next,
- (NewSize * sizeof(Char) + sizeof(Word) - 1) / sizeof(Word),
+ (NewSize * sizeof(MR_Char) + sizeof(MR_Word) - 1)
+ / sizeof(MR_Word),
MR_PROC_LABEL,
""io:buffer/0"");
- assert(buffer0 + OldSize == (Char *) next);
+ assert(buffer0 + OldSize == (MR_Char *) next);
buffer = buffer0;
} else {
/* just have to alloc and copy */
incr_hp_atomic_msg(Buffer,
- (NewSize * sizeof(Char) + sizeof(Word) - 1) / sizeof(Word),
+ (NewSize * sizeof(MR_Char) + sizeof(MR_Word) - 1)
+ / sizeof(MR_Word),
MR_PROC_LABEL, ""io:buffer/0"");
- buffer = (Char *) Buffer;
+ buffer = (MR_Char *) Buffer;
if (OldSize > NewSize) {
memcpy(buffer, buffer0, NewSize);
} else {
@@ -1651,14 +1654,14 @@
}
#endif
- Buffer = (Word) buffer;
+ Buffer = (MR_Word) buffer;
}").
:- pred io__buffer_to_string(buffer::di, int::in, string::uo) is det.
:- pragma c_code(io__buffer_to_string(Buffer::di, Len::in, Str::uo),
[will_not_call_mercury, thread_safe],
"{
- Str = (String) Buffer;
+ Str = (MR_String) Buffer;
Str[Len] = '\\0';
}").
@@ -1666,7 +1669,7 @@
:- pragma c_code(io__buffer_to_string(Buffer::di, Str::uo),
[will_not_call_mercury, thread_safe],
"{
- Str = (String) Buffer;
+ Str = (MR_String) Buffer;
}").
:- pred io__read_into_buffer(stream::in, buffer::di, int::in, int::in,
@@ -1678,12 +1681,12 @@
[will_not_call_mercury, thread_safe],
"{
MercuryFile *f = (MercuryFile *) Stream;
- char *buffer = (Char *) Buffer0;
+ char *buffer = (MR_Char *) Buffer0;
int items_read;
items_read = MR_READ(*f, buffer + Pos0, Size - Pos0);
- Buffer = (Word) buffer;
+ Buffer = (MR_Word) buffer;
Pos = Pos0 + items_read;
}").
@@ -2832,7 +2835,7 @@
{
va_list args;
char message[5000];
- ConstString message_as_mercury_string;
+ MR_ConstString message_as_mercury_string;
/* the `mf' parameter is currently not used */
@@ -2847,7 +2850,7 @@
save_registers(); /* for MR_hp */
/* call some Mercury code to throw the exception */
- ML_throw_io_error((String) message_as_mercury_string);
+ ML_throw_io_error((MR_String) message_as_mercury_string);
}
").
@@ -3302,55 +3305,55 @@
:- pragma c_code(io__stdin_stream(Stream::out, IO0::di, IO::uo),
[will_not_call_mercury, thread_safe], "
- Stream = (Word) &mercury_stdin;
+ Stream = (MR_Word) &mercury_stdin;
update_io(IO0, IO);
").
:- pragma c_code(io__stdout_stream(Stream::out, IO0::di, IO::uo),
[will_not_call_mercury, thread_safe], "
- Stream = (Word) &mercury_stdout;
+ Stream = (MR_Word) &mercury_stdout;
update_io(IO0, IO);
").
:- pragma c_code(io__stderr_stream(Stream::out, IO0::di, IO::uo),
[will_not_call_mercury, thread_safe], "
- Stream = (Word) &mercury_stderr;
+ Stream = (MR_Word) &mercury_stderr;
update_io(IO0, IO);
").
:- pragma c_code(io__stdin_binary_stream(Stream::out, IO0::di, IO::uo),
[will_not_call_mercury, thread_safe], "
- Stream = (Word) &mercury_stdin_binary;
+ Stream = (MR_Word) &mercury_stdin_binary;
update_io(IO0, IO);
").
:- pragma c_code(io__stdout_binary_stream(Stream::out, IO0::di, IO::uo),
[will_not_call_mercury, thread_safe], "
- Stream = (Word) &mercury_stdout_binary;
+ Stream = (MR_Word) &mercury_stdout_binary;
update_io(IO0, IO);
").
:- pragma c_code(io__input_stream(Stream::out, IO0::di, IO::uo),
will_not_call_mercury, "
- Stream = (Word) mercury_current_text_input;
+ Stream = (MR_Word) mercury_current_text_input;
update_io(IO0, IO);
").
:- pragma c_code(io__output_stream(Stream::out, IO0::di, IO::uo),
will_not_call_mercury, "
- Stream = (Word) mercury_current_text_output;
+ Stream = (MR_Word) mercury_current_text_output;
update_io(IO0, IO);
").
:- pragma c_code(io__binary_input_stream(Stream::out, IO0::di, IO::uo),
will_not_call_mercury, "
- Stream = (Word) mercury_current_binary_input;
+ Stream = (MR_Word) mercury_current_binary_input;
update_io(IO0, IO);
").
:- pragma c_code(io__binary_output_stream(Stream::out, IO0::di, IO::uo),
will_not_call_mercury, "
- Stream = (Word) mercury_current_binary_output;
+ Stream = (MR_Word) mercury_current_binary_output;
update_io(IO0, IO);
").
@@ -3416,7 +3419,7 @@
:- pragma c_code(
io__set_input_stream(NewStream::in, OutStream::out, IO0::di, IO::uo),
will_not_call_mercury, "
- OutStream = (Word) mercury_current_text_input;
+ OutStream = (MR_Word) mercury_current_text_input;
mercury_current_text_input = (MercuryFile *) NewStream;
update_io(IO0, IO);
").
@@ -3424,7 +3427,7 @@
:- pragma c_code(
io__set_output_stream(NewStream::in, OutStream::out, IO0::di, IO::uo),
will_not_call_mercury, "
- OutStream = (Word) mercury_current_text_output;
+ OutStream = (MR_Word) mercury_current_text_output;
mercury_current_text_output = (MercuryFile *) NewStream;
update_io(IO0, IO);
").
@@ -3432,7 +3435,7 @@
:- pragma c_code(
io__set_binary_input_stream(NewStream::in, OutStream::out,
IO0::di, IO::uo), will_not_call_mercury, "
- OutStream = (Word) mercury_current_binary_input;
+ OutStream = (MR_Word) mercury_current_binary_input;
mercury_current_binary_input = (MercuryFile *) NewStream;
update_io(IO0, IO);
").
@@ -3440,7 +3443,7 @@
:- pragma c_code(
io__set_binary_output_stream(NewStream::in, OutStream::out,
IO0::di, IO::uo), will_not_call_mercury, "
- OutStream = (Word) mercury_current_binary_output;
+ OutStream = (MR_Word) mercury_current_binary_output;
mercury_current_binary_output = (MercuryFile *) NewStream;
update_io(IO0, IO);
").
@@ -3455,7 +3458,7 @@
Stream::out, IO0::di, IO::uo),
[will_not_call_mercury, thread_safe],
"
- Stream = (Word) mercury_open(FileName, Mode);
+ Stream = (MR_Word) mercury_open(FileName, Mode);
ResultCode = (Stream ? 0 : -1);
update_io(IO0, IO);
").
@@ -3490,13 +3493,16 @@
io__progname(DefaultProgname::in, PrognameOut::out, IO0::di, IO::uo),
[will_not_call_mercury, thread_safe], "
if (progname) {
- /* The silly casting below is needed to avoid
- a gcc warning about casting away const.
- PrognameOut is of type `String' (char *);
- it should be of type `ConstString' (const char *),
- but fixing that requires a fair bit of work
- on the compiler. */
- MR_make_aligned_string(LVALUE_CAST(ConstString, PrognameOut),
+ /*
+ ** The silly casting below is needed to avoid
+ ** a gcc warning about casting away const.
+ ** PrognameOut is of type `MR_String' (char *);
+ ** it should be of type `MR_ConstString' (const char *),
+ ** but fixing that requires a fair bit of work
+ ** on the compiler.
+ */
+ MR_make_aligned_string(
+ LVALUE_CAST(MR_ConstString, PrognameOut),
progname);
} else {
PrognameOut = DefaultProgname;
@@ -3510,7 +3516,7 @@
{ int i = mercury_argc;
Args = MR_list_empty_msg(MR_PROC_LABEL);
while (--i >= 0) {
- Args = MR_list_cons_msg((Word) mercury_argv[i], Args,
+ Args = MR_list_cons_msg((MR_Word) mercury_argv[i], Args,
MR_PROC_LABEL);
}
}
@@ -3657,8 +3663,8 @@
len = strlen(Dir) + 1 + 5 + 3 + 1 + 3 + 1;
/* Dir + / + Prefix + counter_high + . + counter_low + \\0 */
- incr_hp_atomic_msg(LVALUE_CAST(Word, FileName),
- (len + sizeof(Word)) / sizeof(Word),
+ incr_hp_atomic_msg(LVALUE_CAST(MR_Word, FileName),
+ (len + sizeof(MR_Word)) / sizeof(MR_Word),
MR_PROC_LABEL, ""string:string/0"");
if (ML_io_tempnam_counter == 0) {
ML_io_tempnam_counter = getpid();
@@ -3716,13 +3722,14 @@
do { \\
char *errno_msg; \\
size_t total_len; \\
- Word tmp; \\
+ MR_Word tmp; \\
\\
if (was_error) { \\
errno_msg = strerror(errno); \\
total_len = strlen(msg) + strlen(errno_msg); \\
incr_hp_atomic_msg(tmp, \\
- (total_len + sizeof(Word)) / sizeof(Word), \\
+ (total_len + sizeof(MR_Word)) \\
+ / sizeof(MR_Word), \\
procname, \\
""string:string/0""); \\
(error_msg) = (char *)tmp; \\
Index: library/library.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/library.m,v
retrieving revision 1.50
diff -u -b -r1.50 library.m
--- library/library.m 2000/09/20 12:12:36 1.50
+++ library/library.m 2000/10/15 00:54:12
@@ -48,13 +48,13 @@
% might not have a Mercury compiler around to compile library.m with.
:- pragma c_code(library__version(Version::out), will_not_call_mercury, "
- ConstString version_string =
+ MR_ConstString version_string =
MR_VERSION "", configured for "" MR_FULLARCH;
/*
** Cast away const needed here, because Mercury declares Version
- ** with type String rather than ConstString.
+ ** with type String rather than MR_ConstString.
*/
- Version = (String) (Word) version_string;
+ Version = (MR_String) (MR_Word) version_string;
").
%---------------------------------------------------------------------------%
Index: library/std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.201
diff -u -b -r1.201 std_util.m
--- library/std_util.m 2000/10/04 11:14:01 1.201
+++ library/std_util.m 2000/10/15 07:59:06
@@ -1332,28 +1332,28 @@
*/
#define MR_TYPECTOR_DESC_IS_VARIABLE_ARITY(T) \
( MR_CHECK_EXPR_TYPE(T, MR_TypeCtorDesc), \
- (Unsigned) (T) <= (4 * MR_MAX_VARIABLE_ARITY + 2) )
+ (MR_Unsigned) (T) <= (4 * MR_MAX_VARIABLE_ARITY + 2) )
#define MR_TYPECTOR_DESC_GET_FIXED_ARITY_TYPE_CTOR_INFO(T) \
( MR_CHECK_EXPR_TYPE(T, MR_TypeCtorDesc), \
(MR_TypeCtorInfo) (T) )
#define MR_TYPECTOR_DESC_GET_VA_ARITY(T) \
( MR_CHECK_EXPR_TYPE(T, MR_TypeCtorDesc), \
- (Unsigned) (T) / 4 )
+ (MR_Unsigned) (T) / 4 )
#define MR_TYPECTOR_DESC_GET_VA_NAME(T) \
( MR_CHECK_EXPR_TYPE(T, MR_TypeCtorDesc), \
- (ConstString) (((Unsigned) (T) % 4 == 0) \
+ (MR_ConstString) (((MR_Unsigned) (T) % 4 == 0) \
? ""pred"" \
- : (((Unsigned) (T) % 4 == 1) \
+ : (((MR_Unsigned) (T) % 4 == 1) \
? ""func"" \
: ""{}"" )) )
#define MR_TYPECTOR_DESC_GET_VA_MODULE_NAME(T) \
( MR_CHECK_EXPR_TYPE(T, MR_TypeCtorDesc), \
- (ConstString) ""builtin"" )
+ (MR_ConstString) ""builtin"" )
#define MR_TYPECTOR_DESC_GET_VA_TYPE_CTOR_INFO(T) \
( MR_CHECK_EXPR_TYPE(T, MR_TypeCtorDesc), \
- ((Unsigned) (T) % 4 == 0) \
+ ((MR_Unsigned) (T) % 4 == 0) \
? MR_TYPE_CTOR_INFO_HO_PRED \
- : (((Unsigned) (T) % 4 == 1) \
+ : (((MR_Unsigned) (T) % 4 == 1) \
? MR_TYPE_CTOR_INFO_HO_FUNC \
: MR_TYPE_CTOR_INFO_TUPLE ) )
@@ -1370,8 +1370,8 @@
#define ML_CONSTRUCT_INFO_GUARD
typedef struct ML_Construct_Info_Struct {
- ConstString functor_name;
- Integer arity;
+ MR_ConstString functor_name;
+ MR_Integer arity;
const MR_PseudoTypeInfo *arg_pseudo_type_infos;
MR_TypeCtorRep type_ctor_rep;
union {
@@ -1582,7 +1582,7 @@
{
MR_TypeCtorInfo type_ctor_info;
MR_TypeCtorDesc type_ctor_desc;
- Integer arity;
+ MR_Integer arity;
if (collapse_equivalences) {
type_info = MR_collapse_equivalences(type_info);
@@ -1712,10 +1712,10 @@
** because MR_String is defined as char *, not const char *.
*/
- TypeCtorModuleName =
- (MR_String) (Integer) type_ctor_info->type_ctor_module_name;
- TypeCtorName =
- (MR_String) (Integer) type_ctor_info->type_ctor_name;
+ TypeCtorModuleName = (MR_String) (MR_Integer)
+ type_ctor_info->type_ctor_module_name;
+ TypeCtorName = (MR_String) (MR_Integer)
+ type_ctor_info->type_ctor_name;
TypeCtorArity = type_ctor_info->arity;
}
}
@@ -2448,7 +2448,7 @@
ML_get_num_functors(MR_TypeInfo type_info)
{
MR_TypeCtorInfo type_ctor_info;
- Integer functors;
+ MR_Integer functors;
type_ctor_info = MR_TYPEINFO_GET_TYPE_CTOR_INFO(type_info);
@@ -2555,7 +2555,7 @@
#define ML_EXPAND_INFO_GUARD
typedef struct ML_Expand_Info_Struct {
- ConstString functor;
+ MR_ConstString functor;
int arity;
int num_extra_args;
MR_Word *arg_values;
@@ -3148,7 +3148,7 @@
}
/* Copy functor onto the heap */
- MR_make_aligned_string(LVALUE_CAST(ConstString, Functor),
+ MR_make_aligned_string(LVALUE_CAST(MR_ConstString, Functor),
expand_info.functor);
Arity = expand_info.arity;
@@ -3268,7 +3268,7 @@
}
/* Get functor */
- MR_make_aligned_string(LVALUE_CAST(ConstString, Functor),
+ MR_make_aligned_string(LVALUE_CAST(MR_ConstString, Functor),
expand_info.functor);
/* Get arity */
@@ -3425,7 +3425,7 @@
switch (type_ctor_info->type_ctor_rep) {
case MR_TYPECTOR_REP_ENUM:
case MR_TYPECTOR_REP_ENUM_USEREQ:
- Enum = (Integer) value;
+ Enum = (MR_Integer) value;
SUCCESS_INDICATOR = TRUE;
break;
@@ -3519,7 +3519,8 @@
break;
default:
- fatal_error(""get_du_functor_info: unknown sectag locn"");
+ MR_fatal_error(
+ ""get_du_functor_info: unknown sectag locn"");
}
break;
Index: library/store.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/store.m,v
retrieving revision 1.23
diff -u -b -r1.23 store.m
--- library/store.m 2000/08/09 09:35:49 1.23
+++ library/store.m 2000/10/15 00:41:42
@@ -248,21 +248,21 @@
will_not_call_mercury,
"
incr_hp_msg(Mutvar, 1, MR_PROC_LABEL, ""store:mutvar/2"");
- *(Word *)Mutvar = Val;
+ * (MR_Word *) Mutvar = Val;
S = S0;
").
:- pragma c_code(get_mutvar(Mutvar::in, Val::out, S0::di, S::uo),
will_not_call_mercury,
"
- Val = *(Word *)Mutvar;
+ Val = * (MR_Word *) Mutvar;
S = S0;
").
:- pragma c_code(set_mutvar(Mutvar::in, Val::in, S0::di, S::uo),
will_not_call_mercury,
"
- *(Word *)Mutvar = Val;
+ * (MR_Word *) Mutvar = Val;
S = S0;
").
@@ -288,7 +288,7 @@
will_not_call_mercury,
"
incr_hp_msg(Ref, 1, MR_PROC_LABEL, ""store:ref/2"");
- *(Word *)Ref = Val;
+ * (MR_Word *) Ref = Val;
S = S0;
").
@@ -305,7 +305,7 @@
:- pragma c_code(unsafe_ref_value(Ref::in, Val::uo, S0::di, S::uo),
will_not_call_mercury,
"
- Val = *(Word *)Ref;
+ Val = * (MR_Word *) Ref;
S = S0;
").
@@ -319,8 +319,8 @@
#include ""mercury_misc.h"" /* for MR_fatal_error() */
/* ML_arg() is defined in std_util.m */
- bool ML_arg(MR_TypeInfo term_type_info, Word *term, int arg_index,
- MR_TypeInfo *arg_type_info_ptr, Word **arg_ptr);
+ bool ML_arg(MR_TypeInfo term_type_info, MR_Word *term, int arg_index,
+ MR_TypeInfo *arg_type_info_ptr, MR_Word **arg_ptr);
").
@@ -330,14 +330,14 @@
MR_TypeInfo type_info;
MR_TypeInfo arg_type_info;
MR_TypeInfo exp_arg_type_info;
- Word *arg_ref;
+ MR_Word *arg_ref;
type_info = (MR_TypeInfo) TypeInfo_for_T;
exp_arg_type_info = (MR_TypeInfo) TypeInfo_for_ArgT;
save_transient_registers();
- if (!ML_arg(type_info, (Word *) Ref, ArgNum,
+ if (!ML_arg(type_info, (MR_Word *) Ref, ArgNum,
&arg_type_info, &arg_ref))
{
MR_fatal_error(
@@ -352,7 +352,7 @@
restore_transient_registers();
- ArgRef = (Word) arg_ref;
+ ArgRef = (MR_Word) arg_ref;
S = S0;
}").
@@ -362,14 +362,14 @@
MR_TypeInfo type_info;
MR_TypeInfo arg_type_info;
MR_TypeInfo exp_arg_type_info;
- Word *arg_ref;
+ MR_Word *arg_ref;
type_info = (MR_TypeInfo) TypeInfo_for_T;
exp_arg_type_info = (MR_TypeInfo) TypeInfo_for_ArgT;
save_transient_registers();
- if (!ML_arg(type_info, (Word *) &Val, ArgNum,
+ if (!ML_arg(type_info, (MR_Word *) &Val, ArgNum,
&arg_type_info, &arg_ref))
{
MR_fatal_error(
@@ -394,9 +394,9 @@
if (arg_ref == &Val) {
incr_hp_msg(ArgRef, 1, MR_PROC_LABEL, ""store:ref/2"");
- * (Word *) ArgRef = Val;
+ * (MR_Word *) ArgRef = Val;
} else {
- ArgRef = (Word) arg_ref;
+ ArgRef = (MR_Word) arg_ref;
}
S = S0;
}").
@@ -404,21 +404,21 @@
:- pragma c_code(set_ref(Ref::in, ValRef::in, S0::di, S::uo),
will_not_call_mercury,
"
- * (Word *) Ref = * (Word *) ValRef;
+ * (MR_Word *) Ref = * (MR_Word *) ValRef;
S = S0;
").
:- pragma c_code(set_ref_value(Ref::in, Val::di, S0::di, S::uo),
will_not_call_mercury,
"
- * (Word *) Ref = Val;
+ * (MR_Word *) Ref = Val;
S = S0;
").
:- pragma c_code(extract_ref_value(_S::di, Ref::in, Val::out),
will_not_call_mercury,
"
- Val = * (Word *) Ref;
+ Val = * (MR_Word *) Ref;
").
%-----------------------------------------------------------------------------%
Index: library/string.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/string.m,v
retrieving revision 1.131
diff -u -b -r1.131 string.m
--- library/string.m 2000/09/28 07:40:40 1.131
+++ library/string.m 2000/10/15 03:46:22
@@ -1360,7 +1360,7 @@
IntList = MR_list_empty_msg(MR_PROC_LABEL);
while (p > Str) {
p--;
- IntList = MR_list_cons_msg((UnsignedChar) *p, IntList,
+ IntList = MR_list_cons_msg((MR_UnsignedChar) *p, IntList,
MR_PROC_LABEL);
}
}").
@@ -1564,7 +1564,7 @@
MR_Word tmp;
if (Start < 0) Start = 0;
if (Count <= 0) {
- MR_make_aligned_string(LVALUE_CAST(ConstString, SubString),
+ MR_make_aligned_string(LVALUE_CAST(MR_ConstString, SubString),
"""");
} else {
len = strlen(Str);
@@ -1609,7 +1609,8 @@
MR_Integer len;
MR_Word tmp;
if (Count <= 0) {
- MR_make_aligned_string(LVALUE_CAST(ConstString, Left), """");
+ MR_make_aligned_string(LVALUE_CAST(MR_ConstString, Left),
+ """");
Right = Str;
} else {
len = strlen(Str);
Index: library/table_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/table_builtin.m,v
retrieving revision 1.1
diff -u -b -r1.1 table_builtin.m
--- library/table_builtin.m 2000/09/20 12:12:37 1.1
+++ library/table_builtin.m 2000/10/15 00:47:40
@@ -409,7 +409,7 @@
subgoal->followers->item = subgoal;
subgoal->followers->next = NULL;
subgoal->followers_tail = &(subgoal->followers->next);
- subgoal->answer_table = (Word) NULL;
+ subgoal->answer_table = (MR_Word) NULL;
subgoal->num_ans = 0;
subgoal->answer_list = NULL;
subgoal->answer_list_tail = &subgoal->answer_list;
@@ -490,7 +490,7 @@
table = (MR_TrieNode) T;
- AT = (Word) &(table->MR_subgoal->answer_table);
+ AT = (MR_Word) &(table->MR_subgoal->answer_table);
#else
MR_fatal_error(""minimal model code entered when not enabled"");
#endif
@@ -555,7 +555,7 @@
*(subgoal->answer_list_tail) = answer_node;
subgoal->answer_list_tail = &(answer_node->next_answer);
- Slot = (Word) &(answer_node->answer_data);
+ Slot = (MR_Word) &(answer_node->answer_data);
#endif
").
@@ -596,7 +596,7 @@
if (LOCALS->cur_node == NULL) {
FAIL;
} else {
- A = (Word) &LOCALS->cur_node->answer_data;
+ A = (MR_Word) &LOCALS->cur_node->answer_data;
LOCALS->cur_node = LOCALS->cur_node->next_answer;
SUCCEED;
}
@@ -643,7 +643,7 @@
if (LOCALS->cur_node == NULL) {
FAIL;
} else {
- A = (Word) &LOCALS->cur_node->answer_data;
+ A = (MR_Word) &LOCALS->cur_node->answer_data;
LOCALS->cur_node = LOCALS->cur_node->next_answer;
SUCCEED;
}
@@ -782,8 +782,8 @@
MR_TrieNode table0, table;
table0 = (MR_TrieNode) T0;
- MR_DEBUG_NEW_TABLE_INT(table, table0, (Integer) I);
- T = (Word) table;
+ MR_DEBUG_NEW_TABLE_INT(table, table0, (MR_Integer) I);
+ T = (MR_Word) table;
").
:- pragma c_code(table_lookup_insert_char(T0::in, C::in, T::out),
@@ -791,8 +791,8 @@
MR_TrieNode table0, table;
table0 = (MR_TrieNode) T0;
- MR_DEBUG_NEW_TABLE_CHAR(table, table0, (Integer) C);
- T = (Word) table;
+ MR_DEBUG_NEW_TABLE_CHAR(table, table0, (MR_Integer) C);
+ T = (MR_Word) table;
").
:- pragma c_code(table_lookup_insert_string(T0::in, S::in, T::out),
@@ -800,8 +800,8 @@
MR_TrieNode table0, table;
table0 = (MR_TrieNode) T0;
- MR_DEBUG_NEW_TABLE_STRING(table, table0, (String) S);
- T = (Word) table;
+ MR_DEBUG_NEW_TABLE_STRING(table, table0, (MR_String) S);
+ T = (MR_Word) table;
").
:- pragma c_code(table_lookup_insert_float(T0::in, F::in, T::out),
@@ -810,7 +810,7 @@
table0 = (MR_TrieNode) T0;
MR_DEBUG_NEW_TABLE_FLOAT(table, table0, F);
- T = (Word) table;
+ T = (MR_Word) table;
").
:- pragma c_code(table_lookup_insert_enum(T0::in, R::in, V::in, T::out),
@@ -819,7 +819,7 @@
table0 = (MR_TrieNode) T0;
MR_DEBUG_NEW_TABLE_ENUM(table, table0, R, V);
- T = (Word) table;
+ T = (MR_Word) table;
").
:- pragma c_code(table_lookup_insert_user(T0::in, V::in, T::out),
@@ -828,7 +828,7 @@
table0 = (MR_TrieNode) T0;
MR_DEBUG_NEW_TABLE_ANY(table, table0, (MR_TypeInfo) TypeInfo_for_T, V);
- T = (Word) table;
+ T = (MR_Word) table;
").
:- pragma c_code(table_lookup_insert_poly(T0::in, V::in, T::out),
@@ -837,7 +837,7 @@
table0 = (MR_TrieNode) T0;
MR_DEBUG_NEW_TABLE_ANY(table, table0, (MR_TypeInfo) TypeInfo_for_T, V);
- T = (Word) table;
+ T = (MR_Word) table;
").
:- pragma c_code(table_save_int_ans(T::in, Offset::in, I::in),
@@ -863,7 +863,7 @@
MR_TrieNode table;
table = (MR_TrieNode) T;
- MR_TABLE_SAVE_ANSWER(table, Offset, (Word) S,
+ MR_TABLE_SAVE_ANSWER(table, Offset, (MR_Word) S,
&mercury_data___type_ctor_info_string_0);
").
@@ -874,7 +874,7 @@
table = (MR_TrieNode) T;
#ifdef MR_HIGHLEVEL_CODE
MR_TABLE_SAVE_ANSWER(table, Offset,
- (Word) MR_box_float(F),
+ (MR_Word) MR_box_float(F),
&mercury_data___type_ctor_info_float_0);
#else
MR_TABLE_SAVE_ANSWER(table, Offset,
@@ -896,7 +896,7 @@
MR_TrieNode table;
table = (MR_TrieNode) T;
- I = (Integer) MR_TABLE_GET_ANSWER(table, Offset);
+ I = (MR_Integer) MR_TABLE_GET_ANSWER(table, Offset);
").
:- pragma c_code(table_restore_char_ans(T::in, Offset::in, C::out),
@@ -904,7 +904,7 @@
MR_TrieNode table;
table = (MR_TrieNode) T;
- C = (Char) MR_TABLE_GET_ANSWER(table, Offset);
+ C = (MR_Char) MR_TABLE_GET_ANSWER(table, Offset);
").
:- pragma c_code(table_restore_string_ans(T::in, Offset::in, S::out),
@@ -912,7 +912,7 @@
MR_TrieNode table;
table = (MR_TrieNode) T;
- S = (String) MR_TABLE_GET_ANSWER(table, Offset);
+ S = (MR_String) MR_TABLE_GET_ANSWER(table, Offset);
").
:- pragma c_code(table_restore_float_ans(T::in, Offset::in, F::out),
@@ -932,7 +932,7 @@
MR_TrieNode table;
table = (MR_TrieNode) T;
- V = (Word) MR_TABLE_GET_ANSWER(table, Offset);
+ V = (MR_Word) MR_TABLE_GET_ANSWER(table, Offset);
").
:- pragma c_code(table_create_ans_block(T0::in, Size::in, T::out),
Index: library/time.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/time.m,v
retrieving revision 1.16
diff -u -b -r1.16 time.m
--- library/time.m 1999/11/09 06:16:34 1.16
+++ library/time.m 2000/10/15 00:57:17
@@ -147,7 +147,7 @@
:- import_module int, exception.
-% XXX The assumption that a C `time_t' can fit into a Mercury `Integer'
+% XXX The assumption that a C `time_t' can fit into a Mercury `MR_Integer'
% is not very portable.
:- type time_t == int.
@@ -182,7 +182,7 @@
:- pragma c_code(time__c_clock(Ret::out, IO0::di, IO::uo),
[will_not_call_mercury],
"{
- Ret = (Integer) clock();
+ Ret = (MR_Integer) clock();
update_io(IO0, IO);
}").
@@ -199,7 +199,7 @@
:- pragma c_code(time__c_clocks_per_sec(Ret::out),
[will_not_call_mercury],
"{
- Ret = (Integer) CLOCKS_PER_SEC;
+ Ret = (MR_Integer) CLOCKS_PER_SEC;
}").
%-----------------------------------------------------------------------------%
@@ -226,12 +226,12 @@
#ifdef MR_HAVE_POSIX_TIMES
struct tms t;
- Ret = (Integer) times(&t);
+ Ret = (MR_Integer) times(&t);
- Ut = (Integer) t.tms_utime;
- St = (Integer) t.tms_stime;
- CUt = (Integer) t.tms_cutime;
- CSt = (Integer) t.tms_cstime;
+ Ut = (MR_Integer) t.tms_utime;
+ St = (MR_Integer) t.tms_stime;
+ CUt = (MR_Integer) t.tms_cutime;
+ CSt = (MR_Integer) t.tms_cstime;
#else
Ret = -1;
#endif
@@ -257,7 +257,7 @@
:- pragma c_code(time__c_time(Ret::out, IO0::di, IO::uo),
[will_not_call_mercury],
"{
- Ret = (Integer) time(NULL);
+ Ret = (MR_Integer) time(NULL);
update_io(IO0, IO);
}").
@@ -274,7 +274,7 @@
:- pragma c_code(time__c_difftime(T1::in, T0::in, Diff::out),
[will_not_call_mercury],
"{
- Diff = (Float) difftime((time_t) T1, (time_t) T0);
+ Diff = (MR_Float) difftime((time_t) T1, (time_t) T0);
}").
%-----------------------------------------------------------------------------%
@@ -309,14 +309,14 @@
/* XXX do we need to handle the case where p == NULL here? */
- Sec = (Integer) p->tm_sec;
- Min = (Integer) p->tm_min;
- Hrs = (Integer) p->tm_hour;
- Mnt = (Integer) p->tm_mon;
- Yr = (Integer) p->tm_year;
- WD = (Integer) p->tm_wday;
- YD = (Integer) p->tm_yday;
- N = (Integer) p->tm_isdst;
+ Sec = (MR_Integer) p->tm_sec;
+ Min = (MR_Integer) p->tm_min;
+ Hrs = (MR_Integer) p->tm_hour;
+ Mnt = (MR_Integer) p->tm_mon;
+ Yr = (MR_Integer) p->tm_year;
+ WD = (MR_Integer) p->tm_wday;
+ YD = (MR_Integer) p->tm_yday;
+ N = (MR_Integer) p->tm_isdst;
}").
%:- func time__gmtime(time_t) = tm.
@@ -349,14 +349,14 @@
/* XXX do we need to handle the case where p == NULL here? */
- Sec = (Integer) p->tm_sec;
- Min = (Integer) p->tm_min;
- Hrs = (Integer) p->tm_hour;
- Mnt = (Integer) p->tm_mon;
- Yr = (Integer) p->tm_year;
- WD = (Integer) p->tm_wday;
- YD = (Integer) p->tm_yday;
- N = (Integer) p->tm_isdst;
+ Sec = (MR_Integer) p->tm_sec;
+ Min = (MR_Integer) p->tm_min;
+ Hrs = (MR_Integer) p->tm_hour;
+ Mnt = (MR_Integer) p->tm_mon;
+ Yr = (MR_Integer) p->tm_year;
+ WD = (MR_Integer) p->tm_wday;
+ YD = (MR_Integer) p->tm_yday;
+ N = (MR_Integer) p->tm_isdst;
}").
%-----------------------------------------------------------------------------%
@@ -393,7 +393,7 @@
t.tm_yday = YD;
t.tm_isdst = N;
- Time = (Integer) mktime(&t);
+ Time = (MR_Integer) mktime(&t);
}").
%-----------------------------------------------------------------------------%
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/mercury_bootstrap.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_bootstrap.h,v
retrieving revision 1.15
diff -u -b -r1.15 mercury_bootstrap.h
--- runtime/mercury_bootstrap.h 2000/08/03 06:18:34 1.15
+++ runtime/mercury_bootstrap.h 2000/10/15 08:01:14
@@ -23,7 +23,6 @@
#define MR_TypeCtorInfo_struct MR_TypeCtorInfo_Struct
-
#ifndef MR_NO_BACKWARDS_COMPAT
/*
Index: runtime/mercury_context.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_context.c,v
retrieving revision 1.24
diff -u -b -r1.24 mercury_context.c
--- runtime/mercury_context.c 2000/08/03 06:18:37 1.24
+++ runtime/mercury_context.c 2000/10/15 01:31:26
@@ -197,7 +197,7 @@
void
flounder(void)
{
- fatal_error("computation floundered");
+ MR_fatal_error("computation floundered");
}
/*
@@ -239,7 +239,7 @@
max_id++;
if (max_id == 0) {
- fatal_error("no fd's set!");
+ MR_fatal_error("no fd's set!");
}
if (block) {
@@ -251,7 +251,7 @@
}
if (err < 0) {
- fatal_error("select failed!");
+ MR_fatal_error("select failed!");
}
n_ids = 0;
@@ -273,7 +273,7 @@
#else /* !MR_CAN_DO_PENDING_IO */
- fatal_error("select() unavailable!");
+ MR_fatal_error("select() unavailable!");
#endif
}
@@ -350,7 +350,7 @@
#else /* !MR_THREAD_SAFE */
{
if (MR_runqueue_head == NULL && MR_pending_contexts == NULL) {
- fatal_error("empty runqueue!");
+ MR_fatal_error("empty runqueue!");
}
while (MR_runqueue_head == NULL) {
Index: runtime/mercury_deep_copy_body.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_deep_copy_body.h,v
retrieving revision 1.26
diff -u -b -r1.26 mercury_deep_copy_body.h
--- runtime/mercury_deep_copy_body.h 2000/09/20 03:27:28 1.26
+++ runtime/mercury_deep_copy_body.h 2000/10/15 01:31:56
@@ -292,7 +292,7 @@
break;
default:
- fatal_error("copy(): unknown sectag_locn");
+ MR_fatal_error("copy(): unknown sectag_locn");
} /* end switch on sectag_locn */
}
@@ -331,7 +331,7 @@
** The current version of the RTTI gives all equivalence types
** the EQUIV type_ctor_rep, not EQUIV_VAR.
*/
- fatal_error("unexpected EQUIV_VAR type_ctor_rep");
+ MR_fatal_error("unexpected EQUIV_VAR type_ctor_rep");
break;
case MR_TYPECTOR_REP_INT: /* fallthru */
@@ -522,7 +522,7 @@
break;
case MR_TYPECTOR_REP_VOID:
- fatal_error("Cannot copy a void type");
+ MR_fatal_error("Cannot copy a void type");
break;
case MR_TYPECTOR_REP_ARRAY:
@@ -577,7 +577,7 @@
** `c_pointer' type that points to memory allocated
** on the Mercury heap.
*/
- fatal_error("Cannot copy a c_pointer type");
+ MR_fatal_error("Cannot copy a c_pointer type");
} else {
new_data = data;
}
@@ -595,7 +595,7 @@
** Tyson hasn't yet moved the code for copying saved heap pointers
** here.
*/
- fatal_error("Sorry, not implemented: copying saved heap pointers");
+ MR_fatal_error("Sorry, not implemented: copying saved heap pointers");
break;
case MR_TYPECTOR_REP_CURFR: /* fallthru */
@@ -612,7 +612,7 @@
case MR_TYPECTOR_REP_UNKNOWN: /* fallthru */
default:
- fatal_error("Unknown layout type in deep copy");
+ MR_fatal_error("Unknown layout type in deep copy");
break;
}
Index: runtime/mercury_engine.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_engine.c,v
retrieving revision 1.27
diff -u -b -r1.27 mercury_engine.c
--- runtime/mercury_engine.c 2000/10/03 09:17:39 1.27
+++ runtime/mercury_engine.c 2000/10/15 01:32:09
@@ -688,7 +688,7 @@
MR_succeed_discard();
Define_entry(do_not_reached);
- fatal_error("reached not_reached\n");
+ MR_fatal_error("reached not_reached\n");
Define_entry(exception_handler_do_fail);
/*
Index: runtime/mercury_layout_util.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_layout_util.c,v
retrieving revision 1.18
diff -u -b -r1.18 mercury_layout_util.c
--- runtime/mercury_layout_util.c 2000/08/03 06:18:47 1.18
+++ runtime/mercury_layout_util.c 2000/10/15 01:34:53
@@ -95,7 +95,7 @@
base_sp, base_curfr,
&succeeded);
if (! succeeded) {
- fatal_error("missing type param in "
+ MR_fatal_error("missing type param in "
"MR_materialize_typeinfos_base");
}
}
Index: runtime/mercury_memory.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_memory.c,v
retrieving revision 1.21
diff -u -b -r1.21 mercury_memory.c
--- runtime/mercury_memory.c 2000/10/03 09:17:39 1.21
+++ runtime/mercury_memory.c 2000/10/15 01:32:38
@@ -256,7 +256,7 @@
ptr = malloc(n);
if (ptr == NULL && n != 0) {
- fatal_error("ran out of memory");
+ MR_fatal_error("ran out of memory");
}
return ptr;
@@ -269,7 +269,7 @@
ptr = realloc(old_ptr, num_bytes);
if (ptr == NULL && num_bytes != 0) {
- fatal_error("ran out of memory");
+ MR_fatal_error("ran out of memory");
}
return ptr;
@@ -310,7 +310,7 @@
#endif
if (ptr == NULL && num_bytes != 0) {
- fatal_error("could not allocate memory");
+ MR_fatal_error("could not allocate memory");
}
return ptr;
@@ -328,7 +328,7 @@
#endif
if (ptr == NULL && num_bytes != 0) {
- fatal_error("could not allocate memory");
+ MR_fatal_error("could not allocate memory");
}
return ptr;
@@ -345,7 +345,7 @@
ptr = realloc(old_ptr, num_bytes);
#endif
if (ptr == NULL && num_bytes != 0) {
- fatal_error("ran out of memory");
+ MR_fatal_error("ran out of memory");
}
return ptr;
Index: runtime/mercury_memory_zones.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_memory_zones.c,v
retrieving revision 1.13
diff -u -b -r1.13 mercury_memory_zones.c
--- runtime/mercury_memory_zones.c 2000/08/03 06:18:50 1.13
+++ runtime/mercury_memory_zones.c 2000/10/15 01:33:07
@@ -281,7 +281,7 @@
/* VOID */
}
if (tmp == NULL) {
- fatal_error("memory zone not found!");
+ MR_fatal_error("memory zone not found!");
}
if (prev == NULL) {
used_memory_zones = used_memory_zones->next;
@@ -343,7 +343,7 @@
if (base == NULL) {
char buf[2560];
sprintf(buf, "unable allocate memory zone: %s#%d", name, id);
- fatal_error(buf);
+ MR_fatal_error(buf);
}
return construct_zone(name, id, base, size, offset, redsize, handler);
@@ -358,7 +358,7 @@
size_t total_size;
if (base == NULL) {
- fatal_error("construct_zone called with NULL pointer");
+ MR_fatal_error("construct_zone called with NULL pointer");
}
zone = get_zone();
@@ -397,7 +397,7 @@
sprintf(buf, "unable to set %s#%d redzone\n"
"base=%p, redzone=%p",
zone->name, zone->id, zone->bottom, zone->redzone);
- fatal_error(buf);
+ MR_fatal_error(buf);
}
#endif /* MR_CHECK_OVERFLOW_VIA_MPROTECT */
@@ -412,7 +412,7 @@
"base=%p, hardmax=%p top=%p",
zone->name, zone->id, zone->bottom, zone->hardmax,
zone->top);
- fatal_error(buf);
+ MR_fatal_error(buf);
}
#endif /* MR_PROTECTPAGE */
@@ -432,7 +432,7 @@
sprintf(buf, "unable to reset %s#%d redzone\n"
"base=%p, redzone=%p",
zone->name, zone->id, zone->bottom, zone->redzone);
- fatal_error(buf);
+ MR_fatal_error(buf);
}
#endif /* MR_CHECK_OVERFLOW_VIA_MPROTECT */
}
Index: runtime/mercury_stack_trace.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_stack_trace.c,v
retrieving revision 1.37
diff -u -b -r1.37 mercury_stack_trace.c
--- runtime/mercury_stack_trace.c 2000/10/13 04:06:32 1.37
+++ runtime/mercury_stack_trace.c 2000/10/15 01:33:22
@@ -537,12 +537,12 @@
bool spec)
{
if (! MR_ENTRY_LAYOUT_HAS_PROC_ID(entry)) {
- fatal_error("cannot print procedure id without layout");
+ MR_fatal_error("cannot print procedure id without layout");
}
if (MR_ENTRY_LAYOUT_COMPILER_GENERATED(entry)) {
if (spec) {
- fatal_error("cannot generate specifications "
+ MR_fatal_error("cannot generate specifications "
"for compiler generated procedures");
}
@@ -567,7 +567,7 @@
{
fprintf(fp, "func");
} else {
- fatal_error("procedure is not pred or func");
+ MR_fatal_error("procedure is not pred or func");
}
if (spec) {
@@ -673,7 +673,7 @@
break;
default:
- fatal_error("invalid MR_Context_Position");
+ MR_fatal_error("invalid MR_Context_Position");
}
}
Index: runtime/mercury_tabling.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_tabling.c,v
retrieving revision 1.29
diff -u -b -r1.29 mercury_tabling.c
--- runtime/mercury_tabling.c 2000/10/11 03:00:20 1.29
+++ runtime/mercury_tabling.c 2000/10/15 01:35:52
@@ -481,7 +481,8 @@
#ifdef MR_TABLE_DEBUG
if (key >= range) {
- fatal_error("MR_int_fix_index_lookup_or_add: key out of range");
+ MR_fatal_error(
+ "MR_int_fix_index_lookup_or_add: key out of range");
}
#endif
@@ -510,7 +511,8 @@
#ifdef MR_TABLE_DEBUG
if (key < start) {
- fatal_error("MR_int_start_index_lookup_or_add: small too key");
+ MR_fatal_error(
+ "MR_int_start_index_lookup_or_add: small too key");
}
#endif
@@ -597,7 +599,7 @@
MR_TrieNode
MR_type_class_info_lookup_or_add(MR_TrieNode table, MR_Word *type_class_info)
{
- fatal_error("tabling of typeclass_infos not yet implemented");
+ MR_fatal_error("tabling of typeclass_infos not yet implemented");
return NULL;
}
@@ -668,7 +670,7 @@
arg_vector = (MR_Word *) MR_body(data, ptag) + 1;
break;
default:
- fatal_error("MR_table_type(): unknown sectag_locn");
+ MR_fatal_error("MR_table_type(): unknown sectag_locn");
}
MR_DEBUG_TABLE_ENUM(table,
@@ -769,7 +771,7 @@
** The current version of the RTTI gives all equivalence types
** the EQUIV type_ctor_rep, not EQUIV_VAR.
*/
- fatal_error("unexpected EQUIV_VAR type_ctor_rep");
+ MR_fatal_error("unexpected EQUIV_VAR type_ctor_rep");
break;
case MR_TYPECTOR_REP_INT:
@@ -851,11 +853,11 @@
}
case MR_TYPECTOR_REP_VOID:
- fatal_error("Cannot table a void type");
+ MR_fatal_error("Cannot table a void type");
break;
case MR_TYPECTOR_REP_C_POINTER:
- fatal_error("Attempt to table a C_POINTER");
+ MR_fatal_error("Attempt to table a C_POINTER");
break;
case MR_TYPECTOR_REP_TYPEINFO:
@@ -863,7 +865,7 @@
break;
case MR_TYPECTOR_REP_TYPECLASSINFO:
- fatal_error("Attempt to table a type_class_info");
+ MR_fatal_error("Attempt to table a type_class_info");
break;
case MR_TYPECTOR_REP_ARRAY:
@@ -891,40 +893,40 @@
}
case MR_TYPECTOR_REP_SUCCIP:
- fatal_error("Attempt to table a saved succip");
+ MR_fatal_error("Attempt to table a saved succip");
break;
case MR_TYPECTOR_REP_HP:
- fatal_error("Attempt to table a saved hp");
+ MR_fatal_error("Attempt to table a saved hp");
break;
case MR_TYPECTOR_REP_CURFR:
- fatal_error("Attempt to table a saved curfr");
+ MR_fatal_error("Attempt to table a saved curfr");
break;
case MR_TYPECTOR_REP_MAXFR:
- fatal_error("Attempt to table a saved maxfr");
+ MR_fatal_error("Attempt to table a saved maxfr");
break;
case MR_TYPECTOR_REP_REDOFR:
- fatal_error("Attempt to table a saved redofr");
+ MR_fatal_error("Attempt to table a saved redofr");
break;
case MR_TYPECTOR_REP_REDOIP:
- fatal_error("Attempt to table a saved redoip");
+ MR_fatal_error("Attempt to table a saved redoip");
break;
case MR_TYPECTOR_REP_TRAIL_PTR:
- fatal_error("Attempt to table a saved trail pointer");
+ MR_fatal_error("Attempt to table a saved trail pointer");
break;
case MR_TYPECTOR_REP_TICKET:
- fatal_error("Attempt to table a saved ticket");
+ MR_fatal_error("Attempt to table a saved ticket");
break;
case MR_TYPECTOR_REP_UNKNOWN: /* fallthru */
default:
- fatal_error("Unknown layout tag in table_any");
+ MR_fatal_error("Unknown layout tag in table_any");
break;
}
@@ -992,7 +994,7 @@
restore_transient_registers();
#ifdef MR_HIGHLEVEL_CODE
- fatal_error("sorry, not implemented: "
+ MR_fatal_error("sorry, not implemented: "
"minimal model tabling with --high-level-code");
#else
saved_state->succ_ip = MR_succip;
@@ -1063,7 +1065,7 @@
** The trail handler will be thoroughly confused by such a sequence.
*/
- fatal_error("Sorry, not implemented: "
+ MR_fatal_error("Sorry, not implemented: "
"can't have both minimal model tabling and trailing");
#endif
@@ -1076,7 +1078,7 @@
MR_gen_next, MR_cut_next);
#ifdef MR_HIGHLEVEL_CODE
- fatal_error("sorry, not implemented: "
+ MR_fatal_error("sorry, not implemented: "
"minimal model tabling with --high-level-code");
#else
printf("non region from ");
@@ -1132,7 +1134,7 @@
#ifdef MR_HIGHLEVEL_CODE
- fatal_error("sorry, not implemented: "
+ MR_fatal_error("sorry, not implemented: "
"minimal model tabling with --high-level-code");
#else
Index: runtime/mercury_thread.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_thread.c,v
retrieving revision 1.13
diff -u -b -r1.13 mercury_thread.c
--- runtime/mercury_thread.c 2000/10/02 07:45:04 1.13
+++ runtime/mercury_thread.c 2000/10/15 01:33:32
@@ -43,7 +43,7 @@
#endif
if (err != 0)
- fatal_error("error creating thread");
+ MR_fatal_error("error creating thread");
return thread;
}
@@ -114,7 +114,7 @@
return TRUE;
default:
- fatal_error("init_thread was passed a bad value");
+ MR_fatal_error("init_thread was passed a bad value");
}
}
Index: runtime/mercury_trace_base.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_trace_base.c,v
retrieving revision 1.27
diff -u -b -r1.27 mercury_trace_base.c
--- runtime/mercury_trace_base.c 2000/08/03 06:19:00 1.27
+++ runtime/mercury_trace_base.c 2000/10/15 01:33:52
@@ -139,7 +139,7 @@
void
MR_tracing_not_enabled(void)
{
- fatal_error("This executable is not set up for debugging.\n"
+ MR_fatal_error("This executable is not set up for debugging.\n"
"Rebuild the <main>_init.c file, "
"and give the `-t' (or `--trace')\n"
"option to c2init when you do so. "
Index: runtime/mercury_type_info.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_type_info.h,v
retrieving revision 1.57
diff -u -b -r1.57 mercury_type_info.h
--- runtime/mercury_type_info.h 2000/10/11 03:00:34 1.57
+++ runtime/mercury_type_info.h 2000/10/15 01:30:20
@@ -355,9 +355,9 @@
#define MR_define_univ_fields(univ, typeinfo, value) \
do { \
MR_field(MR_mktag(0), (univ), UNIV_OFFSET_FOR_TYPEINFO) \
- = (Word) (typeinfo); \
+ = (MR_Word) (typeinfo); \
MR_field(MR_mktag(0), (univ), UNIV_OFFSET_FOR_DATA) \
- = (Word) (value); \
+ = (MR_Word) (value); \
} while (0)
/*---------------------------------------------------------------------------*/
@@ -387,9 +387,9 @@
** added to it.
*/
#define MR_typeclass_info_arg_typeclass_info(tci, n) \
- (((Word *)(tci))[(n)])
+ (((MR_Word *)(tci))[(n)])
#define MR_typeclass_info_unconstrained_type_info(tci, n) \
- (((Word *)(tci))[(n)])
+ (((MR_Word *)(tci))[(n)])
/*
** The following have the same definitions. This is because
Index: runtime/mercury_type_tables.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_type_tables.c,v
retrieving revision 1.2
diff -u -b -r1.2 mercury_type_tables.c
--- runtime/mercury_type_tables.c 2000/10/13 05:54:41 1.2
+++ runtime/mercury_type_tables.c 2000/10/15 23:45:05
@@ -52,7 +52,8 @@
/* type_ctor_info has been registered before */
return;
} else {
- MR_fatal_error("MR_register_type_ctor_info: ambiguous type ctor");
+ MR_fatal_error("MR_register_type_ctor_info: "
+ "ambiguous type ctor");
}
}
}
Index: runtime/mercury_unify_compare_body.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_unify_compare_body.h,v
retrieving revision 1.4
diff -u -b -r1.4 mercury_unify_compare_body.h
--- runtime/mercury_unify_compare_body.h 2000/09/18 11:52:36 1.4
+++ runtime/mercury_unify_compare_body.h 2000/10/15 01:30:48
@@ -65,7 +65,7 @@
goto start_label;
case MR_TYPECTOR_REP_EQUIV_VAR:
- fatal_error("found type_ctor_rep MR_TYPECTOR_REP_EQUIV_VAR");
+ MR_fatal_error("found type_ctor_rep MR_TYPECTOR_REP_EQUIV_VAR");
case MR_TYPECTOR_REP_NOTAG:
save_transient_hp();
@@ -509,17 +509,17 @@
}
case MR_TYPECTOR_REP_VOID:
- fatal_error(attempt_msg "terms of type `void'");
+ MR_fatal_error(attempt_msg "terms of type `void'");
case MR_TYPECTOR_REP_PRED:
- fatal_error(attempt_msg "higher-order terms");
+ MR_fatal_error(attempt_msg "higher-order terms");
case MR_TYPECTOR_REP_TYPECLASSINFO:
- fatal_error(attempt_msg "typeclass_infos");
+ MR_fatal_error(attempt_msg "typeclass_infos");
case MR_TYPECTOR_REP_UNKNOWN:
- fatal_error(attempt_msg "terms of unknown type");
+ MR_fatal_error(attempt_msg "terms of unknown type");
default:
- fatal_error(attempt_msg "terms of unknown representation");
+ MR_fatal_error(attempt_msg "terms of unknown representation");
}
Index: runtime/mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.72
diff -u -b -r1.72 mercury_wrapper.c
--- runtime/mercury_wrapper.c 2000/10/11 03:00:46 1.72
+++ runtime/mercury_wrapper.c 2000/10/15 01:34:14
@@ -492,7 +492,7 @@
/* "double quoted" arg - scan until next double quote */
while (*s != '"') {
if (s == '\0') {
- fatal_error(
+ MR_fatal_error(
"Mercury runtime: unterminated quoted string\n"
"in MERCURY_OPTIONS environment variable\n"
);
@@ -1262,7 +1262,7 @@
MR_stack_trace_bottom = LABEL(global_success);
if (program_entry_point == NULL) {
- fatal_error("no program entry point supplied");
+ MR_fatal_error("no program entry point supplied");
}
#ifdef PROFILE_TIME
@@ -1381,7 +1381,7 @@
if (MR_address_of_do_load_aditi_rl_code != NULL) {
return (*MR_address_of_do_load_aditi_rl_code)();
} else {
- fatal_error(
+ MR_fatal_error(
"attempt to load Aditi-RL code from an executable\n"
"not compiled for Aditi execution.\n"
"Add `--aditi' to C2INITFLAGS.\n"
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
Index: trace/mercury_trace.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace.c,v
retrieving revision 1.27
diff -u -b -r1.27 mercury_trace.c
--- trace/mercury_trace.c 2000/10/13 04:06:45 1.27
+++ trace/mercury_trace.c 2000/10/15 09:06:26
@@ -60,8 +60,8 @@
TRUE /* must check */
};
-Code *MR_trace_real(const MR_Stack_Layout_Label *layout);
-static Code *MR_trace_event(MR_Trace_Cmd_Info *cmd, bool interactive,
+MR_Code *MR_trace_real(const MR_Stack_Layout_Label *layout);
+static MR_Code *MR_trace_event(MR_Trace_Cmd_Info *cmd, bool interactive,
const MR_Stack_Layout_Label *layout,
MR_Trace_Port port, MR_Unsigned seqno,
MR_Unsigned depth);
@@ -102,7 +102,7 @@
** compiled code whenever an event to be traced occurs.
*/
-Code *
+MR_Code *
MR_trace_real(const MR_Stack_Layout_Label *layout)
{
MR_Integer maybe_from_full;
@@ -323,7 +323,7 @@
** MR_trace_event().
*/
-static Code *
+static MR_Code *
MR_trace_interrupt(const MR_Stack_Layout_Label *layout)
{
MR_Unsigned seqno;
@@ -368,12 +368,12 @@
MR_trace_func_ptr = MR_trace_interrupt;
}
-static Code *
+static MR_Code *
MR_trace_event(MR_Trace_Cmd_Info *cmd, bool interactive,
const MR_Stack_Layout_Label *layout, MR_Trace_Port port,
MR_Unsigned seqno, MR_Unsigned depth)
{
- Code *jumpaddr;
+ MR_Code *jumpaddr;
MR_Event_Info event_info;
MR_Word *saved_regs = event_info.MR_saved_regs;
int max_r_num;
@@ -440,7 +440,7 @@
MR_Retry_Result
MR_trace_retry(MR_Event_Info *event_info, MR_Event_Details *event_details,
- int ancestor_level, const char **problem, Code **jumpaddr)
+ int ancestor_level, const char **problem, MR_Code **jumpaddr)
{
MR_Word *base_sp;
MR_Word *base_curfr;
@@ -864,7 +864,7 @@
const MR_Stack_Layout_Entry *proc_layout;
MR_Word *top_maxfr;
MR_Word *cur_maxfr;
- Code *redoip;
+ MR_Code *redoip;
MR_TrieNode trienode;
MR_Subgoal *subgoal;
MR_Subgoal *leader;
@@ -1047,7 +1047,7 @@
** to MR_undo_updates_of_maxfr ...
*/
- fatal_error("proc layout without exec trace "
+ MR_fatal_error("proc layout without exec trace "
"in MR_maybe_record_call_table");
}
@@ -1091,7 +1091,8 @@
return;
}
- fatal_error("unknown evaluation method in MR_maybe_record_call_table");
+ MR_fatal_error(
+ "unknown evaluation method in MR_maybe_record_call_table");
}
static void
Index: trace/mercury_trace.h
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace.h,v
retrieving revision 1.16
diff -u -b -r1.16 mercury_trace.h
--- trace/mercury_trace.h 2000/10/13 04:06:45 1.16
+++ trace/mercury_trace.h 2000/10/15 09:05:25
@@ -113,7 +113,7 @@
extern MR_Retry_Result MR_trace_retry(MR_Event_Info *event_info,
MR_Event_Details *event_details,
int ancestor_level, const char **problem,
- Code **jumpaddr);
+ MR_Code **jumpaddr);
/*
** MR_trace_cmd says what mode the tracer is in, i.e. how events should be
Index: trace/mercury_trace_declarative.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_declarative.c,v
retrieving revision 1.31
diff -u -b -r1.31 mercury_trace_declarative.c
--- trace/mercury_trace_declarative.c 2000/10/13 04:06:46 1.31
+++ trace/mercury_trace_declarative.c 2000/10/15 10:19:55
@@ -113,10 +113,10 @@
** be switched back into interactive mode.
*/
-static Unsigned MR_edt_max_depth;
-static Unsigned MR_edt_last_event;
+static MR_Unsigned MR_edt_max_depth;
+static MR_Unsigned MR_edt_last_event;
static bool MR_edt_inside;
-static Unsigned MR_edt_start_seqno;
+static MR_Unsigned MR_edt_start_seqno;
/*
** This is used as the abstract map from node identifiers to nodes
@@ -125,7 +125,7 @@
** updated, before being passed to Mercury code again.
*/
-static Unsigned MR_trace_node_store;
+static MR_Unsigned MR_trace_node_store;
/*
** The front end state is stored here in between calls to it.
@@ -231,24 +231,25 @@
MR_decl_atom_args(const MR_Stack_Layout_Label *layout, MR_Word *saved_regs);
static const char *
-MR_trace_start_collecting(Unsigned event, Unsigned seqno, Unsigned maxdepth,
+MR_trace_start_collecting(MR_Unsigned event, MR_Unsigned seqno,
+ MR_Unsigned maxdepth,
MR_Trace_Cmd_Info *cmd, MR_Event_Info *event_info,
- MR_Event_Details *event_details, Code **jumpaddr);
+ MR_Event_Details *event_details, MR_Code **jumpaddr);
-static Code *
-MR_trace_restart_decl_debug(Unsigned event, Unsigned seqno,
+static MR_Code *
+MR_trace_restart_decl_debug(MR_Unsigned event, MR_Unsigned seqno,
MR_Trace_Cmd_Info *cmd, MR_Event_Info *event_info,
MR_Event_Details *event_details);
-static Code *
+static MR_Code *
MR_decl_diagnosis(MR_Trace_Node root, MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info, MR_Event_Details *event_details);
static void
MR_decl_diagnosis_test(MR_Trace_Node root);
-static Code *
-MR_decl_handle_bug_found(Unsigned event, MR_Trace_Cmd_Info *cmd,
+static MR_Code *
+MR_decl_handle_bug_found(MR_Unsigned event, MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info, MR_Event_Details *event_details);
static MR_String
@@ -257,7 +258,7 @@
static MR_Trace_Port
MR_trace_node_port(MR_Trace_Node node);
-static Unsigned
+static MR_Unsigned
MR_trace_node_seqno(MR_Trace_Node node);
static MR_Trace_Node
@@ -275,11 +276,11 @@
static void
MR_decl_checkpoint_loc(const char *str, MR_Trace_Node node);
-Code *
+MR_Code *
MR_trace_decl_debug(MR_Trace_Cmd_Info *cmd, MR_Event_Info *event_info)
{
MR_Stack_Layout_Entry *entry;
- Unsigned depth;
+ MR_Unsigned depth;
MR_Trace_Node trace;
MR_Event_Details event_details;
@@ -600,7 +601,7 @@
{
MR_Trace_Node node;
MR_Trace_Node call;
- Word last_interface;
+ MR_Word last_interface;
#ifdef MR_USE_DECL_STACK_SLOT
call = MR_trace_decl_get_slot(event_info->MR_event_sll->MR_sll_entry,
@@ -1133,12 +1134,12 @@
bool
MR_trace_start_decl_debug(const char *outfile, MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info, MR_Event_Details *event_details,
- Code **jumpaddr)
+ MR_Code **jumpaddr)
{
MR_Retry_Result result;
MR_Stack_Layout_Entry *entry;
FILE *out;
- Unsigned depth_limit;
+ MR_Unsigned depth_limit;
const char *message;
entry = event_info->MR_event_sll->MR_sll_entry;
@@ -1204,14 +1205,14 @@
}
}
-static Code *
-MR_trace_restart_decl_debug(Unsigned event, Unsigned seqno,
+static MR_Code *
+MR_trace_restart_decl_debug(MR_Unsigned event, MR_Unsigned seqno,
MR_Trace_Cmd_Info *cmd, MR_Event_Info *event_info,
MR_Event_Details *event_details)
{
- Unsigned depth_limit;
+ MR_Unsigned depth_limit;
const char *message;
- Code *jumpaddr;
+ MR_Code *jumpaddr;
depth_limit = MR_edt_max_depth + MR_EDT_DEPTH_STEP_SIZE;
message = MR_trace_start_collecting(event, seqno, depth_limit,
@@ -1229,9 +1230,10 @@
}
static const char *
-MR_trace_start_collecting(Unsigned event, Unsigned seqno, Unsigned maxdepth,
+MR_trace_start_collecting(MR_Unsigned event, MR_Unsigned seqno,
+ MR_Unsigned maxdepth,
MR_Trace_Cmd_Info *cmd, MR_Event_Info *event_info,
- MR_Event_Details *event_details, Code **jumpaddr)
+ MR_Event_Details *event_details, MR_Code **jumpaddr)
{
const char *problem;
MR_Retry_Result retry_result;
@@ -1279,16 +1281,16 @@
return NULL;
}
-static Code *
+static MR_Code *
MR_decl_diagnosis(MR_Trace_Node root, MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info, MR_Event_Details *event_details)
{
MR_Word response;
bool bug_found;
bool require_subtree;
- Unsigned bug_event;
- Unsigned final_event;
- Unsigned topmost_seqno;
+ MR_Unsigned bug_event;
+ MR_Unsigned final_event;
+ MR_Unsigned topmost_seqno;
#if 0
/*
@@ -1333,13 +1335,13 @@
return MR_trace_event_internal(cmd, TRUE, event_info);
}
-static Code *
-MR_decl_handle_bug_found(Unsigned bug_event, MR_Trace_Cmd_Info *cmd,
+static MR_Code *
+MR_decl_handle_bug_found(MR_Unsigned bug_event, MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info, MR_Event_Details *event_details)
{
const char *problem;
MR_Retry_Result retry_result;
- Code *jumpaddr;
+ MR_Code *jumpaddr;
/*
** Perform a retry to get to somewhere before the
@@ -1418,10 +1420,10 @@
return port;
}
-static Unsigned
+static MR_Unsigned
MR_trace_node_seqno(MR_Trace_Node node)
{
- Unsigned seqno;
+ MR_Unsigned seqno;
MR_trace_node_store++;
MR_TRACE_CALL_MERCURY(
Index: trace/mercury_trace_declarative.h
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_declarative.h,v
retrieving revision 1.10
diff -u -b -r1.10 mercury_trace_declarative.h
--- trace/mercury_trace_declarative.h 2000/08/03 06:19:26 1.10
+++ trace/mercury_trace_declarative.h 2000/10/15 09:44:28
@@ -15,7 +15,7 @@
** MR_trace_decl_debug for each event.
*/
-extern Code *MR_trace_decl_debug(MR_Trace_Cmd_Info *cmd,
+extern MR_Code *MR_trace_decl_debug(MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info);
/*
@@ -27,7 +27,7 @@
extern bool MR_trace_start_decl_debug(const char *out,
MR_Trace_Cmd_Info *cmd, MR_Event_Info *event_info,
- MR_Event_Details *event_details, Code **jumpaddr);
+ MR_Event_Details *event_details, MR_Code **jumpaddr);
/*
** The following macros are provided to help C code manipulate the
Index: trace/mercury_trace_external.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_external.c,v
retrieving revision 1.43
diff -u -b -r1.43 mercury_trace_external.c
--- trace/mercury_trace_external.c 2000/10/13 04:06:47 1.43
+++ trace/mercury_trace_external.c 2000/10/15 10:21:00
@@ -169,12 +169,13 @@
MR_Integer *debugger_request_type_ptr);
static bool MR_found_match(const MR_Stack_Layout_Label *layout,
- MR_Trace_Port port, Unsigned seqno, Unsigned depth,
+ MR_Trace_Port port, MR_Unsigned seqno,
+ MR_Unsigned depth,
/* XXX registers */
const char *path, MR_Word search_data);
static void MR_output_current_slots(const MR_Stack_Layout_Label *layout,
- MR_Trace_Port port, Unsigned seqno, Unsigned depth,
- const char *path);
+ MR_Trace_Port port, MR_Unsigned seqno,
+ MR_Unsigned depth, const char *path);
static void MR_output_current_vars(MR_Word var_list, MR_Word string_list);
static void MR_output_current_nth_var(MR_Word var);
static void MR_output_current_live_var_names(MR_Word var_names_list,
@@ -201,10 +202,12 @@
static void MR_get_variable_name(MR_Word debugger_request,
MR_String *var_name_ptr);
static void MR_trace_browse_one_external(MR_Var_Spec which_var);
-static void MR_COLLECT_filter(void (*filter_ptr)(MR_Integer, MR_Integer, MR_Integer,
- MR_Word, MR_Word, MR_String, MR_String, MR_String, MR_Integer, MR_Integer,
- MR_Word, MR_Integer, MR_String, MR_Word, MR_Word *, MR_Char *), Unsigned seqno,
- Unsigned depth, MR_Trace_Port port,
+static void MR_COLLECT_filter(void (*filter_ptr)(MR_Integer, MR_Integer,
+ MR_Integer, MR_Word, MR_Word, MR_String, MR_String,
+ MR_String, MR_Integer, MR_Integer, MR_Word, MR_Integer,
+ MR_String, MR_Word, MR_Word *, MR_Char *),
+ MR_Unsigned seqno, MR_Unsigned depth,
+ MR_Trace_Port port,
const MR_Stack_Layout_Label *layout, const char *path,
bool *stop_collecting);
static void MR_send_collect_result(void);
@@ -470,14 +473,17 @@
*/
}
-Code *
+MR_Code *
MR_trace_event_external(MR_Trace_Cmd_Info *cmd, MR_Event_Info *event_info)
{
static MR_Word search_data;
static void (*initialize_ptr)(MR_Word *);
- static void (*filter_ptr)(MR_Integer, MR_Integer, MR_Integer, MR_Word,
- MR_Word, MR_String, MR_String, MR_String, MR_Integer,
- MR_Integer, MR_Word, MR_Integer, MR_String, MR_Word, MR_Word *, MR_Char *);
+ static void (*filter_ptr)(MR_Integer, MR_Integer,
+ MR_Integer, MR_Word, MR_Word,
+ MR_String, MR_String, MR_String,
+ MR_Integer, MR_Integer, MR_Word,
+ MR_Integer, MR_String, MR_Word,
+ MR_Word *, MR_Char *);
static void (*get_collect_var_type_ptr)(MR_Word *);
static bool collect_linked = FALSE;
bool stop_collecting = FALSE;
@@ -487,13 +493,13 @@
MR_Word var_names_list;
MR_Word type_list;
MR_Word var;
- Code *jumpaddr = NULL;
+ MR_Code *jumpaddr = NULL;
MR_Event_Details event_details;
const char *message;
bool include_trace_data = TRUE;
const MR_Stack_Layout_Label *layout = event_info->MR_event_sll;
- Unsigned seqno = event_info->MR_call_seqno;
- Unsigned depth = event_info->MR_call_depth;
+ MR_Unsigned seqno = event_info->MR_call_seqno;
+ MR_Unsigned depth = event_info->MR_call_depth;
MR_Trace_Port port = event_info->MR_trace_port;
const char *path = event_info->MR_event_path;
MR_Word *saved_regs = event_info->MR_saved_regs;
@@ -901,7 +907,8 @@
static void
MR_output_current_slots(const MR_Stack_Layout_Label *layout,
- MR_Trace_Port port, Unsigned seqno, Unsigned depth, const char *path)
+ MR_Trace_Port port, MR_Unsigned seqno, MR_Unsigned depth,
+ const char *path)
{
if (MR_ENTRY_LAYOUT_COMPILER_GENERATED(layout->MR_sll_entry)) {
MR_TRACE_CALL_MERCURY(
@@ -996,7 +1003,7 @@
static bool
MR_found_match(const MR_Stack_Layout_Label *layout,
- MR_Trace_Port port, Unsigned seqno, Unsigned depth,
+ MR_Trace_Port port, MR_Unsigned seqno, MR_Unsigned depth,
/* XXX live vars */
const char *path, MR_Word search_data)
{
@@ -1466,9 +1473,10 @@
** and dynamically link with the execution.
*/
static void
-MR_COLLECT_filter(void (*filter_ptr)(MR_Integer, MR_Integer, MR_Integer, MR_Word, MR_Word,
- MR_String, MR_String, MR_String, MR_Integer, MR_Integer, MR_Word, MR_Integer, MR_String, MR_Word,
- MR_Word *, MR_Char *), Unsigned seqno, Unsigned depth, MR_Trace_Port port,
+MR_COLLECT_filter(void (*filter_ptr)(MR_Integer, MR_Integer, MR_Integer,
+ MR_Word, MR_Word, MR_String, MR_String, MR_String, MR_Integer,
+ MR_Integer, MR_Word, MR_Integer, MR_String, MR_Word, MR_Word *,
+ MR_Char *), MR_Unsigned seqno, MR_Unsigned depth, MR_Trace_Port port,
const MR_Stack_Layout_Label *layout, const char *path,
bool *stop_collecting)
{
Index: trace/mercury_trace_external.h
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_external.h,v
retrieving revision 1.7
diff -u -b -r1.7 mercury_trace_external.h
--- trace/mercury_trace_external.h 2000/05/15 16:37:49 1.7
+++ trace/mercury_trace_external.h 2000/10/15 09:44:52
@@ -8,7 +8,7 @@
#define MERCURY_TRACE_EXTERNAL_H
#include "mercury_conf.h" /* for MR_USE_EXTERNAL_DEBUGGER */
-#include "mercury_types.h" /* for Code */
+#include "mercury_types.h" /* for MR_Code */
#include "mercury_library_types.h" /* for MercuryFile */
#include "mercury_trace.h" /* for MR_Trace_Cmd_Info, etc. */
@@ -17,7 +17,7 @@
extern void MR_trace_init_external(void);
extern void MR_trace_final_external(void);
-extern Code *MR_trace_event_external(MR_Trace_Cmd_Info *cmd,
+extern MR_Code *MR_trace_event_external(MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info);
/*
Index: trace/mercury_trace_internal.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_internal.c,v
retrieving revision 1.83
diff -u -b -r1.83 mercury_trace_internal.c
--- trace/mercury_trace_internal.c 2000/10/13 04:06:48 1.83
+++ trace/mercury_trace_internal.c 2000/10/15 09:45:43
@@ -150,10 +150,10 @@
static void MR_trace_internal_init_from_home_dir(void);
static MR_Next MR_trace_debug_cmd(char *line, MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info,
- MR_Event_Details *event_details, Code **jumpaddr);
+ MR_Event_Details *event_details, MR_Code **jumpaddr);
static MR_Next MR_trace_handle_cmd(char **words, int word_count,
MR_Trace_Cmd_Info *cmd, MR_Event_Info *event_info,
- MR_Event_Details *event_details, Code **jumpaddr);
+ MR_Event_Details *event_details, MR_Code **jumpaddr);
static bool MR_parse_source_locn(char *word, const char **file, int *line);
static bool MR_trace_options_strict_print(MR_Trace_Cmd_Info *cmd,
char ***words, int *word_count,
@@ -198,11 +198,11 @@
static bool MR_trace_valid_command(const char *word);
-Code *
+MR_Code *
MR_trace_event_internal(MR_Trace_Cmd_Info *cmd, bool interactive,
MR_Event_Info *event_info)
{
- Code *jumpaddr;
+ MR_Code *jumpaddr;
char *line;
MR_Next res;
MR_Event_Details event_details;
@@ -483,7 +483,7 @@
static MR_Next
MR_trace_debug_cmd(char *line, MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info, MR_Event_Details *event_details,
- Code **jumpaddr)
+ MR_Code **jumpaddr)
{
char **words;
char **orig_words = NULL;
@@ -542,7 +542,7 @@
static MR_Next
MR_trace_handle_cmd(char **words, int word_count, MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info, MR_Event_Details *event_details,
- Code **jumpaddr)
+ MR_Code **jumpaddr)
{
const MR_Stack_Layout_Label *layout;
MR_Word *saved_regs;
@@ -597,7 +597,7 @@
MR_trace_usage("forward", "goto");
}
} else if (streq(words[0], "next")) {
- Unsigned depth = event_info->MR_call_depth;
+ MR_Unsigned depth = event_info->MR_call_depth;
int stop_depth;
int n;
@@ -628,7 +628,7 @@
return STOP_INTERACTING;
}
} else if (streq(words[0], "finish")) {
- Unsigned depth = event_info->MR_call_depth;
+ MR_Unsigned depth = event_info->MR_call_depth;
int stop_depth;
int n;
@@ -661,7 +661,7 @@
} else if (streq(words[0], "fail")) {
MR_Determinism detism = event_info->MR_event_sll->
MR_sll_entry->MR_sle_detism;
- Unsigned depth = event_info->MR_call_depth;
+ MR_Unsigned depth = event_info->MR_call_depth;
int stop_depth;
int n;
@@ -886,7 +886,7 @@
return KEEP_INTERACTING;
}
- fatal_error("unrecognized retry result");
+ MR_fatal_error("unrecognized retry result");
} else if (streq(words[0], "level")) {
int n;
@@ -2598,7 +2598,7 @@
}
}
-Code *
+MR_Code *
MR_trace_event_internal_report(MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info)
{
Index: trace/mercury_trace_internal.h
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_internal.h,v
retrieving revision 1.12
diff -u -b -r1.12 mercury_trace_internal.h
--- trace/mercury_trace_internal.h 2000/08/26 04:34:33 1.12
+++ trace/mercury_trace_internal.h 2000/10/15 09:05:04
@@ -8,7 +8,7 @@
#define MERCURY_TRACE_INTERNAL_H
#include "mercury_conf.h" /* for MR_USE_DECLARATIVE_DEBUGGER */
-#include "mercury_types.h" /* for Code */
+#include "mercury_types.h" /* for MR_Code */
#include "mercury_trace.h" /* for MR_Event_Info, etc. */
#include "mercury_std.h" /* for bool */
@@ -36,11 +36,11 @@
#endif /* MR_USE_DECLARATIVE_DEBUGGER */
-extern Code *MR_trace_event_internal(MR_Trace_Cmd_Info *cmd,
+extern MR_Code *MR_trace_event_internal(MR_Trace_Cmd_Info *cmd,
bool interactive, MR_Event_Info *event_info);
-extern Code *MR_trace_event_internal_report(MR_Trace_Cmd_Info *cmd,
+extern MR_Code *MR_trace_event_internal_report(MR_Trace_Cmd_Info *cmd,
MR_Event_Info *event_info);
/*
cvs diff: Diffing trax
cvs diff: Diffing trial
cvs diff: Diffing util
--------------------------------------------------------------------------
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