[m-dev.] trivial diff: add more MR_ prefixes
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Oct 26 23:01:03 AEST 1999
Estimated hours taken: 1
library/builtin.m:
compiler/fact_table.m:
tests/hard_coded/typeclasses/existential_type_classes.m:
Add missing `MR_' prefixes.
compiler/fact_table.m:
Fix a couple more occurrences of the same bug
(wrong label name in init_label()) that I recently fixed.
Workspace: /home/mercury0/fjh/mercury
Index: compiler/fact_table.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/fact_table.m,v
retrieving revision 1.27
diff -u -d -r1.27 fact_table.m
--- fact_table.m 1999/09/29 04:50:17 1.27
+++ fact_table.m 1999/10/26 12:58:58
@@ -617,11 +617,11 @@
#if TAGBITS >= 2
- #define FACT_TABLE_MAKE_TAGGED_INDEX(i,t) mkword(mktag(t), mkbody(i))
- #define FACT_TABLE_MAKE_TAGGED_POINTER(p,t) mkword(mktag(t), p)
- #define FACT_TABLE_HASH_ENTRY_TYPE(p) tag((Word)((p).index))
- #define FACT_TABLE_HASH_INDEX(w) unmkbody(w)
- #define FACT_TABLE_HASH_POINTER(w) body(w,tag(w))
+ #define FACT_TABLE_MAKE_TAGGED_INDEX(i,t) MR_mkword(MR_mktag(t), MR_mkbody(i))
+ #define FACT_TABLE_MAKE_TAGGED_POINTER(p,t) MR_mkword(MR_mktag(t), p)
+ #define FACT_TABLE_HASH_ENTRY_TYPE(p) MR_tag((Word)((p).index))
+ #define FACT_TABLE_HASH_INDEX(w) MR_unmkbody(w)
+ #define FACT_TABLE_HASH_POINTER(w) MR_body(w,tag(w))
#else
#define FACT_TABLE_MAKE_TAGGED_INDEX(i,t) ((const Word *) i), (t)
#define FACT_TABLE_MAKE_TAGGED_POINTER(p,t) ((const Word *) p), (t)
@@ -2532,14 +2532,14 @@
BEGIN_MODULE(%s_module)
init_entry(%s);
- init_label(%s_i);
+ init_label(%s_i1);
BEGIN_CODE
Define_entry(%s);
- mkframe(""%s/%d"", 1, LABEL(%s_i1));
+ MR_mkframe(""%s/%d"", 1, LABEL(%s_i1));
MR_framevar(1) = (Integer) 0;
GOTO(LABEL(%s_i1));
Define_label(%s_i1);
- if (MR_framevar(1) >= %s) fail();
+ if (MR_framevar(1) >= %s) MR_fail();
{
/* declare argument vars */
%s
@@ -2550,7 +2550,7 @@
%s
}
MR_framevar(1)++;
- succeed();
+ MR_succeed();
END_MODULE
extern ModuleFunc %s_module;
@@ -2611,8 +2611,8 @@
** then jump to the code where the work is actually done.
*/
- maxfr = curprevfr;
- curfr = cursuccfr;
+ MR_maxfr = MR_prevfr_slot(MR_curfr)
+ MR_curfr = MR_succfr_slot(MR_curfr)
{
Declare_entry(%s);
GOTO(ENTRY(%s));
@@ -3045,10 +3045,10 @@
BEGIN_MODULE(%s_module)
init_entry(%s);
- init_label(%s_i);
+ init_label(%s_i1);
BEGIN_CODE
Define_entry(%s);
- mkframe(""%s/%d"", %d, LABEL(%s_i1));
+ MR_mkframe(""%s/%d"", %d, LABEL(%s_i1));
{
/* create argument vars */
%s
@@ -3066,13 +3066,13 @@
/* save output args to registers */
%s
MR_framevar(1) = ind + 1;
- succeed();
+ MR_succeed();
failure_code_%s:
- fail();
+ MR_fail();
}
Define_label(%s_i1);
if (MR_framevar(1) >= %s)
- fail();
+ MR_fail();
{
/* create argument vars */
%s
@@ -3089,7 +3089,7 @@
%s
}
MR_framevar(1)++;
- succeed();
+ MR_succeed();
END_MODULE
extern ModuleFunc %s_module;
@@ -3345,10 +3345,10 @@
BEGIN_MODULE(%s_module)
init_entry(%s);
- init_label(%s_i);
+ init_label(%s_i1);
BEGIN_CODE
Define_entry(%s);
- mkframe(""%s/%d"", 4, LABEL(%s_i1));
+ MR_mkframe(""%s/%d"", 4, LABEL(%s_i1));
{
/* create argument vars */
%s
@@ -3368,9 +3368,9 @@
MR_framevar(2) = (Word) current_table;
MR_framevar(3) = (Word) keytype;
MR_framevar(4) = current_key;
- succeed();
+ MR_succeed();
failure_code_%s:
- fail();
+ MR_fail();
}
Define_label(%s_i1);
{
@@ -3403,9 +3403,9 @@
%s
if (hashval == -1) succeed_discard();
MR_framevar(1) = hashval;
- succeed();
+ MR_succeed();
failure_code_%s:
- fail();
+ MR_fail();
}
END_MODULE
Index: library/builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/builtin.m,v
retrieving revision 1.23
diff -u -d -r1.23 builtin.m
--- builtin.m 1999/10/20 07:03:10 1.23
+++ builtin.m 1999/10/26 09:24:03
@@ -365,7 +365,7 @@
TYPE_LAYOUT_FIELDS
} mercury_data___type_ctor_layout_trail_ptr_0 = {
make_typelayout_for_all_tags(TYPE_CTOR_LAYOUT_CONST_TAG,
- mkbody(MR_TYPE_CTOR_LAYOUT_TRAIL_PTR_VALUE))
+ MR_mkbody(MR_TYPE_CTOR_LAYOUT_TRAIL_PTR_VALUE))
};
/* type_ctor_layout for `ticket' (only used by agc and debugger) */
@@ -375,7 +375,7 @@
TYPE_LAYOUT_FIELDS
} mercury_data___type_ctor_layout_ticket_0 = {
make_typelayout_for_all_tags(TYPE_CTOR_LAYOUT_CONST_TAG,
- mkbody(MR_TYPE_CTOR_LAYOUT_TICKET_VALUE))
+ MR_mkbody(MR_TYPE_CTOR_LAYOUT_TICKET_VALUE))
};
/* type_ctor_functors definitions */
Index: tests/hard_coded/typeclasses/existential_type_classes.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/typeclasses/existential_type_classes.m,v
retrieving revision 1.4
diff -u -d -r1.4 existential_type_classes.m
--- existential_type_classes.m 1998/10/29 10:14:09 1.4
+++ existential_type_classes.m 1999/10/26 12:00:58
@@ -65,13 +65,13 @@
:- pragma c_code(my_univ_value(Univ::in) = (Value::out), will_not_call_mercury, "
TypeClassInfo_for_existential_type_classes__fooable_T =
- field(mktag(0), Univ, 0);
- Value = field(mktag(0), Univ, 1);
+ MR_field(MR_mktag(0), Univ, 0);
+ Value = MR_field(MR_mktag(0), Univ, 1);
").
:- pragma c_code(my_univ(Value::in) = (Univ::out), will_not_call_mercury, "
incr_hp(Univ, 2);
- field(mktag(0), Univ, 0) = (Word)
+ MR_field(MR_mktag(0), Univ, 0) = (Word)
TypeClassInfo_for_existential_type_classes__fooable_T;
- field(mktag(0), Univ, 1) = (Word) Value;
+ MR_field(MR_mktag(0), Univ, 1) = (Word) Value;
").
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list