diff --git a/compiler/pdecobj.pas b/compiler/pdecobj.pas index a372af81eb..8af9edc2f8 100644 --- a/compiler/pdecobj.pas +++ b/compiler/pdecobj.pas @@ -1381,6 +1381,7 @@ implementation { create new class } current_structdef:=cobjectdef.create(objecttype,n,nil,true); + tobjectdef(current_structdef).helpertype:=helpertype; { include always the forward flag, it'll be removed after the parent class have been added. This is to prevent circular childof loops } diff --git a/compiler/ppu.pas b/compiler/ppu.pas index 9d456322ba..b56e3ed640 100644 --- a/compiler/ppu.pas +++ b/compiler/ppu.pas @@ -43,7 +43,7 @@ type {$endif Test_Double_checksum} const - CurrentPPUVersion = 194; + CurrentPPUVersion = 195; { unit flags } uf_init = $000001; { unit has initialization section } diff --git a/compiler/symdef.pas b/compiler/symdef.pas index 213099ba02..f7a4ee9fe7 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -404,6 +404,7 @@ interface { for Object Pascal helpers } extendeddef : tdef; extendeddefderef: tderef; + helpertype : thelpertype; { for Objective-C: protocols and classes can have the same name there } objextname : pshortstring; { to be able to have a variable vmt position } @@ -6553,6 +6554,7 @@ implementation begin inherited ppuload(objectdef,ppufile); objecttype:=tobjecttyp(ppufile.getbyte); + helpertype:=thelpertype(ppufile.getbyte); objextname:=ppufile.getpshortstring; { only used for external Objective-C classes/protocols } if (objextname^='') then @@ -6757,6 +6759,7 @@ implementation ppufile.do_indirect_crc:=true; inherited ppuwrite(ppufile); ppufile.putbyte(byte(objecttype)); + ppufile.putbyte(byte(helpertype)); if assigned(objextname) then ppufile.putstring(objextname^) else diff --git a/compiler/utils/ppuutils/ppudump.pp b/compiler/utils/ppuutils/ppudump.pp index 93d8cb1420..e0127f5904 100644 --- a/compiler/utils/ppuutils/ppudump.pp +++ b/compiler/utils/ppuutils/ppudump.pp @@ -2899,6 +2899,7 @@ procedure readdefinitions(const s:string; ParentDef: TPpuContainerDef); { type tobjecttyp is in symconst unit } { type tvarianttype is in symconst unit } +{ type thelpertype is in symconst unit } var b : byte; l,j,tokenbufsize : longint; @@ -3382,6 +3383,15 @@ begin odt_helper: objdef.ObjType:=otHelper; end; + b:=getbyte; + write ([space,' Helper Type : ']); + case thelpertype(b) of + ht_none : writeln('none'); + ht_class : writeln('class helper'); + ht_record : writeln('record helper'); + ht_type : writeln('type helper'); + else WriteWarning('Invalid helper type: ' + IntToStr(b)); + end; writeln([space,' External name : ',getstring]); objdef.Size:=getasizeint; writeln([space,' DataSize : ',objdef.Size]);