If a routine is defined in the interface section and it accesses symbols defined in the implementation section,
that routine cannot be inlined.
Routines in classes cannot be inlined if they access members with less (i.e. more restricted) visibility than the
method itself. For example, if a public method accesses private symbols, it cannot be inlined.
If a routine marked with inline uses external symbols from other units, all of those units must be listed in the
uses statement, otherwise the routine cannot be inlined.
Procedures and functions used in conditional expressions in while-do and repeat-until statements cannot be
expanded inline.
If you modify the implementation of an inlined routine, you will cause all units that use that function to be recompiled.
This is different from traditional rebuild rules, where rebuilds were triggered only by changes in the interface section
of a unit.
The
{$INLINE}
compiler directive gives you finer control over inlining. The
{$INLINE}
directive can be used at
the site of the inlined routine's definition, as well as at the call site. Below are the possible values and their meaning:
Dostları ilə paylaş: