dmd.dinterpret
The entry point for CTFE.
Specification: ($LINK2 https://dlang.org/spec/function.html#interpretation, Compile Time Function Execution (CTFE))
License
Source: dinterpret.d
Documentation: https://dlang.org/phobos/dmd_dinterpret.html
-
Declaration
Expression
ctfeInterpret
(Expressione
);Entry point for CTFE. A compile-time result is required. Give an error if not possible.
Discussion
must be semantically valid expression. In other words, it should not contain anye
ErrorExp
s in it. But, CTFE interpretation will cross over functions and may invoke a function that containsErrorStatement
in its body. If that, the "CTFE failed because of previous errors" error is raised. -
Declaration
T
ctfeEmplaceExp
(T : Expression, Args...)(Argsargs
);Allocate an Expression in the ctfe region.
Parameters
T
type of Expression to allocate
Args
args
arguments to Expression's constructor
Return Value
allocated Expression
-
Declaration
void
incArrayAllocs
(); -
Declaration
CallExp
isRuntimeHook
(Expressione
, Identifierid
);Checks if the given expresion is a call to the runtime hook
.id
Parameters
Expression
e
the expression to check
Identifier
id
the identifier of the runtime hook
Return Value
cast toe
CallExp
if it's the hook,null
otherwise