mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 13:55:07 +00:00
Clean up the handling of predicate markers (flags).
Estimated hours taken: 3 Clean up the handling of predicate markers (flags). compiler/hlds_pred.m: Delete the `marker_status' type. It was just adding complexity which wasn't being used. Change the "markers list" field of the pred_info from a list(marker_status) to an abstract data type representing a set of markers. Add new access predicates for this ADT. Currently the ADT is still implemented as a list, but it might be a good idea to eventually change it to be an int, using a different bit for each flag. compiler/dnf.m: Don't bother to record `done(dnf)' markers, since they're not needed. compiler/make_hlds.m: Change add_pred_marker so that it adds a single marker, rather than a list of markers. Allowing a list of markers was just adding extra complexity which wasn't being used. compiler/dnf.m: compiler/higher_order.m: compiler/hlds_out.m: compiler/intermod.m: compiler/lambda.m: compiler/make_hlds.m: compiler/mode_errors.m: compiler/modecheck_call.m: compiler/modes.m: compiler/simplify.m: compiler/stratify.m: compiler/term_util.m: compiler/termination.m: compiler/typecheck.m: compiler/unused_args.m: Update to use the new ADT.
This commit is contained in:
@@ -825,8 +825,8 @@ maybe_report_error_no_modes(PredId, PredInfo, ModuleInfo) -->
|
||||
write_mode_inference_messages([], _) --> [].
|
||||
write_mode_inference_messages([PredId | PredIds], ModuleInfo) -->
|
||||
{ module_info_pred_info(ModuleInfo, PredId, PredInfo) },
|
||||
{ pred_info_get_marker_list(PredInfo, Markers) },
|
||||
( { list__member(request(infer_modes), Markers) } ->
|
||||
{ pred_info_get_markers(PredInfo, Markers) },
|
||||
( { check_marker(Markers, infer_modes) } ->
|
||||
{ pred_info_procedures(PredInfo, Procs) },
|
||||
{ map__keys(Procs, ProcIds) },
|
||||
write_mode_inference_messages_2(ProcIds, Procs, PredInfo)
|
||||
|
||||
Reference in New Issue
Block a user