Hi guys,

Just saw this tread today and did not have a chance to study it in detail.
So just fyi: i have fiddled with inline in the lcd lib to reduce stack
useage, which was so high the lib was hardly usable on an 16f chip.
Speed is not an issue; it is a balance between flash, ram and stack use.

Joep.

Op zondag 30 december 2012 schreef Rob Hamerling ([email protected])
het volgende:

>
> Hi Mike,
>
> On 30-12-12 03:56, Mike K wrote:
>
>  Okay, I sent it to you. I'm still trying to understand why the "inline"s
>> are there, though. Most of the other libraries don't have them. I would
>> say there needs to be a reason to have them, not a reason to remove them.
>>
>
> Thanks for sending me your program. I've analysed it, but first:
>
> A compare with other libraries, written by other people, at another point
> in time, with a different version of the compiler, won't give a clue why
> the inlines are in the lcd libraries....
>
> By browsing the old sources we might find when the inlines were introduced
> and by whom (probably me!), but I don't expect that will be of much help
> too.
>
> The reason for the growth of the hex file by using pragma inline is caused
> by its propagation to called procedures, even when these don't have the
> pragma inline. I expected that a procedure like
>
>  procedure __lcd_write(byte in value) is
>>    pragma inline
>>    __lcd_write_nibble(value >> 4)
>>    __lcd_write_nibble(value)
>> end procedure
>>
>
> would expand in two inline calls to __lcd_write_nibble() in stead of a
> single call to __lcd_write() of which the body would have the expansion of
> the two calls to __lcd_write_nibble().  This would save some code memory
> when __lcd_write_nibble() is not called frequently.
>
> But it appears that the __lcd_write_nibble is expanded inline too!
> This propagation to called procedures is not explicitely mentioned in the
> compiler documentation. We must inform Kyle.
>
> It could be that his behaviour of the compiler has changed after the
> pragma inlines were added to the library. A check with 2.4o and 2.4n showed
> no difference and I don't have older versions ready available.
>
> Provisional conclusion: the use of 'pragma inline' in the libraries must
> be re-evaluated! Would you be so kind to open an issue at googlecode?
>
> Regards, Rob.
>
>
> --
> R. Hamerling, Netherlands --- http://www.robh.nl
>
> --
> You received this message because you are subscribed to the Google Groups
> "jallib" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at http://groups.google.com/**
> group/jallib?hl=en <http://groups.google.com/group/jallib?hl=en>.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to