for review: activate type_ctor_representation
Tyson Dowd
trd at cs.mu.OZ.AU
Sun Apr 18 21:08:38 AEST 1999
Hi,
This change activates some changes I made earlier.
===================================================================
Estimated hours taken: 0.5
The next stage in cleaning up the RTTI information. Make the
type_ctor_representation available.
compiler/base_type_info.m:
Output type_ctor_representation.
runtime/mercury_type_info.h:
Set the offset for type_ctor_layout to the new offset.
Index: compiler/base_type_info.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/base_type_info.m,v
retrieving revision 1.23
diff -u -r1.23 base_type_info.m
--- base_type_info.m 1999/04/08 08:41:00 1.23
+++ base_type_info.m 1999/04/16 06:41:37
@@ -163,18 +163,11 @@
base_type_info__construct_functors(ModuleInfo, TypeName,
TypeArity, FunctorsArg),
base_type_info__construct_type_ctor_representation(HldsDefn,
- _TypeCtorArg),
- % XXX we put the layout argument twice.
- % this is just temporary for bootstrapping
- % purposes. We will replace the LayoutArg with
- % TypeCtorArg when the installed compiler
- % generates the layout in a later slot, and
- % change the #defines runtime/mercury_type_info.h
- % to use the later slot.
+ TypeCtorArg),
prog_out__sym_name_to_string(ModuleName, ModuleNameString),
NameArg = yes(const(string_const(TypeName))),
ModuleArg = yes(const(string_const(ModuleNameString))),
- list__append(PredAddrArgs, [LayoutArg, FunctorsArg, LayoutArg,
+ list__append(PredAddrArgs, [TypeCtorArg, FunctorsArg, LayoutArg,
ModuleArg, NameArg], FinalArgs)
;
FinalArgs = PredAddrArgs
Index: runtime/mercury_type_info.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_type_info.h,v
retrieving revision 1.18
diff -u -r1.18 mercury_type_info.h
--- mercury_type_info.h 1999/04/16 06:05:40 1.18
+++ mercury_type_info.h 1999/04/16 06:42:08
@@ -46,8 +46,8 @@
#define OFFSET_FOR_UNIFY_PRED 1
#define OFFSET_FOR_INDEX_PRED 2
#define OFFSET_FOR_COMPARE_PRED 3
-#define OFFSET_FOR_BASE_TYPE_LAYOUT 4
#define OFFSET_FOR_BASE_TYPE_FUNCTORS 5
+#define OFFSET_FOR_BASE_TYPE_LAYOUT 6
#define OFFSET_FOR_TYPE_MODULE_NAME 7
#define OFFSET_FOR_TYPE_NAME 8
--
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.
More information about the developers
mailing list