Avoid a bug where duplicate declarations were not being detected.

Estimated hours taken: 7
Branches: main

Avoid a bug where duplicate declarations were not being detected.
This prevented the compiler from bootstraping with MSVC in the grade
none.gc.tr.debug.

compiler/rtti.m:
	Remove the varset from the rtti_proc_label structure.  This is
	because rtti_proc_label is used as part of the key for the
	decl_set structure and sometimes the varset contains all the
	variables in the proc and sometimes only the headvariables
	leading to different keys representing the same declaration.
	Instead record the prog_var and its name together in an
	assoc_list.

compiler/code_util.m:
compiler/ml_code_util.m:
	Handle the new rtti_proc_label structure.
This commit is contained in:
Peter Ross
2002-11-01 09:56:54 +00:00
parent 2040556da6
commit f43612a3ee
3 changed files with 17 additions and 10 deletions

View File

@@ -294,7 +294,7 @@ code_util__make_proc_label(ModuleInfo, PredId, ProcId, ProcLabel) :-
code_util__make_proc_label_from_rtti(RttiProcLabel) = ProcLabel :-
RttiProcLabel = rtti_proc_label(PredOrFunc, ThisModule,
PredModule, PredName, PredArity, ArgTypes, _PredId, ProcId,
_VarSet, _HeadVars, _ArgModes, _CodeModel,
_HeadVarsWithNames, _ArgModes, _CodeModel,
IsImported, _IsPseudoImported, _IsExported,
IsSpecialPredInstance),
(