|
@@ -263,7 +263,7 @@ interface
|
|
{ for targets that initialise typed constants via explicit assignments
|
|
{ for targets that initialise typed constants via explicit assignments
|
|
instead of by generating an initialised data sectino }
|
|
instead of by generating an initialised data sectino }
|
|
tcinitcode : tnode;
|
|
tcinitcode : tnode;
|
|
- constructor create(const n:string; dt:tdeftyp);
|
|
|
|
|
|
+ constructor create(const n:string; dt:tdeftyp;doregister:boolean);
|
|
constructor ppuload(dt:tdeftyp;ppufile:tcompilerppufile);
|
|
constructor ppuload(dt:tdeftyp;ppufile:tcompilerppufile);
|
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
|
destructor destroy; override;
|
|
destructor destroy; override;
|
|
@@ -413,7 +413,7 @@ interface
|
|
}
|
|
}
|
|
classref_created_in_current_module : boolean;
|
|
classref_created_in_current_module : boolean;
|
|
objecttype : tobjecttyp;
|
|
objecttype : tobjecttyp;
|
|
- constructor create(ot:tobjecttyp;const n:string;c:tobjectdef);virtual;
|
|
|
|
|
|
+ constructor create(ot:tobjecttyp;const n:string;c:tobjectdef;doregister:boolean);virtual;
|
|
constructor ppuload(ppufile:tcompilerppufile);
|
|
constructor ppuload(ppufile:tcompilerppufile);
|
|
destructor destroy;override;
|
|
destructor destroy;override;
|
|
function getcopy : tstoreddef;override;
|
|
function getcopy : tstoreddef;override;
|
|
@@ -3734,9 +3734,9 @@ implementation
|
|
tabstractrecorddef
|
|
tabstractrecorddef
|
|
***************************************************************************}
|
|
***************************************************************************}
|
|
|
|
|
|
- constructor tabstractrecorddef.create(const n:string; dt:tdeftyp);
|
|
|
|
|
|
+ constructor tabstractrecorddef.create(const n:string; dt:tdeftyp;doregister:boolean);
|
|
begin
|
|
begin
|
|
- inherited create(dt,true);
|
|
|
|
|
|
+ inherited create(dt,doregister);
|
|
objname:=stringdup(upper(n));
|
|
objname:=stringdup(upper(n));
|
|
objrealname:=stringdup(n);
|
|
objrealname:=stringdup(n);
|
|
objectoptions:=[];
|
|
objectoptions:=[];
|
|
@@ -4104,7 +4104,7 @@ implementation
|
|
|
|
|
|
constructor trecorddef.create(const n:string; p:TSymtable);
|
|
constructor trecorddef.create(const n:string; p:TSymtable);
|
|
begin
|
|
begin
|
|
- inherited create(n,recorddef);
|
|
|
|
|
|
+ inherited create(n,recorddef,true);
|
|
symtable:=p;
|
|
symtable:=p;
|
|
{ we can own the symtable only if nobody else owns a copy so far }
|
|
{ we can own the symtable only if nobody else owns a copy so far }
|
|
if symtable.refcount=1 then
|
|
if symtable.refcount=1 then
|
|
@@ -4131,7 +4131,7 @@ implementation
|
|
symtable:=trecordsymtable.create(n,packrecords,recordalignmin,maxCrecordalign);
|
|
symtable:=trecordsymtable.create(n,packrecords,recordalignmin,maxCrecordalign);
|
|
symtable.defowner:=self;
|
|
symtable.defowner:=self;
|
|
isunion:=false;
|
|
isunion:=false;
|
|
- inherited create(n,recorddef);
|
|
|
|
|
|
+ inherited create(n,recorddef,true);
|
|
{ if we specified a name, then we'll probably want to look up the
|
|
{ if we specified a name, then we'll probably want to look up the
|
|
type again by name too -> create typesym }
|
|
type again by name too -> create typesym }
|
|
ts:=nil;
|
|
ts:=nil;
|
|
@@ -6125,9 +6125,9 @@ implementation
|
|
TOBJECTDEF
|
|
TOBJECTDEF
|
|
***************************************************************************}
|
|
***************************************************************************}
|
|
|
|
|
|
- constructor tobjectdef.create(ot:tobjecttyp;const n:string;c:tobjectdef);
|
|
|
|
|
|
+ constructor tobjectdef.create(ot:tobjecttyp;const n:string;c:tobjectdef;doregister:boolean);
|
|
begin
|
|
begin
|
|
- inherited create(n,objectdef);
|
|
|
|
|
|
+ inherited create(n,objectdef,doregister);
|
|
fcurrent_dispid:=0;
|
|
fcurrent_dispid:=0;
|
|
objecttype:=ot;
|
|
objecttype:=ot;
|
|
childof:=nil;
|
|
childof:=nil;
|
|
@@ -6310,7 +6310,7 @@ implementation
|
|
var
|
|
var
|
|
i : longint;
|
|
i : longint;
|
|
begin
|
|
begin
|
|
- result:=cobjectdef.create(objecttype,objrealname^,childof);
|
|
|
|
|
|
+ result:=cobjectdef.create(objecttype,objrealname^,childof,true);
|
|
{ the constructor allocates a symtable which we release to avoid memory leaks }
|
|
{ the constructor allocates a symtable which we release to avoid memory leaks }
|
|
tobjectdef(result).symtable.free;
|
|
tobjectdef(result).symtable.free;
|
|
tobjectdef(result).symtable:=symtable.getcopy;
|
|
tobjectdef(result).symtable:=symtable.getcopy;
|