diff --git a/compiler/entfile.pas b/compiler/entfile.pas index 8f76703bfd..d91e99f994 100644 --- a/compiler/entfile.pas +++ b/compiler/entfile.pas @@ -126,9 +126,9 @@ const ibmainname = 90; ibsymtableoptions = 91; - ibrecsymtableoptions = 91; ibpackagefiles = 92; ibpackagename = 93; + ibrecsymtableoptions = 94; { target-specific things } iblinkotherframeworks = 100; ibjvmnamespace = 101; diff --git a/compiler/ppu.pas b/compiler/ppu.pas index 8527b8690f..2295b3fe31 100644 --- a/compiler/ppu.pas +++ b/compiler/ppu.pas @@ -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; diff --git a/compiler/utils/ppuutils/ppudump.pp b/compiler/utils/ppuutils/ppudump.pp index 5447c2b370..c0c6c63c78 100644 --- a/compiler/utils/ppuutils/ppudump.pp +++ b/compiler/utils/ppuutils/ppudump.pp @@ -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