[m-dev.] for review: removing redundant inst info from layout structures

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu May 6 17:03:29 AEST 1999


This is for review by Tyson when he gets back. He has already agreed to
the basic approach, and to make the required changes to the accurate collector
later.

Estimated hours taken: 3

Compress the representation of value shape information. Instead of a
pointer to a two-word cell containing a pseudotypeinfo and a dummy inst,
just have the pseudotypeinfo itself.

However, we were previously using small integer "pointers" to represent
special kinds of values such as saved succips, hps, etc. Since pseudotypeinfos
use small integer values for their own purposes (to represent type variables),
we can't continue doing this. Therefore this change also creates type_ctor_info
structures for each of these special kinds of values. These values are only
used by the garbage collector, so nothing else is affected.

compiler/stack_layout.m:
	Effect the above change.

library/builtin.m:
	Add type_ctor_info structures and their components for the new kinds
	of values.

runtime/mercury_stack_layout.h:
	Delete the section on shape information, since we don't generate
	such structures anymore.

runtime/mercury_layout_util.c:
	Access pseudotypeinfos directly, not through the shape structure.

runtime/mercury_type_info.h:
	Add new values to the type_ctor_layout enum for the special kinds
	of values.

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
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/stack_layout.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.28
diff -u -b -u -r1.28 stack_layout.m
--- stack_layout.m	1999/04/30 06:19:51	1.28
+++ stack_layout.m	1999/05/06 08:19:09
@@ -898,39 +898,40 @@
 	llds_type, stack_layout_info, stack_layout_info).
 :- mode stack_layout__represent_live_value_type(in, out, out, in, out) is det.
 
-stack_layout__represent_live_value_type(succip, Rval, integer) -->
-	{ Rval = const(int_const(0)) }.
-stack_layout__represent_live_value_type(hp, Rval, integer) -->
-	{ Rval = const(int_const(1)) }.
-stack_layout__represent_live_value_type(curfr, Rval, integer) -->
-	{ Rval = const(int_const(2)) }.
-stack_layout__represent_live_value_type(maxfr, Rval, integer) -->
-	{ Rval = const(int_const(3)) }.
-stack_layout__represent_live_value_type(redofr, Rval, integer) -->
-	{ Rval = const(int_const(4)) }.
-stack_layout__represent_live_value_type(redoip, Rval, integer) -->
-	{ Rval = const(int_const(5)) }.
-stack_layout__represent_live_value_type(unwanted, Rval, integer) -->
-	{ Rval = const(int_const(6)) }.
-stack_layout__represent_live_value_type(var(_, _, Type, Inst), Rval, data_ptr)
+stack_layout__represent_live_value_type(succip, Rval, data_ptr) -->
+	{ TypeCtor = type_ctor(info, "succip", 0) },
+	{ AddrConst = data_addr_const(data_addr(unqualified(""), TypeCtor)) },
+	{ Rval = const(AddrConst) }.
+stack_layout__represent_live_value_type(hp, Rval, data_ptr) -->
+	{ TypeCtor = type_ctor(info, "hp", 0) },
+	{ AddrConst = data_addr_const(data_addr(unqualified(""), TypeCtor)) },
+	{ Rval = const(AddrConst) }.
+stack_layout__represent_live_value_type(curfr, Rval, data_ptr) -->
+	{ TypeCtor = type_ctor(info, "curfr", 0) },
+	{ AddrConst = data_addr_const(data_addr(unqualified(""), TypeCtor)) },
+	{ Rval = const(AddrConst) }.
+stack_layout__represent_live_value_type(maxfr, Rval, data_ptr) -->
+	{ TypeCtor = type_ctor(info, "maxfr", 0) },
+	{ AddrConst = data_addr_const(data_addr(unqualified(""), TypeCtor)) },
+	{ Rval = const(AddrConst) }.
+stack_layout__represent_live_value_type(redofr, Rval, data_ptr) -->
+	{ TypeCtor = type_ctor(info, "redofr", 0) },
+	{ AddrConst = data_addr_const(data_addr(unqualified(""), TypeCtor)) },
+	{ Rval = const(AddrConst) }.
+stack_layout__represent_live_value_type(redoip, Rval, data_ptr) -->
+	{ TypeCtor = type_ctor(info, "redoip", 0) },
+	{ AddrConst = data_addr_const(data_addr(unqualified(""), TypeCtor)) },
+	{ Rval = const(AddrConst) }.
+stack_layout__represent_live_value_type(unwanted, Rval, data_ptr) -->
+	{ TypeCtor = type_ctor(info, "succip", 0) },
+	{ AddrConst = data_addr_const(data_addr(unqualified(""), TypeCtor)) },
+	{ Rval = const(AddrConst) }.
+stack_layout__represent_live_value_type(var(_, _, Type, _), Rval, LldsType)
 		-->
 	stack_layout__get_cell_number(CNum0),
