Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-23 Thread Benito van der Zander

Hi,


Isn't rax needed for the call to Free?



I think self stays in rdi

Perhaps we need a new calling convention that keeps self in rax. Or the 
return value in rdi


Cheers,
Benito



Am 21.08.2017 um 15:45 schrieb Stefan Glienke:

Isn't rax needed for the call to Free?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-23 Thread Benito van der Zander

Hi,,


  SomeProc(Builder
.Build('1')
.Build('2')
.Build('3').Value);






That's exactly what I wanted to use it for


And since a string builder is such a low level construct, mostly used 
for performance improvements, it needs to be fast without additional 
instructions




Best,
Benito



Am 22.08.2017 um 14:42 schrieb Kazantsev Alexey via fpc-devel:

On Tue, 22 Aug 2017 13:15:24 +0200 (CEST)
Michael Van Canneyt  wrote:


Call me old-fashioned, but I much prefer

With StdIO::stdOutPrinter() do
  begin
  out("Helllo World ");
  out(42);
  out("");
  hex();
  out(42);
  line();
  end;

I see no point or gain in the "fluent" code.

  SomeProc(Builder
.Build('1')
.Build('2')
.Build('3').Value);



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel