Skip Headers
Oracle® Database PL/SQL Language Reference
11g Release 2 (11.2)

Part Number E10472-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

INLINE Pragma

The INLINE pragma specifies that a subprogram call is, or is not, to be inlined. Inlining replaces a subprogram call (to a subprogram in the same program unit) with a copy of the called subprogram.

Topics:

Syntax

inline_pragma ::=

inline_pragma
Description of the illustration pragma_inline.gif

Semantics

identifier

The name of a subprogram.

YES

If PLSQL_OPTIMIZE_LEVEL=2, 'YES' specifies that the subprogram call is to be inlined.

If PLSQL_OPTIMIZE_LEVEL=3, 'YES' specifies that the subprogram call has a high priority for inlining.

NO

Specifies that the subprogram call is not to be inlined.

Usage

The INLINE pragma affects only the immediately following declaration or statement, and only some kinds of statements.

When the INLINE pragma immediately precedes one of these statements, the pragma affects every call to the specified subprogram in that statement (see Example 12-1):

The INLINE pragma does not affect statements that are not in the preceding list.

When the INLINE pragma immediately precedes a declaration, it affects:

If the name of the subprogram (identifier) is overloaded (that is, if it belongs to multiple subprograms), the INLINE pragma applies to every subprogram with that name (see Example 12-2). For information about overloaded subprogram names, see "Overloaded Subprograms".

The PRAGMA INLINE (identifier, 'YES') very strongly encourages the compiler to inline a particular call, but the compiler might not to do so if other considerations or limits make the inlining undesirable. If you specify PRAGMA INLINE ( identifier,'NO'), the compiler does not inline calls to subprograms named identifier (see Example 12-3).

Multiple pragmas can affect the same declaration or statement. Each pragma applies its own effect to the statement. If PRAGMA INLINE(identifier,'YES') and PRAGMA INLINE (identifier,'NO') have the same identifier, 'NO' overrides 'YES' (see Example 12-4). One PRAGMA INLINE (identifier,'NO') overrides any number of occurrences of PRAGMA INLINE (identifier,'YES'), and the order of these pragmas is not important.

Examples

Related Topics