[m-dev.] for review: improve printing of instmaps (alias branch)
Peter Ross
petdr at cs.mu.OZ.AU
Mon Nov 9 15:54:17 AEDT 1998
On 09-Nov-1998, David Matthew Overton <dmo at cs.mu.OZ.AU> wrote:
> Pete Ross,
>
> Would you please review this?
>
>
> David
>
> Estimated hours taken: 4
>
> Improve printing of instmap_deltas in hlds dumps.
>
> compiler/hlds_out.m:
> Thread an instmap through the predicates used for printing
> goals. This is necessary because the full inst_key_sub from
> the instmap needs to be available when printing insts.
> Also print the inst_key_sub for instmaps and instmap_deltas.
>
> compiler/instmap.m:
> Add a couple of predicates for accessing the inst_key_sub from
> within instmaps and instmap_deltas.
>
> compiler/constraint.m:
> compiler/mode_erros.m:
> compiler/pd_debug.m:
> Pass instmaps where required to calls to hlds_out__write_goal.
>
> compiler/pd_info.m:
> Remove an unused module import from the interface.
>
> @@ -1005,11 +1012,11 @@
> { Verbose \= "" },
> { Else = if_then_else(_, _, _, _, _) - _ }
> ->
> - hlds_out__write_goal_a(Else, InstTable, ModuleInfo, VarSet,
> - AppendVarnums, Indent, "", TypeQual)
> + hlds_out__write_goal_a(Else, InstMap0, InstTable, ModuleInfo,
> + VarSet, AppendVarnums, Indent, "", TypeQual)
> ;
> - hlds_out__write_goal_a(Else, InstTable, ModuleInfo, VarSet,
> - AppendVarnums, Indent1, "", TypeQual)
> + hlds_out__write_goal_a(Else, InstMap0, InstTable, ModuleInfo,
> + VarSet, AppendVarnums, Indent1, "", TypeQual)
> ),
> hlds_out__write_indent(Indent),
> io__write_string(")"),
Could you move the call to hlds_out__write_goal_a out of the
if-then-else and just set the value of Indent{,1} inside the cases.
Otherwise it looks fine.
Pete.
More information about the developers
mailing list