From dd6039716512f6679aacf46e24a5313673a3eaef Mon Sep 17 00:00:00 2001 From: yury Date: Wed, 7 Nov 2018 12:20:30 +0000 Subject: [PATCH] + Added the pio_inline_not_possible flag to timplprocoption. It is set if a function can't be inline (contains an assembler block, etc). When calling such functions, no note "Call to subroutine "?" marked as inline is not inlined" is emitted. git-svn-id: trunk@40254 - --- compiler/ncal.pas | 8 ++++++-- compiler/psub.pas | 1 + compiler/symconst.pas | 4 +++- compiler/utils/ppuutils/ppudump.pp | 3 ++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/compiler/ncal.pas b/compiler/ncal.pas index f5e1042064..f59980b957 100644 --- a/compiler/ncal.pas +++ b/compiler/ncal.pas @@ -4373,8 +4373,12 @@ implementation result:=pass1_inline else begin - if (po_inline in procdefinition.procoptions) and not(po_compilerproc in procdefinition.procoptions) then - Message1(cg_n_no_inline,tprocdef(procdefinition).customprocname([pno_proctypeoption, pno_paranames,pno_ownername, pno_noclassmarker])); + if (po_inline in procdefinition.procoptions) and not(po_compilerproc in procdefinition.procoptions) and + (procdefinition.typ=procdef) and + not (pio_inline_not_possible in tprocdef(procdefinition).implprocoptions) then + begin + Message1(cg_n_no_inline,tprocdef(procdefinition).customprocname([pno_proctypeoption, pno_paranames,pno_ownername, pno_noclassmarker])); + end; mark_unregable_parameters; result:=pass1_normal; end; diff --git a/compiler/psub.pas b/compiler/psub.pas index 67866269c0..ce2a3969e8 100644 --- a/compiler/psub.pas +++ b/compiler/psub.pas @@ -141,6 +141,7 @@ implementation procedure _no_inline(const reason: TMsgStr); begin + include(procdef.implprocoptions,pio_inline_not_possible); Message1(parser_h_not_supported_for_inline,reason); Message(parser_h_inlining_disabled); end; diff --git a/compiler/symconst.pas b/compiler/symconst.pas index 1b662a8616..bb5e65e72f 100644 --- a/compiler/symconst.pas +++ b/compiler/symconst.pas @@ -423,7 +423,9 @@ type { the routine contains no code } pio_empty, { the inline body of this routine is available } - pio_has_inlininginfo + pio_has_inlininginfo, + { inline is not possible (has assembler block, etc) } + pio_inline_not_possible ); timplprocoptions = set of timplprocoption; diff --git a/compiler/utils/ppuutils/ppudump.pp b/compiler/utils/ppuutils/ppudump.pp index 04c78e32e5..4efacf519f 100644 --- a/compiler/utils/ppuutils/ppudump.pp +++ b/compiler/utils/ppuutils/ppudump.pp @@ -2228,7 +2228,8 @@ type const piopt : array[low(timplprocoption)..high(timplprocoption)] of tpiopt=( (mask:pio_empty; str:'IsEmpty'), - (mask:pio_has_inlininginfo; str:'HasInliningInfo') + (mask:pio_has_inlininginfo; str:'HasInliningInfo'), + (mask:pio_inline_not_possible; str:'InlineNotPossible') ); var i: timplprocoption;