-	{ stack_layout__represent_var_shape(Type, Inst, VarShape,
-		CNum0, CNum1) },
-	stack_layout__set_cell_number(CNum1),
-	stack_layout__get_next_cell_number(CNum2),
-	{ Rval = create(0, VarShape, uniform(no), must_be_static,
-		CNum2, "variable_shape") }.
-
-:- pred stack_layout__represent_var_shape((type)::in, (inst)::in,
-	list(maybe(rval))::out, int::in, int::out) is det.
-
-stack_layout__represent_var_shape(Type, _Inst, VarShape, CNum0, CNum) :-
-	base_type_layout__construct_typed_pseudo_type_info(Type, TypeRval, _,
-		CNum0, CNum),
-	% XXX hack - don't yet write out insts
-	InstRval = const(int_const(-1)),
-	VarShape = [yes(TypeRval), yes(InstRval)].
+	{ base_type_layout__construct_typed_pseudo_type_info(Type,
+		Rval, LldsType, CNum0, CNum) },
+	stack_layout__set_cell_number(CNum).
 
 %---------------------------------------------------------------------------%
 
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/dynamic_linking
cvs diff: Diffing extras/exceptions
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/odbc
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 library
Index: library/builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/builtin.m,v
retrieving revision 1.11
diff -u -b -u -r1.11 builtin.m
--- builtin.m	1999/04/08 08:42:01	1.11
+++ builtin.m	1999/05/03 09:03:17
@@ -296,6 +296,66 @@
 		mkbody(MR_TYPE_CTOR_LAYOUT_VOID_VALUE))
 };
 
