[m-dev.] for review: stack dumps in the debugger and a bug fix

Tyson Dowd trd at cs.mu.OZ.AU
Tue Jun 9 16:52:59 AEST 1998


On 07-Jun-1998, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> 
> Tyson, please review this change. Peter, Fergus, please have a look at the
> tratment of PROFILE_CALLS and PROFILE_TIME.

> @@ -1029,36 +1049,43 @@
>  :- type live_info	--->	live_info(
>  					module_info,
>  					proc_info,
> +					bool,
>  					map(var, type),
>  					varset
>  				).

You should add a comment to document the meaning of the bool (the
other parameters are pretty easy to guess at).

> Index: compiler/polymorphism.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/polymorphism.m,v
> retrieving revision 1.134
> diff -u -u -r1.134 polymorphism.m
> --- polymorphism.m	1998/05/25 21:48:53	1.134
> +++ polymorphism.m	1998/06/03 11:03:04
> @@ -280,20 +280,30 @@
>  
>  :- module polymorphism.
>  :- interface.
> -:- import_module hlds_module.
> +
> +:- import_module hlds_module, prog_data.
>  :- import_module io.
>  
>  :- pred polymorphism__process_module(module_info, module_info,
>  			io__state, io__state).
>  :- mode polymorphism__process_module(in, out, di, uo) is det.
>  
> +	% unsafe_type_cast and unsafe_promise_unique are polymorphic
> +	% builtins which do not need their type_infos. unsafe_type_cast
> +	% can be introduced by common.m after polymorphism is run, so it
> +	% is much simpler to avoid introducing type_info arguments for it.
> +	% Since both of these are really just assignment unifications, it
> +	% is desirable to generate them inline.
> +:- pred polymorphism__no_type_info_builtin(module_name, string, int).
> +:- mode polymorphism__no_type_info_builtin(in, in, out) is semidet.
> +

Probably best to leave this comment in the implementation section, and
add a new commment describing exactly what it is that the predicate tests.

Apart from Fergus's suggestions (well, some of them anyway), the
rest of the change is fine. 

-- 
       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