mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 13:49:29 +02:00
+ add a method to retrieve a copy of a specialization context
This commit is contained in:
parent
094a353d87
commit
3444b23c9a
@ -51,6 +51,7 @@ type
|
||||
symtable : tsymtable;
|
||||
constructor create;
|
||||
destructor destroy;override;
|
||||
function getcopy:tspecializationcontext;
|
||||
end;
|
||||
|
||||
|
||||
@ -73,5 +74,28 @@ begin
|
||||
inherited destroy;
|
||||
end;
|
||||
|
||||
function tspecializationcontext.getcopy:tspecializationcontext;
|
||||
var
|
||||
posinfo : pfileposinfo;
|
||||
i : longint;
|
||||
begin
|
||||
result:=tspecializationcontext.create;
|
||||
for i:=0 to paramlist.count-1 do
|
||||
begin
|
||||
result.paramlist.add(paramlist[i]);
|
||||
end;
|
||||
for i:=0 to poslist.count-1 do
|
||||
begin
|
||||
new(posinfo);
|
||||
posinfo^:=pfileposinfo(poslist[i])^;
|
||||
result.poslist.add(posinfo);
|
||||
end;
|
||||
result.prettyname:=prettyname;
|
||||
result.specializename:=specializename;
|
||||
result.genname:=genname;
|
||||
result.sym:=sym;
|
||||
result.symtable:=symtable;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user