[m-rev.] for review: use intermodule analysis framework for exception analysis

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Feb 1 14:43:01 AEDT 2006


On Wed, 1 Feb 2006, Peter Wang wrote:

> On 2006-01-31, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> > +
> > +:- instance answer_pattern(exception_analysis_answer) where [].
> > +:- instance partial_order(exception_analysis_answer) where [
> > +    (more_precise_than(
> > +            exception_analysis_answer(Status1),
> > +            exception_analysis_answer(Status2)) :-
> > +        exception_status_more_precise_than(Status1, Status2)),
> > +        equivalent(Status, Status)
>
> The indentation here seems wrong.
>

Fixed.

> > +:- pred search_analysis_status_2(module_info::in, pred_proc_id::in,
> > +    exception_status::out, analysis_status::out, scc::in,
> > +    analysis_info::in, analysis_info::out, io::di, io::uo) is det.
> > +
> > +search_analysis_status_2(ModuleInfo, PPId, Result, AnalysisStatus, CallerSCC,
> > +        !AnalysisInfo, !IO) :-
> > +    module_id_func_id(ModuleInfo, PPId, ModuleId, FuncId),
> > +    Call = any_call,
> > +    lookup_best_result(ModuleId, FuncId, Call, MaybeBestStatus, !AnalysisInfo,
> > +        !IO),
>
> Module qualify some of the calls into the analysis framework?
>

IMO, there's not a lot of point doing that here - it just results in
overlong lines.

> > +:- pred should_write_exception_info(module_info::in, pred_id::in,
> > +        pred_info::in, bool::out) is det.
> > +
> > +should_write_exception_info(ModuleInfo, PredId, PredInfo, ShouldWrite) :-
> > +    pred_info_import_status(PredInfo, ImportStatus),
>
> `write_pragma_exceptions' should use `should_write_exception_info'.
>

Done.

Thanks for that.

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