[m-rev.] For review: add --simplify-stage-215 and extra information to the exception seen in bug90.

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Mar 2 15:55:16 AEDT 2009


On Mon, 2 Mar 2009, Paul Bone wrote:

> On Fri, Feb 27, 2009 at 03:28:53PM +1100, Julien Fischer wrote:
>>
>>> @@ -639,7 +640,9 @@ apply_substs_to_type_map(TRenaming, TSub
>>>        ( Type = ExistingType ->
>>>            true
>>>        ;
>>> -            unexpected(this_file, "inconsistent type_infos")
>>> +            unexpected(this_file, string.format("inconsistent type_infos:
>>> "
>>> +                ++ " Type: %s ExistingType: %s Var0: %s",
>>> +                [s(string(Type)), s(string(ExistingType)),
>>> s(string(Var0))]))
>>>        )
>>>    ;
>>>        svmap.det_insert(Var, Type, !Map)
>>
>> In my opinion there is no point printing out the third of these.
>> It is too much information for users and too little (and in most
>> cases the wrong) information for developers.
>
> This is probably true (I havn't thought about it much), I've fixed it,
> it now only prints out the rtti_infos
>
>
>>> Index: compiler/options.m
>>> ===================================================================
>>> RCS file: /home/mercury1/repository/mercury/compiler/options.m,v
>>> retrieving revision 1.643
>>> diff -u -p -b -r1.643 options.m
>>> --- compiler/options.m	20 Feb 2009 08:19:04 -0000	1.643
>>> +++ compiler/options.m	26 Feb 2009 06:23:54 -0000
>>> @@ -298,7 +298,12 @@
>>>            % we only want to use the `yes' value, but we keep support for
>>>            % the `no' value for benchmarks for the paper.
>>>
>>> -            % Perform coverage profiling, (enables deep profiling).
>>> +    ;       simplify_stage_215
>>> +            % Run the simplification pass at stage 215 (before profiling)
>>> this
>>> +            % is implided by some of the profiling settings.
>>
>>
>> s/implided/implied/
>>
>> You also want to say that the option runs it, even when deep profiling
>> is not enabled.
>>
>> I wouldn't name the option after the stage number.  I thank that
>> simplification pass has a name, pre_prof_transforms or something, so
>> use that instead, e.g.
>>
>> 	--pre-prof-transform-simplify
>>
>
> This is a good idea, I'll do this.  I've named it
> --pre-prof-transforms-simplify since that is the constently used name.
> the hlds dump file was named pre-prof-transform-simplify, I've altered
> this so that it is constentant (transforms is plural).
>
> BTW: Do we use the stage numbers at all other than for sorting the hlds
> dump files lexographicaly.

Yes, as an argument to the --dump-hlds option.  The reason for not using
it in the new option name is that stage numbers can change, i.e. when
stages are re-ordered etc, whereas stage names tend to remain more
stable.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list