mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 13:28:05 +02:00
Try to fix ppudump for generic/inline.
* entfile.pas: Differenciate ibsymtableoptions and ibrecsymtableoptions. * ppu.pas: Increase ppu unit CurrentPPULongVersion value. * utils/ppuutils/ppudump.pp: Add current_symtable_options variable. Change readsymtableoptions from procedure to function returning the new tsymtableoptions. git-svn-id: trunk@42530 -
This commit is contained in:
parent
a84eae8c2e
commit
dca8147958
@ -126,9 +126,9 @@ const
|
||||
|
||||
ibmainname = 90;
|
||||
ibsymtableoptions = 91;
|
||||
ibrecsymtableoptions = 91;
|
||||
ibpackagefiles = 92;
|
||||
ibpackagename = 93;
|
||||
ibrecsymtableoptions = 94;
|
||||
{ target-specific things }
|
||||
iblinkotherframeworks = 100;
|
||||
ibjvmnamespace = 101;
|
||||
|
@ -50,7 +50,7 @@ const
|
||||
CurrentPPUVersion = 207;
|
||||
{ for any other changes to the ppu format, increase this version number
|
||||
(it's a cardinal) }
|
||||
CurrentPPULongVersion = 5;
|
||||
CurrentPPULongVersion = 6;
|
||||
|
||||
{ unit flags }
|
||||
uf_big_endian = $000004;
|
||||
|
@ -468,6 +468,11 @@ var
|
||||
SkipVersionCheck: boolean;
|
||||
SymAnsiStr: boolean;
|
||||
|
||||
var
|
||||
{ needed during tobjectdef parsing... }
|
||||
current_defoptions : tdefoptions;
|
||||
current_objectoptions : tobjectoptions;
|
||||
current_symtable_options : tsymtableoptions;
|
||||
|
||||
{****************************************************************************
|
||||
Helper Routines
|
||||
@ -922,7 +927,7 @@ begin
|
||||
readmanagementoperatoroptions(space,'Fields have MOPs');
|
||||
end;
|
||||
|
||||
procedure readsymtableoptions(const s: string);
|
||||
function readsymtableoptions(const s: string) : tsymtableoptions;
|
||||
type
|
||||
tsymtblopt=record
|
||||
mask : tsymtableoption;
|
||||
@ -967,16 +972,27 @@ begin
|
||||
else
|
||||
write('none');
|
||||
writeln;
|
||||
readsymtableoptions:=options;
|
||||
end;
|
||||
|
||||
procedure readdefinitions(const s:string; ParentDef: TPpuContainerDef); forward;
|
||||
procedure readsymbols(const s:string; ParentDef: TPpuContainerDef = nil); forward;
|
||||
|
||||
procedure readsymtable(const s: string; ParentDef: TPpuContainerDef = nil);
|
||||
var
|
||||
stored_symtable_options : tsymtableoptions;
|
||||
begin
|
||||
readsymtableoptions(s);
|
||||
stored_symtable_options:=current_symtable_options;
|
||||
current_symtable_options:=readsymtableoptions(s);
|
||||
readdefinitions(s, ParentDef);
|
||||
readsymbols(s, ParentDef);
|
||||
current_symtable_options:=stored_symtable_options;
|
||||
end;
|
||||
|
||||
procedure readrecordsymtable(const s: string; ParentDef: TPpuContainerDef = nil);
|
||||
begin
|
||||
readrecsymtableoptions;
|
||||
readsymtable(s, ParentDef);
|
||||
end;
|
||||
|
||||
Procedure ReadLinkContainer(const prefix:string);
|
||||
@ -1851,11 +1867,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
var
|
||||
{ needed during tobjectdef parsing... }
|
||||
current_defoptions : tdefoptions;
|
||||
current_objectoptions : tobjectoptions;
|
||||
|
||||
procedure readcommondef(const s:string; out defoptions: tdefoptions; Def: TPpuDef = nil);
|
||||
type
|
||||
tdefopt=record
|
||||
@ -4075,7 +4086,9 @@ begin
|
||||
readsymtable('parast', TPpuProcDef(def));
|
||||
{ localst }
|
||||
if (pio_has_inlininginfo in implprocoptions) then
|
||||
readsymtable('localst');
|
||||
readsymtable('inline localst')
|
||||
else if (df_generic in defoptions) then
|
||||
readsymtable('generic localst');
|
||||
if (pio_has_inlininginfo in implprocoptions) then
|
||||
readnodetree;
|
||||
delete(space,1,4);
|
||||
@ -4175,8 +4188,7 @@ begin
|
||||
if not(df_copied_def in current_defoptions) then
|
||||
begin
|
||||
space:=' '+space;
|
||||
readrecsymtableoptions;
|
||||
readsymtable('fields',TPpuRecordDef(def));
|
||||
readrecordsymtable('fields',TPpuRecordDef(def));
|
||||
Delete(space,1,4);
|
||||
end;
|
||||
if not EndOfEntry then
|
||||
@ -4295,8 +4307,7 @@ begin
|
||||
begin
|
||||
{read the record definitions and symbols}
|
||||
space:=' '+space;
|
||||
readrecsymtableoptions;
|
||||
readsymtable('fields',objdef);
|
||||
readrecordsymtable('fields',objdef);
|
||||
Delete(space,1,4);
|
||||
end;
|
||||
if not EndOfEntry then
|
||||
|
Loading…
Reference in New Issue
Block a user