Martin wrote on Wed, 08 Aug 2012:
On 08/08/2012 15:55, Jonas Maebe wrote:
{$macro on}
{$ifdef debugmsg}
{$define CallSendDebug:=SendDebug}
{$else}
{$define CallSendDebug:=//}
{$endif}
CallSendDebug('|');
Yes I have seen that, and even the macro for continues lines (if params wrap)
But it ne
On 08/08/2012 15:55, Jonas Maebe wrote:
It's possible to do that in a more compact way with a macro (the
following is used in a couple of places in the RTL):
{$macro on}
{$ifdef debugmsg}
{$define CallSendDebug:=SendDebug}
{$else}
{$define CallSendDebug:=//}
{$endif}
CallSendDebug('|');
Yes
On 08/08/2012 15:47, michael.vancann...@wisa.be wrote:
On Wed, 8 Aug 2012, Jonas Maebe wrote:
(or is it possible?
After the body of the called routine has been parsed, it would be
possible in theory (with indeed all the caveats the compiler would
have to take care of such as side effects --
michael.vancanneyt wrote on Wed, 08 Aug 2012:
On Wed, 8 Aug 2012, Jonas Maebe wrote:
After the body of the called routine has been parsed, it would be
possible in theory (with indeed all the caveats the compiler would
have to take care of such as side effects -- note that these may
includ
Martin wrote on Wed, 08 Aug 2012:
That makes me wonder how inlining works? Doesn't inlining need to
know the body?
Yes. Before the body is known, an "inline" function does not get
inlined. That's why units are sometimes recompiled even if you don't
change anything, because in case of cir
On Wed, 8 Aug 2012, Jonas Maebe wrote:
Martin wrote on Wed, 08 Aug 2012:
Out of curiosity. Is there an optimization like this
[removing calculation/load of unused parameters]
No.
(or is it possible?
After the body of the called routine has been parsed, it would be possible in
theory
On 08/08/2012 15:37, Jonas Maebe wrote:
[removing calculation/load of unused parameters]
No.
I assumed that...
(or is it possible?
After the body of the called routine has been parsed, it would be
possible in theory (with indeed all the caveats the compiler would
have to take care of such
Martin wrote on Wed, 08 Aug 2012:
Out of curiosity. Is there an optimization like this
[removing calculation/load of unused parameters]
No.
(or is it possible?
After the body of the called routine has been parsed, it would be
possible in theory (with indeed all the caveats the compiler
Out of curiosity. Is there an optimization like this (or is it possible?
procedure Foo(a:String; B: Integer); inline; // inline is optional
begin
// EMPTY
end;
This is a plain procedure, not a method, not overloaded, not virtual.
And the parameters are both not used in the procedure (But obvi