dmd.delegatize

Implements conversion from expressions to delegates for lazy parameters.

Specification: Lazy Parameters

Members

Functions

ensureStaticLinkTo
bool ensureStaticLinkTo(Dsymbol s, Dsymbol p)

See if context s is nested within context p, meaning it p is reachable at runtime by walking the static links. If any of the intervening contexts are function literals, make sure they are delegates.

lambdaCheckForNestedRef
bool lambdaCheckForNestedRef(Expression e, Scope* sc)

Look for references to variables in a scope enclosing the new function literal.

toDelegate
Expression toDelegate(Expression e, Type t, Scope* sc)

Convert expression into a delegate.

Meta