[m-rev.] for review: ssdb events for standard library

Peter Wang novalazy at gmail.com
Fri May 28 11:31:43 AEST 2010


On 2010-05-28, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> >+:- pred create_proxy_pred(pred_id::in, pred_id::out,
> >+    module_info::in, module_info::out) is det.
> >+
> >+create_proxy_pred(PredId, NewPredId, !ModuleInfo) :-
> >+    some [!PredInfo] (
> >+        module_info_pred_info(!.ModuleInfo, PredId, !:PredInfo),
> >+        pred_info_set_import_status(status_local, !PredInfo),
> >+
> >+        ProcIds = pred_info_procids(!.PredInfo),
> >+        list.foldl2(create_proxy_proc(PredId), ProcIds, !PredInfo, !ModuleInfo),
> >+
> >+        % Change the name so that the proxy is not confused with the original.
> >+        Name = pred_info_name(!.PredInfo),
> >+        pred_info_set_name("ssdbpr_" ++ Name, !PredInfo),
> 
> I suggest: s/ssdpr_/SSDPR__/.

Ok, SSDBPR__.

> Also, you should probably include the callee's module qualifier in the
> proxy name given that some names are quite common in the library.

It turns out to be unnecessary because the original module name is
retained.  The LLDS and MLDS backends handle it automatically.

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