summaryrefslogtreecommitdiff
path: root/compiler/pexpr.pas
diff options
context:
space:
mode:
authoryury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-05-06 14:43:49 +0000
committeryury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-05-06 14:43:49 +0000
commit6a3ff195b9064e6f60b5048f3f72290185f6d1d0 (patch)
treec6d86f21ec533fc649def5614210da7206fcf5a2 /compiler/pexpr.pas
parentc475a56295a7d4fc4dbefc5cd062e48d673ea364 (diff)
downloadfpc-6a3ff195b9064e6f60b5048f3f72290185f6d1d0.tar.gz
* If a nested procedure does not access its parent's frame pointer, optimize it by removing the hidden $parentfp parameter.
* Improved the tisogoto1.pp test. git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@45292 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/pexpr.pas')
-rw-r--r--compiler/pexpr.pas2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas
index 95eb9a7eb8..919636e5a4 100644
--- a/compiler/pexpr.pas
+++ b/compiler/pexpr.pas
@@ -337,6 +337,8 @@ implementation
begin
include(current_procinfo.flags,pi_has_nested_exit);
exclude(current_procinfo.procdef.procoptions,po_inline);
+ if is_nested_pd(current_procinfo.procdef) then
+ current_procinfo.set_needs_parentfp(exit_procinfo.procdef.parast.symtablelevel);
exit_procinfo.nestedexitlabel:=clabelsym.create('$nestedexit');