+ extend tundefineddef with the possiblity to create it as unregistered

* for now all undefineddefs are created as registered
Note: an additional parameter instead of an overload is used for tundefineddef.create as otherwise both constructors would need to be overridden in potential descendant CPU-specific classes...

git-svn-id: trunk@31757 -
This commit is contained in:
svenbarth 2015-09-18 13:08:58 +00:00
parent 4b98b36212
commit 040786e5bb
5 changed files with 8 additions and 8 deletions

View File

@ -592,7 +592,7 @@ implementation
sym:=tsym(symtablestack.top.Find(typename));
if not assigned(sym) then
begin
sym:=ctypesym.create(orgtypename,cundefineddef.create,true);
sym:=ctypesym.create(orgtypename,cundefineddef.create(true),true);
Include(sym.symoptions,sp_generic_dummy);
ttypesym(sym).typedef.typesym:=sym;
sym.visibility:=symtablestack.top.currentvisibility;

View File

@ -2950,7 +2950,7 @@ implementation
undefinedsym :
begin
p1:=cnothingnode.Create;
p1.resultdef:=cundefineddef.create;
p1.resultdef:=cundefineddef.create(true);
{ clean up previously created dummy symbol }
srsym.free;
end;

View File

@ -1228,7 +1228,7 @@ uses
{ two different typeless parameters are considered as incompatible }
for i:=firstidx to result.count-1 do
begin
ttypesym(result[i]).typedef:=cundefineddef.create;
ttypesym(result[i]).typedef:=cundefineddef.create(true);
ttypesym(result[i]).typedef.typesym:=ttypesym(result[i]);
end;
{ a semicolon terminates a type parameter group }
@ -1239,7 +1239,7 @@ uses
{ two different typeless parameters are considered as incompatible }
for i:=firstidx to result.count-1 do
begin
ttypesym(result[i]).typedef:=cundefineddef.create;
ttypesym(result[i]).typedef:=cundefineddef.create(true);
ttypesym(result[i]).typedef.typesym:=ttypesym(result[i]);
end;
block_type:=old_block_type;

View File

@ -202,7 +202,7 @@ implementation
hrecst : trecordsymtable;
begin
symtablestack.push(systemunit);
cundefinedtype:=cundefineddef.create;
cundefinedtype:=cundefineddef.create(true);
cformaltype:=cformaldef.create(false);
ctypedformaltype:=cformaldef.create(true);
voidtype:=corddef.create(uvoid,0,0);

View File

@ -188,7 +188,7 @@ interface
tforwarddefclass = class of tforwarddef;
tundefineddef = class(tstoreddef)
constructor create;virtual;
constructor create(doregister:boolean);virtual;
constructor ppuload(ppufile:tcompilerppufile);
{ do not override this routine in platform-specific subclasses,
override ppuwrite_platform instead }
@ -7360,9 +7360,9 @@ implementation
TUNDEFINEDDEF
****************************************************************************}
constructor tundefineddef.create;
constructor tundefineddef.create(doregister:boolean);
begin
inherited create(undefineddef,true);
inherited create(undefineddef,doregister);
end;