mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-14 13:23:53 +00:00
Delete all the obsolete code using magic numbers (e.g. 10000)
Estimated hours taken: 0.75 compiler/bytecode.m: compiler/code_util.m: compiler/const_prop.m: compiler/hlds_out.m: compiler/intermod.m: compiler/llds_out.m: compiler/make_hlds.m: compiler/mercury_to_c.m: compiler/modes.m: compiler/special_pred.m: compiler/term_errors.m: compiler/trace.m: Delete all the obsolete code using magic numbers (e.g. 10000) for proc_ids. This old hack, whereby make_hlds.m assigned mode numbers based on the priority given to the determinism of each mode, is not needed anymore. It is no longer needed because modecheck_call.m now chooses the mode that is the best fit (based on a variety of factors) rather than just picking the first allowable mode. tests/invalid/duplicate_modes.err_exp: The output for this test changed, in insignificant ways: the order in which it reported the duplicates modes changed, because the mode numbers had changed.
This commit is contained in:
@@ -511,9 +511,7 @@ term_errors__describe_one_pred_name(PredId, Module, Piece) :-
|
||||
|
||||
term_errors__describe_one_proc_name(proc(PredId, ProcId), Module, Piece) :-
|
||||
term_errors__describe_one_pred_name(PredId, Module, PredPiece),
|
||||
proc_id_to_int(ProcId, ProcIdInt0),
|
||||
% strip off the "priority"
|
||||
ProcIdInt is ProcIdInt0 mod 10000,
|
||||
proc_id_to_int(ProcId, ProcIdInt),
|
||||
string__int_to_string(ProcIdInt, ProcIdPart),
|
||||
string__append_list([
|
||||
PredPiece,
|
||||
|
||||
Reference in New Issue
Block a user