dmd.optimize

Perform constant folding.

Members

Functions

Expression_optimize
Expression Expression_optimize(Expression e, int result, bool keepLvalue)

Constant fold an Expression.

expandVar
Expression expandVar(int result, VarDeclaration v)

If variable has a const initializer, return that initializer.

setLengthVarIfKnown
void setLengthVarIfKnown(VarDeclaration lengthVar, Expression arr)
Undocumented in source. Be warned that the author may not have intended to support it.
setLengthVarIfKnown
void setLengthVarIfKnown(VarDeclaration lengthVar, Type type)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta