mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-10 19:19:29 +01:00
+ 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:
parent
4b98b36212
commit
040786e5bb
@ -592,7 +592,7 @@ implementation
|
|||||||
sym:=tsym(symtablestack.top.Find(typename));
|
sym:=tsym(symtablestack.top.Find(typename));
|
||||||
if not assigned(sym) then
|
if not assigned(sym) then
|
||||||
begin
|
begin
|
||||||
sym:=ctypesym.create(orgtypename,cundefineddef.create,true);
|
sym:=ctypesym.create(orgtypename,cundefineddef.create(true),true);
|
||||||
Include(sym.symoptions,sp_generic_dummy);
|
Include(sym.symoptions,sp_generic_dummy);
|
||||||
ttypesym(sym).typedef.typesym:=sym;
|
ttypesym(sym).typedef.typesym:=sym;
|
||||||
sym.visibility:=symtablestack.top.currentvisibility;
|
sym.visibility:=symtablestack.top.currentvisibility;
|
||||||
|
|||||||
@ -2950,7 +2950,7 @@ implementation
|
|||||||
undefinedsym :
|
undefinedsym :
|
||||||
begin
|
begin
|
||||||
p1:=cnothingnode.Create;
|
p1:=cnothingnode.Create;
|
||||||
p1.resultdef:=cundefineddef.create;
|
p1.resultdef:=cundefineddef.create(true);
|
||||||
{ clean up previously created dummy symbol }
|
{ clean up previously created dummy symbol }
|
||||||
srsym.free;
|
srsym.free;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -1228,7 +1228,7 @@ uses
|
|||||||
{ two different typeless parameters are considered as incompatible }
|
{ two different typeless parameters are considered as incompatible }
|
||||||
for i:=firstidx to result.count-1 do
|
for i:=firstidx to result.count-1 do
|
||||||
begin
|
begin
|
||||||
ttypesym(result[i]).typedef:=cundefineddef.create;
|
ttypesym(result[i]).typedef:=cundefineddef.create(true);
|
||||||
ttypesym(result[i]).typedef.typesym:=ttypesym(result[i]);
|
ttypesym(result[i]).typedef.typesym:=ttypesym(result[i]);
|
||||||
end;
|
end;
|
||||||
{ a semicolon terminates a type parameter group }
|
{ a semicolon terminates a type parameter group }
|
||||||
@ -1239,7 +1239,7 @@ uses
|
|||||||
{ two different typeless parameters are considered as incompatible }
|
{ two different typeless parameters are considered as incompatible }
|
||||||
for i:=firstidx to result.count-1 do
|
for i:=firstidx to result.count-1 do
|
||||||
begin
|
begin
|
||||||
ttypesym(result[i]).typedef:=cundefineddef.create;
|
ttypesym(result[i]).typedef:=cundefineddef.create(true);
|
||||||
ttypesym(result[i]).typedef.typesym:=ttypesym(result[i]);
|
ttypesym(result[i]).typedef.typesym:=ttypesym(result[i]);
|
||||||
end;
|
end;
|
||||||
block_type:=old_block_type;
|
block_type:=old_block_type;
|
||||||
|
|||||||
@ -202,7 +202,7 @@ implementation
|
|||||||
hrecst : trecordsymtable;
|
hrecst : trecordsymtable;
|
||||||
begin
|
begin
|
||||||
symtablestack.push(systemunit);
|
symtablestack.push(systemunit);
|
||||||
cundefinedtype:=cundefineddef.create;
|
cundefinedtype:=cundefineddef.create(true);
|
||||||
cformaltype:=cformaldef.create(false);
|
cformaltype:=cformaldef.create(false);
|
||||||
ctypedformaltype:=cformaldef.create(true);
|
ctypedformaltype:=cformaldef.create(true);
|
||||||
voidtype:=corddef.create(uvoid,0,0);
|
voidtype:=corddef.create(uvoid,0,0);
|
||||||
|
|||||||
@ -188,7 +188,7 @@ interface
|
|||||||
tforwarddefclass = class of tforwarddef;
|
tforwarddefclass = class of tforwarddef;
|
||||||
|
|
||||||
tundefineddef = class(tstoreddef)
|
tundefineddef = class(tstoreddef)
|
||||||
constructor create;virtual;
|
constructor create(doregister:boolean);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
override ppuwrite_platform instead }
|
override ppuwrite_platform instead }
|
||||||
@ -7360,9 +7360,9 @@ implementation
|
|||||||
TUNDEFINEDDEF
|
TUNDEFINEDDEF
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tundefineddef.create;
|
constructor tundefineddef.create(doregister:boolean);
|
||||||
begin
|
begin
|
||||||
inherited create(undefineddef,true);
|
inherited create(undefineddef,doregister);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user