+	/* type_ctor_layout for `succip' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_layout_succip_0_struct {
+	TYPE_LAYOUT_FIELDS
+} mercury_data___type_ctor_layout_succip_0 = {
+	make_typelayout_for_all_tags(TYPE_CTOR_LAYOUT_CONST_TAG, 
+		mkbody(MR_TYPE_CTOR_LAYOUT_SUCCIP_VALUE))
+};
+
+	/* type_ctor_layout for `hp' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_layout_hp_0_struct {
+	TYPE_LAYOUT_FIELDS
+} mercury_data___type_ctor_layout_hp_0 = {
+	make_typelayout_for_all_tags(TYPE_CTOR_LAYOUT_CONST_TAG, 
+		mkbody(MR_TYPE_CTOR_LAYOUT_SUCCIP_VALUE))
+};
+
+	/* type_ctor_layout for `curfr' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_layout_curfr_0_struct {
+	TYPE_LAYOUT_FIELDS
+} mercury_data___type_ctor_layout_curfr_0 = {
+	make_typelayout_for_all_tags(TYPE_CTOR_LAYOUT_CONST_TAG, 
+		mkbody(MR_TYPE_CTOR_LAYOUT_CURFR_VALUE))
+};
+
+	/* type_ctor_layout for `maxfr' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_layout_maxfr_0_struct {
+	TYPE_LAYOUT_FIELDS
+} mercury_data___type_ctor_layout_maxfr_0 = {
+	make_typelayout_for_all_tags(TYPE_CTOR_LAYOUT_CONST_TAG, 
+		mkbody(MR_TYPE_CTOR_LAYOUT_MAXFR_VALUE))
+};
+
+	/* type_ctor_layout for `redofr' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_layout_redofr_0_struct {
+	TYPE_LAYOUT_FIELDS
+} mercury_data___type_ctor_layout_redofr_0 = {
+	make_typelayout_for_all_tags(TYPE_CTOR_LAYOUT_CONST_TAG, 
+		mkbody(MR_TYPE_CTOR_LAYOUT_REDOFR_VALUE))
+};
+
+	/* type_ctor_layout for `redoip' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_layout_redoip_0_struct {
+	TYPE_LAYOUT_FIELDS
+} mercury_data___type_ctor_layout_redoip_0 = {
+	make_typelayout_for_all_tags(TYPE_CTOR_LAYOUT_CONST_TAG, 
+		mkbody(MR_TYPE_CTOR_LAYOUT_REDOIP_VALUE))
+};
+
 	/* type_ctor_functors definitions */
 
 	/* type_ctor_functors for `int' */
@@ -343,6 +403,60 @@
 	MR_TYPE_CTOR_FUNCTORS_SPECIAL
 };
 
+	/* type_ctor_functors for `succip' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_functors_succip_0_struct {
+	Integer f1;
+} mercury_data___type_ctor_functors_succip_0 = {
+	MR_TYPE_CTOR_FUNCTORS_SPECIAL
+};
+
+	/* type_ctor_functors for `hp' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_functors_hp_0_struct {
+	Integer f1;
+} mercury_data___type_ctor_functors_hp_0 = {
+	MR_TYPE_CTOR_FUNCTORS_SPECIAL
+};
+
+	/* type_ctor_functors for `curfr' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_functors_curfr_0_struct {
+	Integer f1;
+} mercury_data___type_ctor_functors_curfr_0 = {
+	MR_TYPE_CTOR_FUNCTORS_SPECIAL
+};
+
+	/* type_ctor_functors for `maxfr' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_functors_maxfr_0_struct {
+	Integer f1;
+} mercury_data___type_ctor_functors_maxfr_0 = {
+	MR_TYPE_CTOR_FUNCTORS_SPECIAL
+};
+
+	/* type_ctor_functors for `redofr' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_functors_redofr_0_struct {
+	Integer f1;
+} mercury_data___type_ctor_functors_redofr_0 = {
+	MR_TYPE_CTOR_FUNCTORS_SPECIAL
+};
+
+	/* type_ctor_functors for `redoip' (only used by accurate gc) */
+
+MR_MODULE_STATIC_OR_EXTERN
+const struct mercury_data___type_ctor_functors_redoip_0_struct {
+	Integer f1;
+} mercury_data___type_ctor_functors_redoip_0 = {
+	MR_TYPE_CTOR_FUNCTORS_SPECIAL
+};
+
 #endif /* USE_TYPE_LAYOUT */
 
 	/* type_ctor_infos definitions */
@@ -498,6 +612,180 @@
 	(const Word *) & mercury_data___type_ctor_layout_void_0,
 	(const Word *) string_const(""builtin"", 7),
 	(const Word *) string_const(""void"", 4)
