inline

Synonyms

unfold

(Or "unfold") To replace a function call with an instance of the function's body. Actual argument expressions are substituted for formal parameters as in beta reduction. Inlining is usually done as a compile-time transformation.

If done recklessly (e.g. attempting to inline a recursive function) the compiler will fail to terminate. If done over-enthusiastically the code size may increase exponentially, e.g. if function f calls g twice, and g calls h twice and h is inlined in g which is inlined in f (in either order) then there will be four copies of h's body in f.

See also linear argument, unfold/fold.