[m-rev.] for review: pragma input_spec

Zoltan Somogyi zoltan.somogyi at runbox.com
Sun Aug 16 17:13:26 AEST 2026



On Fri, 14 Aug 2026 17:56:27 +1000, Julien Fischer <jfischer at opturion.com> wrote:
> > +input_specialize_in_module(!ModuleInfo) :-
> > +    module_info_get_input_spec_table(!.ModuleInfo, InputSpecTable),
> > +    module_info_get_valid_pred_ids(!.ModuleInfo, PredIds),
> 
> Won't this apply this transformation to uci preds and other compiler-generated
> predicates?  Is that intentional?

I posted a straightforward diff about this yesterday.

> > +rebuild_proc_table_loop(_, [], !ProcTable).
> > +rebuild_proc_table_loop(ProcNum, [ProcInfo | ProcInfos], !ProcTable) :-
> > +    proc_id_to_int(ProcId, ProcNum),
> > +    map.det_insert(ProcId, ProcInfo, !ProcTable),
> > +    rebuild_proc_table_loop(ProcNum + 1, ProcInfos, !ProcTable).
> 
> This seems suspicious. The HLDS has a lot of references to proc_ids.
> Why does this renumbering not invalidate the ones in, for example,
> the list of pragma exported procs? At least, had a comment giving
> a correctness argument.

This is a much more complex issue, or rather set of different issues. 
The attached file contains my proposals for addressing them.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PROC_PROPOSAL
Type: application/octet-stream
Size: 7660 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260816/33a9c0ef/attachment.obj>


More information about the reviews mailing list