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

Tyson Dowd trd at cs.mu.OZ.AU
Thu May 27 15:56:14 AEST 1999


On 06-May-1999, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> 
> 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.

Reviewed at last...

> +	/* 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))
> +};

Cut and paste error, this should be MR_TYPE_CTOR_LAYOUT_HP_VALUE.

> +	/* 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

Lenght of succip is 6 not 4.  Similar problem with other string_consts
in the type_ctor_infos.


Apart from this the change is fine.

-- 
The quantum sort: 
	while (!sorted) { do_nothing(); }
Tyson Dowd   <tyson at tyse.net>   http://tyse.net/
--------------------------------------------------------------------------
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