[m-rev.] diff: removing old macros

Zoltan Somogyi zs at csse.unimelb.edu.au
Wed Sep 28 17:05:37 AEST 2011


runtime/mercury_stack_layout.h:
	Remove a bunch of long-obsolete macros. Their job was to define
	or to declare individual label layouts, but for a long time now
	we have put all label layouts into arrays.

Zoltan.

cvs diff: Diffing runtime
Index: runtime/mercury_stack_layout.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_stack_layout.h,v
retrieving revision 1.121
diff -u -b -r1.121 mercury_stack_layout.h
--- runtime/mercury_stack_layout.h	26 Sep 2011 04:29:37 -0000	1.121
+++ runtime/mercury_stack_layout.h	28 Sep 2011 05:17:50 -0000
@@ -575,209 +575,6 @@
 /*-------------------------------------------------------------------------*/
 
 /*
-** These macros are used as shorthands in generated C source files.
-** The first two arguments are the entry label name and the label number;
-** the others are the fields of MR_LabelLayouts.
-*/
-
-/*
-** The following macros are obsolete. They should be deleted as soon as
-** workspaces referring to them have been updated and recompiled.
-*/
-
-#define MR_DEF_LL_GEN(e, ln, port, h, num, path, ue, vc, lt, vn, tv)        \
-    static const MR_LabelLayout                                             \
-        MR_LABEL_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln))           \
-    = {                                                                     \
-        MR_PROC_LAYOUT(MR_add_prefix(e)),                                   \
-        MR_PASTE2(MR_PORT_, port),                                          \
-        (h), (num), (path), (ue), (vc),                                     \
-        ((const void *) lt),                                                \
-        ((const MR_uint_least16_t *) vn),                                   \
-        ((const MR_TypeParamLocns *) tv)                                    \
-    }
-
-#define MR_DEF_LLNVI_GEN(e, ln, port, h, num, path, ue)                     \
-    static const MR_LabelLayoutNoVarInfo                                    \
-        MR_LABEL_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln))           \
-    = {                                                                     \
-        MR_PROC_LAYOUT(MR_add_prefix(e)),                                   \
-        MR_PASTE2(MR_PORT_, port),                                          \
-        (h), (num), (path), (ue), -1                                        \
-    }
-
-#define MR_DEF_LL(e, ln, port, num, path, vc, lt, vn, tv)                   \
-    MR_DEF_LL_GEN(e, ln, port, MR_FALSE, num, path, NULL, vc, lt, vn, tv)
-
-#define MR_DEF_LLT(e, ln, port, num, path, vc, lt, vn, tv)                  \
-    MR_DEF_LL_GEN(e, ln, port, MR_TRUE, num, path, NULL, vc, lt, vn, tv)
-
-#define MR_DEF_LL_U(e, ln, port, num, path, vc, lt, vn, tv)                 \
-    MR_DEF_LL_GEN(e, ln, port, MR_FALSE, num, path,                         \
-        &MR_USER_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln)),          \
-        vc, lt, vn, tv)
-
-#define MR_DEF_LLT_U(e, ln, port, num, path, vc, lt, vn, tv)                \
-    MR_DEF_LL_GEN(e, ln, port, MR_TRUE, num, path,                          \
-        &MR_USER_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln)),          \
-        vc, lt, vn, tv)
-
-#define MR_DEF_LLXCCC(e, ln, port, num, path, vc, ltt, ltc, vnt, vnc, tvt, tvc)\
-    MR_DEF_LL_GEN(e, ln, port, MR_FALSE, num, path, NULL, vc,               \
-        MR_COMMON(ltt, ltc),                                                \
-        MR_COMMON(vnt, vnc),                                                \
-        MR_COMMON(tvt, tvc))
-
-#define MR_DEF_LLXCC0(e, ln, port, num, path, vc, ltt, ltc, vnt, vnc)       \
-    MR_DEF_LL_GEN(e, ln, port, MR_FALSE, num, path, NULL, vc,               \
-        MR_COMMON(ltt, ltc),                                                \
-        MR_COMMON(vnt, vnc), 0)
-
-#define MR_DEF_LLTXCCC(e, ln, port, num, path, vc, ltt, ltc, vnt, vnc, tvt,tvc)\
-    MR_DEF_LL_GEN(e, ln, port, MR_TRUE, num, path, NULL, vc,                \
-        MR_COMMON(ltt, ltc),                                                \
-        MR_COMMON(vnt, vnc),                                                \
-        MR_COMMON(tvt, tvc))
-
-#define MR_DEF_LLTXCC0(e, ln, port, num, path, vc, ltt, ltc, vnt, vnc)      \
-    MR_DEF_LL_GEN(e, ln, port, MR_TRUE, num, path, NULL, vc,                \
-        MR_COMMON(ltt, ltc),                                                \
-        MR_COMMON(vnt, vnc), 0)
-
-#define MR_DEF_LLXCCC_U(e, ln, port, num, path, vc, ltt, ltc, vnt, vnc, tvt, tvc)\
-    MR_DEF_LL_GEN(e, ln, port, MR_FALSE, num, path,                         \
-        &MR_USER_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln)),          \
-        vc,                                                                 \
-        MR_COMMON(ltt, ltc),                                                \
-        MR_COMMON(vnt, vnc),                                                \
-        MR_COMMON(tvt, tvc))
-
-#define MR_DEF_LLXCC0_U(e, ln, port, num, path, vc, ltt, ltc, vnt, vnc)     \
-    MR_DEF_LL_GEN(e, ln, port, MR_FALSE, num, path,                         \
-        &MR_USER_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln)),          \
-        vc,                                                                 \
-        MR_COMMON(ltt, ltc),                                                \
-        MR_COMMON(vnt, vnc), 0)
-
-#define MR_DEF_LLTXCCC_U(e, ln, port, num, path, vc, ltt, ltc, vnt, vnc, tvt,tvc)\
-    MR_DEF_LL_GEN(e, ln, port, MR_TRUE, num, path,                          \
-        &MR_USER_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln)),          \
-        vc,                                                                 \
-        MR_COMMON(ltt, ltc),                                                \
-        MR_COMMON(vnt, vnc),                                                \
-        MR_COMMON(tvt, tvc))
-
-#define MR_DEF_LLTXCC0_U(e, ln, port, num, path, vc, ltt, ltc, vnt, vnc)    \
-    MR_DEF_LL_GEN(e, ln, port, MR_TRUE, num, path,                          \
-        &MR_USER_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln)),          \
-        vc,                                                                 \
-        MR_COMMON(ltt, ltc),                                                \
-        MR_COMMON(vnt, vnc), 0)
-
-#define MR_DEF_LLNVI(e, ln, port, num, path)                                \
-    MR_DEF_LLNVI_GEN(e, ln, port, MR_FALSE, path, NULL)
-
-#define MR_DEF_LLNVIT(e, ln, port, num, path)                               \
-    MR_DEF_LLNVI_GEN(e, ln, port, MR_TRUE, path, NULL)
-
-#define MR_DEF_LLNVI_U(e, ln, port, num, path)                              \
-    MR_DEF_LLNVI_GEN(e, ln, port, MR_FALSE, num, path,                      \
-        &MR_USER_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln)))
-
-#define MR_DEF_LLNVIT_U(e, ln, port, num, path)                             \
-    MR_DEF_LLNVI_GEN(e, ln, port, MR_TRUE, num, path,                       \
-        &MR_USER_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln)))
-
-/*-------------------------------------------------------------------------*/
-
-#define MR_DECL_LL(e, ln)                                                   \
-    MR_declare_label(MR_label_name(MR_add_prefix(e), ln));                  \
-    static const MR_LabelLayout                                             \
-        MR_LABEL_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln));          \
-
-#define MR_DECL_LLNVI(e, ln)                                                \
-    MR_declare_label(MR_label_name(MR_add_prefix(e), ln));                  \
-    static const MR_LabelLayoutNoVarInfo                                    \
-        MR_LABEL_LAYOUT_NAME(MR_label_name(MR_add_prefix(e), ln));          \
-
-#define MR_DECL_LL1(e, ln1)                                                 \
-    MR_DECL_LL(e, ln1)
-
-#define MR_DECL_LL2(e, ln1, ln2)                                            \
-    MR_DECL_LL(e, ln1)                                                      \
-    MR_DECL_LL(e, ln2)
-
-#define MR_DECL_LL3(e, ln1, ln2, ln3)                                       \
-    MR_DECL_LL(e, ln1)                                                      \
-    MR_DECL_LL(e, ln2)                                                      \
-    MR_DECL_LL(e, ln3)
-
-#define MR_DECL_LL4(e, ln1, ln2, ln3, ln4)                                  \
-    MR_DECL_LL(e, ln1)                                                      \
-    MR_DECL_LL(e, ln2)                                                      \
-    MR_DECL_LL(e, ln3)                                                      \
-    MR_DECL_LL(e, ln4)
-
-#define MR_DECL_LL5(e, ln1, ln2, ln3, ln4, ln5)                             \
-    MR_DECL_LL(e, ln1)                                                      \
-    MR_DECL_LL(e, ln2)                                                      \
-    MR_DECL_LL(e, ln3)                                                      \
-    MR_DECL_LL(e, ln4)                                                      \
-    MR_DECL_LL(e, ln5)
-
-#define MR_DECL_LL6(e, ln1, ln2, ln3, ln4, ln5, ln6)                        \
-    MR_DECL_LL(e, ln1)                                                      \
-    MR_DECL_LL(e, ln2)                                                      \
-    MR_DECL_LL(e, ln3)                                                      \
-    MR_DECL_LL(e, ln4)                                                      \
-    MR_DECL_LL(e, ln5)                                                      \
-    MR_DECL_LL(e, ln6)
-
-#define MR_DECL_LL7(e, ln1, ln2, ln3, ln4, ln5, ln6, ln7)                   \
-    MR_DECL_LL(e, ln1)                                                      \
-    MR_DECL_LL(e, ln2)                                                      \
-    MR_DECL_LL(e, ln3)                                                      \
-    MR_DECL_LL(e, ln4)                                                      \
-    MR_DECL_LL(e, ln5)                                                      \
-    MR_DECL_LL(e, ln6)                                                      \
-    MR_DECL_LL(e, ln7)
-
-#define MR_DECL_LL8(e, ln1, ln2, ln3, ln4, ln5, ln6, ln7, ln8)              \
-    MR_DECL_LL(e, ln1)                                                      \
-    MR_DECL_LL(e, ln2)                                                      \
-    MR_DECL_LL(e, ln3)                                                      \
-    MR_DECL_LL(e, ln4)                                                      \
-    MR_DECL_LL(e, ln5)                                                      \
-    MR_DECL_LL(e, ln6)                                                      \
-    MR_DECL_LL(e, ln7)                                                      \
-    MR_DECL_LL(e, ln8)
-
-#define MR_DECL_LL9(e, ln1, ln2, ln3, ln4, ln5, ln6, ln7, ln8, ln9)         \
-    MR_DECL_LL(e, ln1)                                                      \
-    MR_DECL_LL(e, ln2)                                                      \
-    MR_DECL_LL(e, ln3)                                                      \
-    MR_DECL_LL(e, ln4)                                                      \
-    MR_DECL_LL(e, ln5)                                                      \
-    MR_DECL_LL(e, ln6)                                                      \
-    MR_DECL_LL(e, ln7)                                                      \
-    MR_DECL_LL(e, ln8)                                                      \
-    MR_DECL_LL(e, ln9)
-
-#define MR_DECL_LL10(e, ln1, ln2, ln3, ln4, ln5, ln6, ln7, ln8, ln9, ln10)  \
-    MR_DECL_LL(e, ln1)                                                      \
-    MR_DECL_LL(e, ln2)                                                      \
-    MR_DECL_LL(e, ln3)                                                      \
-    MR_DECL_LL(e, ln4)                                                      \
-    MR_DECL_LL(e, ln5)                                                      \
-    MR_DECL_LL(e, ln6)                                                      \
-    MR_DECL_LL(e, ln7)                                                      \
-    MR_DECL_LL(e, ln8)                                                      \
-    MR_DECL_LL(e, ln9)                                                      \
-    MR_DECL_LL(e, ln10)
-
-/*-------------------------------------------------------------------------*/
-
-/*
 ** These macros are used as shorthands in generated C source files
 ** for some fields of MR_LabelLayouts.
 **
@@ -805,29 +602,6 @@
         MR_PASTE2(MR_PORT_, port),                                          \
         MR_HIDDEN, (num), (path), (ue)
 
-#if 0
-/* these are new but already obsolete */
-#define MR_LLV(lt, vn, tp)                                                  \
-        (const void *) (lt),                                                \
-        (const MR_uint_least16_t *) (vn),                                   \
-        (const MR_TypeParamLocns *) (tp)
-
-#define MR_LLV_CC(ltt, ltc, vnt, vnc, tp)                                   \
-        (const void *) MR_COMMON(ltt, ltc),                                 \
-        (const MR_uint_least16_t *) MR_COMMON(vnt, vnc),                    \
-        (const MR_TypeParamLocns *) (tp)
-
-#define MR_LLV_CCC(ltt, ltc, vnt, vnc, tpt, tpc)                            \
-        (const void *) MR_COMMON(ltt, ltc),                                 \
-        (const MR_uint_least16_t *) MR_COMMON(vnt, vnc),                    \
-        (const MR_TypeParamLocns *) MR_COMMON(tpt, tpc)
-
-#define MR_LLV_CC0(ltt, ltc, vnt, vnc)                                      \
-        (const void *) MR_COMMON(ltt, ltc),                                 \
-        (const MR_uint_least16_t *) MR_COMMON(vnt, vnc),                    \
-        (const MR_TypeParamLocns *) 0
-#endif
-
 #define MR_LLVS(m, p, h, s)                                                 \
         &MR_pseudo_type_infos(m)[p],                                        \
         &MR_hlds_var_nums(m)[h],                                            \
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list