mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 19:08:15 +02:00
+ add a field to denote that a symbol (mainly local and parameter ones) was captured through another symbol
This commit is contained in:
parent
ec96d4242a
commit
b297199ab6
@ -260,12 +260,15 @@ interface
|
||||
{ the variable is not living at entry of the scope, so it does not need to be initialized if it is a reg. var
|
||||
(not written to ppu, because not important and would change interface crc) }
|
||||
noregvarinitneeded : boolean;
|
||||
{ not stored in PPU! }
|
||||
capture_sym : tsym;
|
||||
constructor create(st:tsymtyp;const n : TSymStr;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
||||
constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
|
||||
function globalasmsym: boolean;
|
||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||
procedure buildderef;override;
|
||||
procedure deref;override;
|
||||
function is_captured:boolean;
|
||||
end;
|
||||
|
||||
tlocalvarsym = class(tabstractnormalvarsym)
|
||||
@ -2127,6 +2130,12 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function tabstractnormalvarsym.is_captured:boolean;
|
||||
begin
|
||||
result:=assigned(capture_sym);
|
||||
end;
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
Tstaticvarsym
|
||||
****************************************************************************}
|
||||
|
Loading…
Reference in New Issue
Block a user