+#endif
+};
+
+	/* type_ctor_info for `succip' (only used by accurate gc) */
+
+Declare_entry(mercury__unused_0_0);
+MR_STATIC_CODE_CONST struct mercury_data___type_ctor_info_succip_0_struct {
+	Integer f1;
+	Code *f2;
+	Code *f3;
+	Code *f4;
+#ifdef USE_TYPE_LAYOUT
+	const Word *f5;
+	const Word *f6;
+	const Word *f7;
+	const Word *f8;
+	const Word *f9;
+#endif
+} mercury_data___type_ctor_info_succip_0 = {
+	((Integer) 0),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+#ifdef  USE_TYPE_LAYOUT
+	(const Word *) & mercury_data___type_ctor_layout_succip_0,
+	(const Word *) & mercury_data___type_ctor_functors_succip_0,
+	(const Word *) & mercury_data___type_ctor_layout_succip_0,
+	(const Word *) string_const(""builtin"", 7),
+	(const Word *) string_const(""succip"", 4)
+#endif
+};
+
+	/* type_ctor_info for `hp' (only used by accurate gc) */
+
+Declare_entry(mercury__unused_0_0);
+MR_STATIC_CODE_CONST struct mercury_data___type_ctor_info_hp_0_struct {
+	Integer f1;
+	Code *f2;
+	Code *f3;
+	Code *f4;
+#ifdef USE_TYPE_LAYOUT
+	const Word *f5;
+	const Word *f6;
+	const Word *f7;
+	const Word *f8;
+	const Word *f9;
+#endif
+} mercury_data___type_ctor_info_hp_0 = {
+	((Integer) 0),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+#ifdef  USE_TYPE_LAYOUT
+	(const Word *) & mercury_data___type_ctor_layout_hp_0,
+	(const Word *) & mercury_data___type_ctor_functors_hp_0,
+	(const Word *) & mercury_data___type_ctor_layout_hp_0,
+	(const Word *) string_const(""builtin"", 7),
+	(const Word *) string_const(""hp"", 4)
+#endif
+};
+
+	/* type_ctor_info for `curfr' (only used by accurate gc) */
+
+Declare_entry(mercury__unused_0_0);
+MR_STATIC_CODE_CONST struct mercury_data___type_ctor_info_curfr_0_struct {
+	Integer f1;
+	Code *f2;
+	Code *f3;
+	Code *f4;
+#ifdef USE_TYPE_LAYOUT
+	const Word *f5;
+	const Word *f6;
+	const Word *f7;
+	const Word *f8;
+	const Word *f9;
+#endif
+} mercury_data___type_ctor_info_curfr_0 = {
+	((Integer) 0),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+#ifdef  USE_TYPE_LAYOUT
+	(const Word *) & mercury_data___type_ctor_layout_curfr_0,
+	(const Word *) & mercury_data___type_ctor_functors_curfr_0,
+	(const Word *) & mercury_data___type_ctor_layout_curfr_0,
+	(const Word *) string_const(""builtin"", 7),
+	(const Word *) string_const(""curfr"", 4)
+#endif
+};
+
+	/* type_ctor_info for `maxfr' (only used by accurate gc) */
+
+Declare_entry(mercury__unused_0_0);
+MR_STATIC_CODE_CONST struct mercury_data___type_ctor_info_maxfr_0_struct {
+	Integer f1;
+	Code *f2;
+	Code *f3;
+	Code *f4;
+#ifdef USE_TYPE_LAYOUT
+	const Word *f5;
+	const Word *f6;
+	const Word *f7;
+	const Word *f8;
+	const Word *f9;
+#endif
+} mercury_data___type_ctor_info_maxfr_0 = {
+	((Integer) 0),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+#ifdef  USE_TYPE_LAYOUT
+	(const Word *) & mercury_data___type_ctor_layout_maxfr_0,
+	(const Word *) & mercury_data___type_ctor_functors_maxfr_0,
+	(const Word *) & mercury_data___type_ctor_layout_maxfr_0,
+	(const Word *) string_const(""builtin"", 7),
+	(const Word *) string_const(""maxfr"", 4)
+#endif
+};
+
+	/* type_ctor_info for `redoip' (only used by accurate gc) */
+
+Declare_entry(mercury__unused_0_0);
+MR_STATIC_CODE_CONST struct mercury_data___type_ctor_info_redoip_0_struct {
+	Integer f1;
+	Code *f2;
+	Code *f3;
+	Code *f4;
+#ifdef USE_TYPE_LAYOUT
+	const Word *f5;
+	const Word *f6;
+	const Word *f7;
+	const Word *f8;
+	const Word *f9;
+#endif
+} mercury_data___type_ctor_info_redoip_0 = {
+	((Integer) 0),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+#ifdef  USE_TYPE_LAYOUT
+	(const Word *) & mercury_data___type_ctor_layout_redoip_0,
+	(const Word *) & mercury_data___type_ctor_functors_redoip_0,
+	(const Word *) & mercury_data___type_ctor_layout_redoip_0,
+	(const Word *) string_const(""builtin"", 7),
+	(const Word *) string_const(""redoip"", 4)
+#endif
+};
+
+	/* type_ctor_info for `redofr' (only used by accurate gc) */
+
+Declare_entry(mercury__unused_0_0);
+MR_STATIC_CODE_CONST struct mercury_data___type_ctor_info_redofr_0_struct {
+	Integer f1;
+	Code *f2;
+	Code *f3;
+	Code *f4;
+#ifdef USE_TYPE_LAYOUT
+	const Word *f5;
+	const Word *f6;
+	const Word *f7;
+	const Word *f8;
+	const Word *f9;
+#endif
+} mercury_data___type_ctor_info_redofr_0 = {
+	((Integer) 0),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+	MR_MAYBE_STATIC_CODE(ENTRY(mercury__unused_0_0)),
+#ifdef  USE_TYPE_LAYOUT
+	(const Word *) & mercury_data___type_ctor_layout_redofr_0,
+	(const Word *) & mercury_data___type_ctor_functors_redofr_0,
+	(const Word *) & mercury_data___type_ctor_layout_redofr_0,
+	(const Word *) string_const(""builtin"", 7),
+	(const Word *) string_const(""redofr"", 4)
 #endif
 };
 
