mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 11:08:02 +02:00
* store the type of the helper that had been encountered during parsing in the objectdef and by extension the PPU
git-svn-id: trunk@37202 -
This commit is contained in:
parent
50788e8b3b
commit
a6821c63e0
@ -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 }
|
||||
|
@ -43,7 +43,7 @@ type
|
||||
{$endif Test_Double_checksum}
|
||||
|
||||
const
|
||||
CurrentPPUVersion = 194;
|
||||
CurrentPPUVersion = 195;
|
||||
|
||||
{ unit flags }
|
||||
uf_init = $000001; { unit has initialization section }
|
||||
|
@ -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
|
||||
|
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user