Minimize the amount of procedure name mangling done by the .NET backend.

Estimated hours taken: 5
Branches: main, dotnet-foreign

Minimize the amount of procedure name mangling done by the .NET backend.

compiler/ml_code_gen.m:
compiler/ml_code_util.m:
compiler/ml_elim_nested.m:
compiler/ml_util.m:
compiler/mlds.m:
compiler/mlds_to_c.m:
compiler/mlds_to_gcc.m:
compiler/mlds_to_java.m:
compiler/rtti_to_mlds.m:
	Add the code_model and a boolean indicating whether this
	function (if it is a function) *doesn't* have a return value
	(i.e. it has a non-default mode).

	Also move is_output_det_function into ml_code_util.m and rename it
	ml_is_output_det_function.

compiler/mlds_to_il.m:
	Mangle much more carefully.  We still mangle in a predictable,
	context-insensitive manner, however we take advantage of the
	overloading available in the .NET backend to avoid name clashes
	in most cases.
This commit is contained in:
Tyson Dowd
2001-05-10 15:07:59 +00:00
parent 27cd378292
commit cbdd5a68d5
10 changed files with 157 additions and 69 deletions

View File

@@ -346,7 +346,7 @@ wrap_predicate(ModuleName, Defn, ClassDefn) :-
(
Label = special_pred(PredName, _, _, _)
;
Label = pred(_, _, PredName, _)
Label = pred(_, _, PredName, _, _, _)
)
->
@@ -1119,7 +1119,8 @@ output_name(export(Name)) -->
:- pred output_pred_label(mlds__pred_label, io__state, io__state).
:- mode output_pred_label(in, di, uo) is det.
output_pred_label(pred(PredOrFunc, MaybeDefiningModule, Name, Arity)) -->
output_pred_label(pred(PredOrFunc, MaybeDefiningModule, Name, Arity,
_CodeModel, _NonOutputFunc)) -->
( { PredOrFunc = predicate, Suffix = "p" }
; { PredOrFunc = function, Suffix = "f" }
),