|
@@ -773,6 +773,8 @@ interface
|
|
procdef has been handled }
|
|
procdef has been handled }
|
|
implprocdefinfo : pimplprocdefinfo;
|
|
implprocdefinfo : pimplprocdefinfo;
|
|
|
|
|
|
|
|
+ function store_localst:boolean;
|
|
|
|
+
|
|
function GetResultName: PShortString;
|
|
function GetResultName: PShortString;
|
|
procedure SetResultName(AValue: PShortString);
|
|
procedure SetResultName(AValue: PShortString);
|
|
function GetParentFPStruct: tsym;
|
|
function GetParentFPStruct: tsym;
|
|
@@ -5716,6 +5718,13 @@ implementation
|
|
TPROCDEF
|
|
TPROCDEF
|
|
***************************************************************************}
|
|
***************************************************************************}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ function tprocdef.store_localst: boolean;
|
|
|
|
+ begin
|
|
|
|
+ result:=has_inlininginfo or (df_generic in defoptions);
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+
|
|
function tprocdef.GetResultName: PShortString;
|
|
function tprocdef.GetResultName: PShortString;
|
|
begin
|
|
begin
|
|
if not assigned(implprocdefinfo) then
|
|
if not assigned(implprocdefinfo) then
|
|
@@ -6039,7 +6048,7 @@ implementation
|
|
parast:=tparasymtable.create(self,level);
|
|
parast:=tparasymtable.create(self,level);
|
|
tparasymtable(parast).ppuload(ppufile);
|
|
tparasymtable(parast).ppuload(ppufile);
|
|
{ load local symtable }
|
|
{ load local symtable }
|
|
- if has_inlininginfo then
|
|
|
|
|
|
+ if store_localst then
|
|
begin
|
|
begin
|
|
localst:=tlocalsymtable.create(self,level);
|
|
localst:=tlocalsymtable.create(self,level);
|
|
tlocalsymtable(localst).ppuload(ppufile);
|
|
tlocalsymtable(localst).ppuload(ppufile);
|
|
@@ -6221,7 +6230,7 @@ implementation
|
|
|
|
|
|
{ save localsymtable for inline procedures or when local
|
|
{ save localsymtable for inline procedures or when local
|
|
browser info is requested, this has no influence on the crc }
|
|
browser info is requested, this has no influence on the crc }
|
|
- if has_inlininginfo then
|
|
|
|
|
|
+ if store_localst and not ppufile.crc_only then
|
|
begin
|
|
begin
|
|
oldintfcrc:=ppufile.do_crc;
|
|
oldintfcrc:=ppufile.do_crc;
|
|
ppufile.do_crc:=false;
|
|
ppufile.do_crc:=false;
|
|
@@ -6512,16 +6521,16 @@ implementation
|
|
begin
|
|
begin
|
|
inherited buildderefimpl;
|
|
inherited buildderefimpl;
|
|
|
|
|
|
|
|
+ { Localst is not available for main/unit init }
|
|
|
|
+ if store_localst and assigned(localst) then
|
|
|
|
+ begin
|
|
|
|
+ tlocalsymtable(localst).buildderef;
|
|
|
|
+ tlocalsymtable(localst).buildderefimpl;
|
|
|
|
+ end;
|
|
|
|
+
|
|
{ inline tree }
|
|
{ inline tree }
|
|
if has_inlininginfo then
|
|
if has_inlininginfo then
|
|
begin
|
|
begin
|
|
- { Localst is not available for main/unit init }
|
|
|
|
- if assigned(localst) then
|
|
|
|
- begin
|
|
|
|
- tlocalsymtable(localst).buildderef;
|
|
|
|
- tlocalsymtable(localst).buildderefimpl;
|
|
|
|
- end;
|
|
|
|
-
|
|
|
|
funcretsymderef.build(funcretsym);
|
|
funcretsymderef.build(funcretsym);
|
|
inlininginfo^.code.buildderefimpl;
|
|
inlininginfo^.code.buildderefimpl;
|
|
end;
|
|
end;
|
|
@@ -6546,16 +6555,16 @@ implementation
|
|
if assigned(inlininginfo) then
|
|
if assigned(inlininginfo) then
|
|
has_inlininginfo:=true;
|
|
has_inlininginfo:=true;
|
|
|
|
|
|
|
|
+ { Locals }
|
|
|
|
+ if store_localst and assigned(localst) then
|
|
|
|
+ begin
|
|
|
|
+ tlocalsymtable(localst).deref(false);
|
|
|
|
+ tlocalsymtable(localst).derefimpl(false);
|
|
|
|
+ end;
|
|
|
|
+
|
|
{ Inline }
|
|
{ Inline }
|
|
if has_inlininginfo then
|
|
if has_inlininginfo then
|
|
begin
|
|
begin
|
|
- { Locals }
|
|
|
|
- if assigned(localst) then
|
|
|
|
- begin
|
|
|
|
- tlocalsymtable(localst).deref(false);
|
|
|
|
- tlocalsymtable(localst).derefimpl(false);
|
|
|
|
- end;
|
|
|
|
-
|
|
|
|
inlininginfo^.code.derefimpl;
|
|
inlininginfo^.code.derefimpl;
|
|
{ funcretsym, this is always located in the localst }
|
|
{ funcretsym, this is always located in the localst }
|
|
funcretsym:=tsym(funcretsymderef.resolve);
|
|
funcretsym:=tsym(funcretsymderef.resolve);
|