diff options
author | yury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-05-06 14:43:49 +0000 |
---|---|---|
committer | yury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-05-06 14:43:49 +0000 |
commit | 6a3ff195b9064e6f60b5048f3f72290185f6d1d0 (patch) | |
tree | c6d86f21ec533fc649def5614210da7206fcf5a2 /compiler/pexpr.pas | |
parent | c475a56295a7d4fc4dbefc5cd062e48d673ea364 (diff) | |
download | fpc-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.pas | 2 |
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'); |