cvs diff: Diffing profiler
cvs diff: Diffing runtime
Index: runtime/mercury_layout_util.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_layout_util.c,v
retrieving revision 1.7
diff -u -b -u -r1.7 mercury_layout_util.c
--- mercury_layout_util.c	1999/04/30 06:21:19	1.7
+++ mercury_layout_util.c	1999/05/06 07:52:39
@@ -118,7 +118,6 @@
 	Word				univ_list;
 	Word				univ;
 	Word				value;
-	MR_Live_Type			live_type;
 	Word				type_info;
 	Word				*base_sp;
 	Word				*base_curfr;
@@ -440,15 +439,9 @@
 	Word *type_params, Word *type_info, Word *value)
 {
 	bool	succeeded;
-	Word	*shape;
 	Word	*pseudo_type_info;
 
-	shape = MR_var_pti(vars, i);
-	if (!MR_LIVE_TYPE_IS_VAR(shape)) {
-		return FALSE;
-	}
-
-	pseudo_type_info = MR_LIVE_TYPE_GET_VAR_TYPE(shape);
+	pseudo_type_info = MR_var_pti(vars, i);
 	*type_info = (Word) MR_create_type_info(type_params, pseudo_type_info);
 
 	if (i < MR_long_desc_var_count(vars)) {
@@ -480,12 +473,8 @@
 {
 	bool	succeeded;
 	Word	*pseudo_type_info;
-
-	if (!MR_LIVE_TYPE_IS_VAR(MR_var_pti(vars, i))) {
-		return FALSE;
-	}
 
-	pseudo_type_info = MR_LIVE_TYPE_GET_VAR_TYPE(MR_var_pti(vars, i));
+	pseudo_type_info = MR_var_pti(vars, i);
 	*type_info = (Word) MR_create_type_info(type_params, pseudo_type_info);
 	
 	return TRUE;
Index: runtime/mercury_stack_layout.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_stack_layout.h,v
retrieving revision 1.23
diff -u -b -u -r1.23 mercury_stack_layout.h
--- mercury_stack_layout.h	1999/04/30 06:21:23	1.23
+++ mercury_stack_layout.h	1999/05/06 07:46:56
@@ -198,52 +198,6 @@
 
 /*-------------------------------------------------------------------------*/
 /*
-** Definitions for MR_Live_Type
-*/
-
-/*
-** MR_Live_Type describes live data. This includes:
-** 	- succip, hp, curfr, maxfr, redoip, and
-** 	  mercury data values (vars).
-**
-** The data is encoded such that low values (less than
-** TYPE_CTOR_LAYOUT_MAX_VARINT) represent succip, hp, etc.  Higher values
-** represent data variables, and are pointers to a 2 word cell,
-** containing a pseudo type_info and an instantiation represention.
-**
-** This data is generated in compiler/stack_layout.m, which must be kept
-** in sync with the constants defined here.
-*/
-
-typedef Word MR_Live_Type;
-
-typedef enum {
-	MR_LIVE_TYPE_SUCCIP,
-	MR_LIVE_TYPE_HP,
-	MR_LIVE_TYPE_CURFR,
-	MR_LIVE_TYPE_MAXFR,
-	MR_LIVE_TYPE_REDOIP,
-	MR_LIVE_TYPE_UNWANTED
-} MR_Lval_NonVar;
-
-typedef struct {
-	Word	*pseudo_type_info;
-	Word	inst;	/* not yet used; currently always -1 */
-} MR_Var_Shape_Info;
-
-#define MR_LIVE_TYPE_IS_VAR(T)         ((Word) T > TYPE_CTOR_LAYOUT_MAX_VARINT)
-
-#define MR_LIVE_TYPE_GET_NONVAR(T)			\
-		((MR_Lval_NonVar) T)
-
-#define MR_LIVE_TYPE_GET_VAR_TYPE(T)   			\
-		(((MR_Var_Shape_Info *) T)->pseudo_type_info)
-
-#define MR_LIVE_TYPE_GET_VAR_INST(T)   			\
-		(((MR_Var_Shape_Info *) T)->inst)
-
-/*-------------------------------------------------------------------------*/
-/*
 ** Definitions for MR_Stack_Layout_Vars
 */
 
Index: runtime/mercury_type_info.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_type_info.h,v
retrieving revision 1.20
diff -u -b -u -r1.20 mercury_type_info.h
--- mercury_type_info.h	1999/04/22 01:04:32	1.20
+++ mercury_type_info.h	1999/05/03 01:40:58
@@ -258,7 +258,19 @@
 	MR_TYPE_CTOR_LAYOUT_ARRAY_VALUE,
 	MR_TYPE_CTOR_LAYOUT_TYPEINFO_VALUE,
 	MR_TYPE_CTOR_LAYOUT_C_POINTER_VALUE,
-	MR_TYPE_CTOR_LAYOUT_TYPECLASSINFO_VALUE
+	MR_TYPE_CTOR_LAYOUT_TYPECLASSINFO_VALUE,
+		/*
+		** The following enum values represent the "types" of
+		** of values stored in lvals that the garbage collector
+		** needs to know about.
+		*/
+	MR_TYPE_CTOR_LAYOUT_SUCCIP_VALUE,
+	MR_TYPE_CTOR_LAYOUT_HP_VALUE,
+	MR_TYPE_CTOR_LAYOUT_CURFR_VALUE,
+	MR_TYPE_CTOR_LAYOUT_MAXFR_VALUE,
+	MR_TYPE_CTOR_LAYOUT_REDOFR_VALUE,
+	MR_TYPE_CTOR_LAYOUT_REDOIP_VALUE,
+	MR_TYPE_CTOR_LAYOUT_UNWANTED_VALUE
 };
 
 /* 
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 scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
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
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