dmd.func

Defines a function declaration.

Includes: - function/delegate literals - function aliases - (static/shared) constructors/destructors/post-blits - invariant - unittest

Members

Classes

CtorDeclaration
class CtorDeclaration
DtorDeclaration
class DtorDeclaration
FuncAliasDeclaration
class FuncAliasDeclaration

Used as a way to import a set of functions from another scope into this one.

FuncDeclaration
class FuncDeclaration
FuncLiteralDeclaration
class FuncLiteralDeclaration
InvariantDeclaration
class InvariantDeclaration
NewDeclaration
class NewDeclaration
PostBlitDeclaration
class PostBlitDeclaration
SharedStaticCtorDeclaration
class SharedStaticCtorDeclaration
SharedStaticDtorDeclaration
class SharedStaticDtorDeclaration
StaticCtorDeclaration
class StaticCtorDeclaration
StaticDtorDeclaration
class StaticDtorDeclaration
UnitTestDeclaration
class UnitTestDeclaration

Enums

FuncResolveFlag
enum FuncResolveFlag

Flag used by resolveFuncCall.

ILS
enum ILS

Inline Status

Functions

MODMatchToBuffer
auto MODMatchToBuffer(OutBuffer* buf, ubyte lhsMod, ubyte rhsMod)

Checks for mismatching modifiers between lhsMod and rhsMod and prints the mismatching modifiers to buf.

addInvariant
Expression addInvariant(const ref Loc loc, Scope* sc, AggregateDeclaration ad, VarDeclaration vthis)

Generate Expression to call the invariant. Input: ad aggregate with the invariant vthis variable with 'this'

getIndirection
Type getIndirection(Type t)

Returns an indirect type one step from t.

overloadApply
int overloadApply(Dsymbol fstart, scope int delegate(Dsymbol) dg, Scope* sc = null)

Visit each overloaded function/template in turn, and call dg(s) on it. Exit when no more, or dg(s) returns nonzero.

resolveFuncCall
FuncDeclaration resolveFuncCall(const ref Loc loc, Scope* sc, Dsymbol s, Objects* tiargs, Type tthis, Expressions* fargs, FuncResolveFlag flags)

Given a symbol that could be either a FuncDeclaration or a function template, resolve it to a function symbol.

Structs

Ensure
struct Ensure

Tuple of result identifier (possibly null) and statement. This is used to store out contracts: out(id){ ensure }

Meta