[fpc-pascal] inlining functions

Benito van der Zander benito at benibela.de
Wed Jan 2 00:19:13 CET 2019

Hi Jonas,

That is reasonable. Perhaps the hint should mention that?

But why is this still not inlined::

type TStrBuilder = object
   procedure append(const p: pchar; const l: SizeInt); inline;
   procedure append(const s: RawByteString);


procedure TStrBuilder.append(const p: pchar; const l: SizeInt); inline;

procedure TStrBuilder.append(const s: RawByteString);
   append(pchar(pointer(s)), length(s)); //inlinetest.pas(24,3) Note: 
Call to subroutine "procedure TStrBuilder.append(const p:PChar;const 
l:Int64);" marked as inline is not inlined


Am 01.01.19 um 22:41 schrieb Jonas Maebe:
> On 01/01/19 22:38, Benito van der Zander wrote:
>> and why is it not inlining the count and append call of this string 
>> builder? It is not using any implementation only function
> Routines can only be inlined if they are called after their 
> implementation has been parsed. FPC compiles everything in a single pass.
> Jonas
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190102/6151254b/attachment.html>

More information about the fpc-pascal mailing list