[m-dev.] for review: type specialization [1]

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Feb 17 18:39:53 AEDT 1999


On 17-Feb-1999, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> User-guided type specialization.
> 
> compiler/prog_data.m:
> compiler/prog_prog_io_pragma.m:

s/prog_prog/prog/

Same thing occurs elsewhere.

Apart from that, the log message looks fine.

But your change needs some test cases.

> Index: compiler/dead_proc_elim.m
> ===================================================================
> RCS file: /home/staff/zs/imp/mercury/compiler/dead_proc_elim.m,v
> retrieving revision 1.43
> diff -u -r1.43 dead_proc_elim.m
> --- dead_proc_elim.m	1998/11/02 09:48:58	1.43
> +++ dead_proc_elim.m	1999/02/10 05:01:04
> @@ -686,12 +686,37 @@
>  	list__foldl(dead_pred_elim_initialize, PredIds, 
>  		DeadInfo0, DeadInfo1),
>  	dead_pred_elim_analyze(DeadInfo1, DeadInfo),
> -	DeadInfo = dead_pred_info(ModuleInfo1, _, _, NeededPreds, _),
> +	DeadInfo = dead_pred_info(ModuleInfo1, _, _, NeededPreds2, _),
> +
> +	%
> +	% If a predicate is not needed, predicates which were added in
> +	% make_hlds.m to force type specialization are also not needed.
> +	% Here we add in those which are needed.
> +	%

Why are you doing that _after_ dead_pred_elim_analyze?


> +:- pred compute_extra_typeinfos(higher_order_info::in, list(prog_var)::in,
> +		list(prog_var)::out, list(type)::out) is det.

How about a comment explaining what this predicate is supposed to do?

... to be continued.				 [compiler/hlds_module.m]

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list