* store defstates in ppu, this field keeps the info what

is generated for a def so it can be reused, e.g. dwarf debuginfo

git-svn-id: trunk@8920 -
This commit is contained in:
peter 2007-10-23 21:50:10 +00:00
parent 370f05c516
commit 273bfffe5b
3 changed files with 29 additions and 8 deletions

View File

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

View File

@ -889,6 +889,7 @@ implementation
{ load }
ppufile.getderef(typesymderef);
ppufile.getsmallset(defoptions);
ppufile.getsmallset(defstates);
if df_generic in defoptions then
begin
sizeleft:=ppufile.getlongint;
@ -952,10 +953,11 @@ implementation
ppufile.putlongint(DefId);
ppufile.putderef(typesymderef);
ppufile.putsmallset(defoptions);
oldintfcrc:=ppufile.do_interface_crc;
ppufile.do_interface_crc:=false;
ppufile.putsmallset(defstates);
if df_generic in defoptions then
begin
oldintfcrc:=ppufile.do_interface_crc;
ppufile.do_interface_crc:=false;
if assigned(generictokenbuf) then
begin
sizeleft:=generictokenbuf.size;
@ -974,8 +976,8 @@ implementation
ppufile.putdata(buf,i);
dec(sizeleft,i);
end;
ppufile.do_interface_crc:=oldintfcrc;
end;
ppufile.do_interface_crc:=oldintfcrc;
if df_specialization in defoptions then
ppufile.putderef(genericdefderef);
end;

View File

@ -780,6 +780,7 @@ const
);
var
defoptions : tdefoptions;
defstates : tdefstates;
i : longint;
first : boolean;
tokenbufsize : longint;
@ -806,8 +807,22 @@ begin
end;
writeln;
if df_unique in defoptions then
writeln (space,' Unique type symbol');
write (space,' DefStates : ');
ppufile.getsmallset(defstates);
if defstates<>[] then
begin
first:=true;
for i:=1to defstateinfos do
if (defstate[i].mask in defstates) then
begin
if first then
first:=false
else
write(', ');
write(defstate[i].str);
end;
end;
writeln;
if df_generic in defoptions then
begin
@ -1209,6 +1224,7 @@ begin
readcommonsym(s);
writeln(space,' Spez : ',Varspez2Str(ppufile.getbyte));
writeln(space,' Regable : ',Varregable2Str(ppufile.getbyte));
writeln(space,' Addr Taken : ',(ppufile.getbyte<>0));
write (space,' Var Type : ');
readderef;
ppufile.getsmallset(varoptions);
@ -1444,7 +1460,7 @@ begin
begin
write (space,' OrdinalType : ');
readderef;
writeln(space,' Value : ',getint64);
writeln(space,' Value : ',constexp.tostr(getexprint));
end;
constpointer :
begin
@ -1902,7 +1918,10 @@ begin
end;
ibformaldef :
readcommondef('Generic definition (void-typ)');
begin
readcommondef('Generic definition (void-typ)');
writeln(space,' Is Typed : ',(getbyte<>0));
end;
ibundefineddef :
readcommondef('Undefined definition (generic parameter)');