<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body smarttemplateinserted="true">
    <div id="smartTemplate4-template">Hi Jonas,<br>
    </div>
    <div><br>
    </div>
    <div>That is reasonable. Perhaps the hint should mention that?</div>
    <div><br>
      <p>But why is this still not inlined::</p>
      <p>type TStrBuilder = object<br>
          procedure append(const p: pchar; const l: SizeInt); inline;<br>
          procedure append(const s: RawByteString);<br>
        end;<br>
        <br>
        implementation<br>
        <br>
        procedure TStrBuilder.append(const p: pchar; const l: SizeInt);
        inline;<br>
        begin<br>
        end;<br>
        <br>
        <br>
        procedure TStrBuilder.append(const s: RawByteString);<br>
        begin<br>
          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<br>
        end;<br>
        <br>
      </p>
      <br>
      <br>
      Best,<br>
      Benito </div>
    <br>
    <div class="moz-cite-prefix">Am 01.01.19 um 22:41 schrieb Jonas
      Maebe:<br>
    </div>
    <blockquote type="cite"
      cite="mid:a2d79a4f-e8e0-0138-e324-740990f5484c@freepascal.org">On
      01/01/19 22:38, Benito van der Zander wrote:
      <br>
      <blockquote type="cite">and why is it not inlining the count and
        append call of this string builder? It is not using any
        implementation only function
        <br>
      </blockquote>
      <br>
      Routines can only be inlined if they are called after their
      implementation has been parsed. FPC compiles everything in a
      single pass.
      <br>
      <br>
      <br>
      Jonas
      <br>
      _______________________________________________
      <br>
      fpc-pascal maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br>
    </blockquote>
  </body>
</html>