[fpc-pascal] Inline methods
LacaK
lacak at zoznam.sk
Wed May 18 13:20:53 CEST 2016
>
>
>
>
>>>
>> In my case it is not virtual method.
>>
>> But I forgot to mention, that it is method of generic object:
>>
>> generic T2DArray<T> = object
>> ...
>> public
>> constructor Init(oobMode: TOutOfBoundsMode); overload;
>> constructor Init(x,y: integer); overload;
>> ...
>> function Data(x,y: integer): PElement; overload; inline;
>> end;
>>
>> So what can be a case, that method is not inlined, can it be track
>> down or is there something which I can do to force inlining ?
>
> Did you add {$INLINE ON} ?
>
No, but I have enabled it using Project Options.
Now I added to source unit {$INLINE ON}, but it does not help.
I have in assembler still CALL to method.
(In same source unit I have regular procedures and these are inlined as
expected; My problem is relatod to object methods only)
Any other ideas, what leads compiler to not inline ?
Thanks
-Laco.
More information about the fpc-pascal
mailing list