Inlining adjectives for methods, constants, functions, and slots#
To inline a value is to replace, at compile time, a reference to a variable with the value of that variable. Such inlining often allows compile-time evaluation (“constant folding”) or partial evaluation.
The Open Dylan compiler can perform inlining on generic function
methods, constants, class slots, and functions (created with
function — see Function Definition). We have
extended the Dylan language specification of
define constant, and class slots with inlining definition adjectives
and have included those same adjectives in our language extension
define function. The adjectives are:
not-inlineNever inline this item.
default-inline(default) Inline this item within a library, at the compiler’s discretion. Never inline a cross-library reference.
may-inlineInline this item within or between libraries, at the compiler’s discretion.
inlineInline this item wherever the compiler can do so.
define constant and
define function permit the
inline-only, which forces every reference to the constant
or function to be inlined.
If you export from a library any variables created with
inline-only, and then change the
values of the variables, client libraries may need to be recompiled.