[m-rev.] for review: workaround an abort in the polymorphism pass

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri Mar 18 13:26:43 AEDT 2016



On Thu, 17 Mar 2016 00:17:33 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:

> 
> For review by anyone.
> 
> The workaround in this diff addresses the symptom rather than the cause
> of the problem and the request for a review is get feedback on what the
> best approach to the fixing the latter may be.  I was thinking of one of
> the following:
> 
> 1. Update the method definitions in the class table when we remove a proc_id from
> the pred_info.  (Obviously if there are other references in the proc_id in the
> HLDS they should be updated too.)
> 
> 2. Have post_typecheck.m record which pred_proc_ids are invalid (in a similar
> fashion to what we do with pred_ids) and have polymorphism only process the
> method definitions that correspond to valid pred_proc_ids.

I think the former is preferable, if we can guarantee that
we update every part of the HLDS that contains proc_ids.
A search of hlds_*.m should get all the current places.
To handle any future additions of new places that store proc_ids,
I would add a predicate to hlds_module.m to do the deletion
of a given proc_id within a given pred_id, and add comments
on the proc_id type, and on the proc table field in pred_infos,
directing people to update the code of this predicate.

Zoltan.



More information about the reviews mailing list