[m-rev.] for review: term size profiling

Simon Taylor stayl at cs.mu.OZ.AU
Thu Oct 9 15:53:31 AEST 2003


On 09-Oct-2003, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 09-Oct-2003, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > On 01-Oct-2003, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> > > tests/valid/Mmakefile:
> > > 	Disable Aditi tests in term profiling grades, since Aditi will never
> > > 	support term size profiling.
> > 
> > This shouldn't be necessary.
> 
> What shouldn't be necessary?

Disabling the tests.

> Without those changes in the Makefile, those tests failed.

With what error?
 
> > > +		generate_size_var(SizeVar0, KnownSize, Context,
> > > +			SizeVar, SizeGoals, !Info),
> > > +		% The increment_size primitive doesn't actually use the
> > > +		% type_info passed to it, so give it the cheapest type_info
> > > +		% we can build, which is a zero-arity type_ctor_info such as
> > > +		% that of void.
> > > +		make_type_info(Context, void_type, TypeInfoVar,
> > > +			TypeInfoGoals, !Info),
> > > +		TermSizeProfBuiltin = mercury_term_size_prof_builtin_module,
> > > +		goal_util__generate_simple_call(TermSizeProfBuiltin,
> > > +			"increment_size", predicate,
> > > +			[TypeInfoVar, Var, SizeVar], only_mode, det,
> > > +			yes(impure), [], !.Info ^ module_info,
> > > +			Context, UpdateGoal),
> > 
> > You should cast TypeInfoVar to the correct type before passing it
> > to increment_size.
> 
> I'll think about it.
> 
> > Alternatively, you could make increment_size a 
> > no_type_info_builtin.
> 
> It isn't a builtin, and our mechanisms for handling builtins are currently
> not flexible enough to make it a builtin.

no_type_info_builtin is poorly named.  For example,
type_info_from_typeclass_info is a no_type_info_builtin, even
though it is implemented in foreign code in private_builtin.m.

Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list