|
@@ -106,8 +106,8 @@ implementation
|
|
|
the parentfpstruct inside the routine in which they were
|
|
|
originally declared, except in the initialisation code for
|
|
|
the parentfpstruct (nf_internal flag) }
|
|
|
- (tabstractnormalvarsym(symtableentry).inparentfpstruct and
|
|
|
- not(nf_internal in flags))) then
|
|
|
+ tabstractnormalvarsym(symtableentry).inparentfpstruct) and
|
|
|
+ not(nf_internal in flags) then
|
|
|
begin
|
|
|
{ get struct holding all locals accessed by nested routines }
|
|
|
nestedvars:=tprocdef(symtable.defowner).parentfpstruct;
|
|
@@ -142,7 +142,6 @@ implementation
|
|
|
var
|
|
|
thissym,
|
|
|
nestedvars: tsym;
|
|
|
- nestedvarsdef: tdef;
|
|
|
begin
|
|
|
result:=inherited;
|
|
|
if assigned(result) then
|
|
@@ -153,11 +152,8 @@ implementation
|
|
|
begin
|
|
|
{ Nested variable? Then we have to move it to a structure that
|
|
|
can be passed by reference to nested routines }
|
|
|
- if assigned(current_procinfo) and
|
|
|
- (symtable.symtabletype in [localsymtable,parasymtable]) and
|
|
|
- ((symtable.symtablelevel<>current_procinfo.procdef.parast.symtablelevel) or
|
|
|
- (tabstractnormalvarsym(symtableentry).inparentfpstruct and
|
|
|
- not(nf_internal in flags))) then
|
|
|
+ if assigned(left) and
|
|
|
+ not(nf_internal in flags) then
|
|
|
begin
|
|
|
{ get struct holding all locals accessed by nested routines }
|
|
|
nestedvars:=tprocdef(symtable.defowner).parentfpstruct;
|
|
@@ -167,7 +163,6 @@ implementation
|
|
|
build_parentfpstruct(tprocdef(symtable.defowner));
|
|
|
nestedvars:=tprocdef(symtable.defowner).parentfpstruct;
|
|
|
end;
|
|
|
- nestedvarsdef:=tlocalvarsym(nestedvars).vardef;
|
|
|
if nestedvars<>symtableentry then
|
|
|
thissym:=nestsym
|
|
|
else
|
|
@@ -185,7 +180,7 @@ implementation
|
|
|
left:=csubscriptnode.create(thissym,cderefnode.create(left));
|
|
|
firstpass(left);
|
|
|
include(flags,nf_internal);
|
|
|
- end;
|
|
|
+ end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|