[m-dev.] for review: move type_ctor_infos from mercury_bootstrap.c
Tyson Dowd
trd at cs.mu.OZ.AU
Mon May 24 20:53:04 AEST 1999
Hi,
DJ and Zoltan are working on type_ctor_infos for base_typeclass_info and
couldn't seem to find them...
===================================================================
Estimated hours taken: 0.3
library/private_builtin.m:
runtime/mercury_bootstrap.c:
Move the type_ctor_infos for typeclass_info and base_typeclass_info
into private_builtin since they have almost certainly
bootstrapped by now (they have been there since November).
Index: library/private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.23
diff -u -r1.23 private_builtin.m
--- private_builtin.m 1999/05/20 10:53:11 1.23
+++ private_builtin.m 1999/05/24 07:56:20
@@ -357,10 +357,98 @@
MR_TYPE_CTOR_FUNCTORS_SPECIAL
};
+Define_extern_entry(mercury____Unify___private_builtin__typeclass_info_1_0);
+Define_extern_entry(mercury____Index___private_builtin__typeclass_info_1_0);
+Define_extern_entry(mercury____Compare___private_builtin__typeclass_info_1_0);
+
+extern const struct
+ mercury_data_private_builtin__type_ctor_layout_typeclass_info_1_struct
+ mercury_data_private_builtin__type_ctor_layout_typeclass_info_1;
+extern const struct
+ mercury_data_private_builtin__type_ctor_functors_typeclass_info_1_struct
+ mercury_data_private_builtin__type_ctor_functors_typeclass_info_1;
+
+MR_STATIC_CODE_CONST struct
+mercury_data_private_builtin__type_ctor_info_base_typeclass_info_1_struct {
+ Integer f1;
+ Code *f2;
+ Code *f3;
+ Code *f4;
+ const Word *f5;
+ const Word *f6;
+ const Word *f7;
+ const Word *f8;
+ const Word *f9;
+} mercury_data_private_builtin__type_ctor_info_base_typeclass_info_1 = {
+ ((Integer) 1),
+ MR_MAYBE_STATIC_CODE(ENTRY(
+ mercury____Unify___private_builtin__typeclass_info_1_0)),
+ MR_MAYBE_STATIC_CODE(ENTRY(
+ mercury____Index___private_builtin__typeclass_info_1_0)),
+ MR_MAYBE_STATIC_CODE(ENTRY(
+ mercury____Compare___private_builtin__typeclass_info_1_0)),
+ (const Word *) &
+ mercury_data_private_builtin__type_ctor_layout_typeclass_info_1,
+ (const Word *) &
+ mercury_data_private_builtin__type_ctor_functors_typeclass_info_1,
+ (const Word *) &
+ mercury_data_private_builtin__type_ctor_layout_typeclass_info_1,
+ (const Word *) string_const(""private_builtin"", 15),
+ (const Word *) string_const(""base_typeclass_info"", 19)
+};
+
+MR_STATIC_CODE_CONST struct
+mercury_data_private_builtin__type_ctor_info_typeclass_info_1_struct {
+ Integer f1;
+ Code *f2;
+ Code *f3;
+ Code *f4;
+ const Word *f5;
+ const Word *f6;
+ const Word *f7;
+ const Word *f8;
+ const Word *f9;
+} mercury_data_private_builtin__type_ctor_info_typeclass_info_1 = {
+ ((Integer) 1),
+ MR_MAYBE_STATIC_CODE(ENTRY(
+ mercury____Unify___private_builtin__typeclass_info_1_0)),
+ MR_MAYBE_STATIC_CODE(ENTRY(
+ mercury____Index___private_builtin__typeclass_info_1_0)),
+ MR_MAYBE_STATIC_CODE(ENTRY(
+ mercury____Compare___private_builtin__typeclass_info_1_0)),
+ (const Word *) &
+ mercury_data_private_builtin__type_ctor_layout_typeclass_info_1,
+ (const Word *) &
+ mercury_data_private_builtin__type_ctor_functors_typeclass_info_1,
+ (const Word *) &
+ mercury_data_private_builtin__type_ctor_layout_typeclass_info_1,
+ (const Word *) string_const(""private_builtin"", 15),
+ (const Word *) string_const(""typeclass_info"", 14)
+};
+
+const struct
+mercury_data_private_builtin__type_ctor_layout_typeclass_info_1_struct {
+ TYPE_LAYOUT_FIELDS
+} mercury_data_private_builtin__type_ctor_layout_typeclass_info_1 = {
+ make_typelayout_for_all_tags(TYPE_CTOR_LAYOUT_CONST_TAG,
+ mkbody(MR_TYPE_CTOR_LAYOUT_TYPECLASSINFO_VALUE))
+};
+
+const struct mercury_data_private_builtin__type_ctor_functors_typeclass_info_1_struct {
+ Integer f1;
+} mercury_data_private_builtin__type_ctor_functors_typeclass_info_1 = {
+ MR_TYPE_CTOR_FUNCTORS_SPECIAL
+};
+
+
+
BEGIN_MODULE(type_info_module)
init_entry(mercury____Unify___private_builtin__type_info_1_0);
init_entry(mercury____Index___private_builtin__type_info_1_0);
init_entry(mercury____Compare___private_builtin__type_info_1_0);
+ init_entry(mercury____Unify___private_builtin__typeclass_info_1_0);
+ init_entry(mercury____Index___private_builtin__typeclass_info_1_0);
+ init_entry(mercury____Compare___private_builtin__typeclass_info_1_0);
BEGIN_CODE
Define_entry(mercury____Unify___private_builtin__type_info_1_0);
{
@@ -396,6 +484,18 @@
restore_transient_registers();
compare_output = comp;
proceed();
+}
+Define_entry(mercury____Unify___private_builtin__typeclass_info_1_0);
+{
+ fatal_error(""attempt to unify typeclass_info"");
+}
+Define_entry(mercury____Index___private_builtin__typeclass_info_1_0);
+ index_output = -1;
+ proceed();
+
+Define_entry(mercury____Compare___private_builtin__typeclass_info_1_0);
+{
+ fatal_error(""attempt to compare typeclass_info"");
}
END_MODULE
Index: runtime/mercury_bootstrap.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_bootstrap.c,v
retrieving revision 1.8
diff -u -r1.8 mercury_bootstrap.c
--- mercury_bootstrap.c 1999/04/08 08:42:09 1.8
+++ mercury_bootstrap.c 1999/05/24 07:46:44
@@ -21,123 +21,5 @@
#include "mercury_imp.h"
-/*
-** Bootstrapping the hand-definition of private_builtin:typeclass_info/1
-** and private_builtin:base_typeclass_info/1
-** means that the stage 1 compiler has a compiler generated definition,
-** while stage 2 doesn't.
-*/
-Define_extern_entry(mercury____Unify___private_builtin__typeclass_info_1_0);
-Define_extern_entry(mercury____Index___private_builtin__typeclass_info_1_0);
-Define_extern_entry(mercury____Compare___private_builtin__typeclass_info_1_0);
-extern const struct
- mercury_data_private_builtin__type_ctor_layout_typeclass_info_1_struct
- mercury_data_private_builtin__type_ctor_layout_typeclass_info_1;
-extern const struct
- mercury_data_private_builtin__type_ctor_functors_typeclass_info_1_struct
- mercury_data_private_builtin__type_ctor_functors_typeclass_info_1;
-
-MR_STATIC_CODE_CONST struct
-mercury_data_private_builtin__type_ctor_info_base_typeclass_info_1_struct {
- Integer f1;
- Code *f2;
- Code *f3;
- Code *f4;
- const Word *f5;
- const Word *f6;
- const Word *f7;
- const Word *f8;
- const Word *f9;
-} mercury_data_private_builtin__type_ctor_info_base_typeclass_info_1 = {
- ((Integer) 1),
- MR_MAYBE_STATIC_CODE(ENTRY(
- mercury____Unify___private_builtin__typeclass_info_1_0)),
- MR_MAYBE_STATIC_CODE(ENTRY(
- mercury____Index___private_builtin__typeclass_info_1_0)),
- MR_MAYBE_STATIC_CODE(ENTRY(
- mercury____Compare___private_builtin__typeclass_info_1_0)),
- (const Word *) &
- mercury_data_private_builtin__type_ctor_layout_typeclass_info_1,
- (const Word *) &
- mercury_data_private_builtin__type_ctor_functors_typeclass_info_1,
- (const Word *) &
- mercury_data_private_builtin__type_ctor_layout_typeclass_info_1,
- (const Word *) string_const("private_builtin", 15),
- (const Word *) string_const("base_typeclass_info", 19)
-};
-
-MR_STATIC_CODE_CONST struct
-mercury_data_private_builtin__type_ctor_info_typeclass_info_1_struct {
- Integer f1;
- Code *f2;
- Code *f3;
- Code *f4;
- const Word *f5;
- const Word *f6;
- const Word *f7;
- const Word *f8;
- const Word *f9;
-} mercury_data_private_builtin__type_ctor_info_typeclass_info_1 = {
- ((Integer) 1),
- MR_MAYBE_STATIC_CODE(ENTRY(
- mercury____Unify___private_builtin__typeclass_info_1_0)),
- MR_MAYBE_STATIC_CODE(ENTRY(
- mercury____Index___private_builtin__typeclass_info_1_0)),
- MR_MAYBE_STATIC_CODE(ENTRY(
- mercury____Compare___private_builtin__typeclass_info_1_0)),
- (const Word *) &
- mercury_data_private_builtin__type_ctor_layout_typeclass_info_1,
- (const Word *) &
- mercury_data_private_builtin__type_ctor_functors_typeclass_info_1,
- (const Word *) &
- mercury_data_private_builtin__type_ctor_layout_typeclass_info_1,
- (const Word *) string_const("private_builtin", 15),
- (const Word *) string_const("typeclass_info", 14)
-};
-
-const struct
-mercury_data_private_builtin__type_ctor_layout_typeclass_info_1_struct {
- TYPE_LAYOUT_FIELDS
-} mercury_data_private_builtin__type_ctor_layout_typeclass_info_1 = {
- make_typelayout_for_all_tags(TYPE_CTOR_LAYOUT_CONST_TAG,
- mkbody(MR_TYPE_CTOR_LAYOUT_TYPECLASSINFO_VALUE))
-};
-
-const struct mercury_data_private_builtin__type_ctor_functors_typeclass_info_1_struct {
- Integer f1;
-} mercury_data_private_builtin__type_ctor_functors_typeclass_info_1 = {
- MR_TYPE_CTOR_FUNCTORS_SPECIAL
-};
-
-BEGIN_MODULE(typeclass_info_module)
- init_entry(mercury____Unify___private_builtin__typeclass_info_1_0);
- init_entry(mercury____Index___private_builtin__typeclass_info_1_0);
- init_entry(mercury____Compare___private_builtin__typeclass_info_1_0);
-BEGIN_CODE
-Define_entry(mercury____Unify___private_builtin__typeclass_info_1_0);
-{
- fatal_error("attempt to unify typeclass_info");
-}
-
-Define_entry(mercury____Index___private_builtin__typeclass_info_1_0);
- index_output = -1;
- proceed();
-
-Define_entry(mercury____Compare___private_builtin__typeclass_info_1_0);
-{
- fatal_error("attempt to compare typeclass_info");
-}
-END_MODULE
-
-/* Ensure that the initialization code for the above module gets run. */
-/*
-INIT sys_init_typeclass_info_module
-*/
-extern ModuleFunc typeclass_info_module;
- /* suppress gcc -Wmissing-decl warning */
-void sys_init_typeclass_info_module(void);
-void sys_init_typeclass_info_module(void) {
- typeclass_info_module();
-}
--
Tyson Dowd # There isn't any reason why Linux can't be
# implemented as an enterprise computing solution.
trd at cs.mu.oz.au # Find out what you've been missing while you've
http://www.cs.mu.oz.au/~trd # been rebooting Windows NT. -- InfoWorld, 1998.
--------------------------------------------------------------------------
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