* initialize module id of a symtable always to the id of the current module (at least if there is a current module, which is not the case for the initial macro symtable)

git-svn-id: trunk@35334 -
This commit is contained in:
svenbarth 2017-01-27 13:48:05 +00:00
parent f0a8355b84
commit 969e19ba1a

View File

@ -51,6 +51,7 @@ interface
procedure writedefs(ppufile:tcompilerppufile);
procedure writesyms(ppufile:tcompilerppufile);
public
constructor create(const s:string);
procedure insert(sym:TSymEntry;checkdup:boolean=true);override;
procedure delete(sym:TSymEntry);override;
{ load/write }
@ -450,6 +451,18 @@ implementation
TStoredSymtable
*****************************************************************************}
constructor tstoredsymtable.create(const s:string);
begin
inherited create(s);
{ Note: this happens for the initial macro symtable, so no error here }
if not assigned(current_module) then
comment(v_debug,'Current module not available for module id')
else
moduleid:=current_module.moduleid;
end;
procedure tstoredsymtable.insert(sym:TSymEntry;checkdup:boolean=true);
begin
inherited insert(sym,checkdup);
@ -1060,7 +1073,6 @@ implementation
constructor tabstractrecordsymtable.create(const n:string;usealign,recordminalign,recordmaxCalign:shortint);
begin
inherited create(n);
moduleid:=current_module.moduleid;
_datasize:=0;
databitsize:=0;
recordalignment:=1;