You can see a result of inlining with this little program below.  On the
CRTCMOD, optimize at 30 or higher, turn on inlining, turn off debug view,
turn on keep intermediate language data.  Compile with comment before
#pragma, run the program and observe the call stack; then remove the
comment before #pragma, compile and run and observe the call stack and
notice the difference.

Dump the two versions of the modules with DMPSYSOBJ and their w-code
streams will appear under the heading "secondary associated space".
Compare the two versions of w-code and you'll notice the only difference
between the dumps is *ONE* single bit flag.  So it seems inlining occurs
down in the optimizing translator, not in RPG or C.

//    OPTIMIZE(30) +
//    DBGVIEW(*NONE) +

#include <stdlib.h>
void show( void );
// #pragma inline( show )
void main( void )
{ show();
void show( void )
{ system( "DSPJOB OPTION(*PGMSTK)" );

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.