+ write aliasnames to ppu as well

+ ppudump updated
* ppu version increased

git-svn-id: trunk@9064 -
This commit is contained in:
florian 2007-11-02 20:50:01 +00:00
parent 59b5a3b928
commit 4fed8c4ab5
3 changed files with 108 additions and 66 deletions

View File

@ -43,7 +43,7 @@ type
{$endif Test_Double_checksum}
const
CurrentPPUVersion=86;
CurrentPPUVersion = 87;
{ buffer sizes }
maxentrysize = 1024;

View File

@ -2833,6 +2833,8 @@ implementation
constructor tprocdef.ppuload(ppufile:tcompilerppufile);
var
i,aliasnamescount : longint;
item : TCmdStrListItem;
level : byte;
begin
inherited ppuload(procdef,ppufile);
@ -2878,6 +2880,13 @@ implementation
inlininginfo:=nil;
funcretsym:=nil;
end;
aliasnames:=TCmdStrList.create;
{ count alias names }
aliasnamescount:=ppufile.getbyte;
for i:=1 to aliasnamescount do
aliasnames.insert(ppufile.getstring);
{ load para symtable }
parast:=tparasymtable.create(self,level);
tparasymtable(parast).ppuload(ppufile);
@ -2897,7 +2906,6 @@ implementation
(tf_need_export in target_info.flags) and
(po_exports in procoptions) then
deffile.AddExport(mangledname);
aliasnames:=TCmdStrList.create;
forwarddef:=false;
interfacedef:=false;
hasforward:=false;
@ -2959,6 +2967,8 @@ implementation
procedure tprocdef.ppuwrite(ppufile:tcompilerppufile);
var
oldintfcrc : boolean;
aliasnamescount : longint;
item : TCmdStrListItem;
begin
{ released procdef? }
if not assigned(parast) then
@ -2967,6 +2977,7 @@ implementation
inherited ppuwrite(ppufile);
if po_has_mangledname in procoptions then
ppufile.putstring(_mangledname^);
ppufile.putword(extnumber);
ppufile.putbyte(parast.symtablelevel);
ppufile.putderef(_classderef);
@ -2997,6 +3008,25 @@ implementation
ppufile.putderef(funcretsymderef);
ppufile.putsmallset(inlininginfo^.flags);
end;
{ count alias names }
aliasnamescount:=0;
item:=TCmdStrListItem(aliasnames.first);
while assigned(item) do
begin
inc(aliasnamescount);
item:=TCmdStrListItem(item.next);
end;
if aliasnamescount>255 then
internalerror(200711021);
ppufile.putbyte(aliasnamescount);
item:=TCmdStrListItem(aliasnames.first);
while assigned(item) do
begin
ppufile.putstring(item.str);
item:=TCmdStrListItem(item.next);
end;
ppufile.do_crc:=oldintfcrc;
{ write this entry }

View File

@ -31,7 +31,7 @@ uses
tokens;
const
Version = 'Version 2.2.0';
Version = 'Version 2.3.1';
Title = 'PPU-Analyser';
Copyright = 'Copyright (c) 1998-2007 by the Free Pascal Development Team';
@ -1778,6 +1778,18 @@ begin
ppufile.getsmallset(procinfooptions);
writeln(space,' ProcInfoOptions : ',dword(procinfooptions));
end;
b:=ppufile.getbyte;
if b<>0 then
begin
write (space,' Alias names : ');
for j:=1 to b do
begin
write(ppufile.getstring);
if j<b then
write(', ');
end;
writeln;
end;
if not EndOfEntry then
Writeln('!! Entry has more information stored');
space:=' '+space;