View source code
Display the source code in ddmd/expression.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module ddmd.expression

Compiler implementation of the D programming language.

Functions

Name Description
arrayExpressionSemantic Perform semantic() on an array of Expressions.
arrayExpressionToCommonType The common type is determined by applying ?: to each pair.
callCpCtor If e is an instance of a struct, and that struct has a copy constructor, rewrite e as: (tmp = e),tmp
checkDefCtor Issue an error if default construction is disabled for type t. Default construction is required for arrays and 'out' parameters.
checkPropertyCall Check the tail CallExp is really property function call.
doCopyOrMove Handle the postblit call on lvalue, or the move of rvalue.
expandTuples Expand tuples.
extractOpDollarSideEffect
functionParameters Now that we know the exact type of the function we're calling, the arguments[] need to be adjusted: 1. implicitly convert argument to the corresponding parameter type 2. add default arguments for any missing arguments 3. do default promotions on arguments corresponding to ... 4. add hidden arguments[] argument 5. call copy constructor for struct value arguments
getFuncTemplateDecl Get TemplateDeclaration enclosing FuncDeclaration.
getRightThis Given var, get the right this pointer if var is in an outer class, but our existing this pointer is in an inner class.
hasThis Determine if this is available by walking up the enclosing scopes until a function is found.
isAliasThisTuple Expand alias this tuples.
isDotOpDispatch check e is exp.opDispatch!(tiargs) or not It's used to switch to UFCS the semantic analysis path
isNeedThisScope Determine if a this is needed to access d.
modifyFieldVar Mark variable v as modified if it is inside a constructor that var is a field in.
preFunctionParameters Preprocess arguments to function.
RealEquals Test to see if two reals are the same. Regard NaN's as equivalent. Regard +0 and -0 as different.
resolve Resolve a symbol s and wraps it in an expression object.
resolveOpDollar Runs semantic on se.lwr and se.upr. Declares a temporary variable if '$' was used.
resolveOpDollar Runs semantic on ae.arguments. Declares temporary variables if '$' was used.
resolvePropertiesOnly If e1 is a property function (template), resolve it.
resolvePropertiesX Pull out any properties.
resolveUFCS Pull out callable entity with UFCS.
resolveUFCSProperties Pull out property with UFCS.
searchUFCS Find symbol in accordance with the UFCS name look up rule
semanticString Resolve exp as a compile-time known string.
typeDotIdExp TypeDotIdExp
valueNoDtor If we want the value of this expression, but do not want to call the destructor on it.

Classes

Name Description
AddAssignExp
AddExp
AddrExp
AndAssignExp
AndExp
ArrayExp e1 [ a0, a1, a2, a3 ,... ]
ArrayLengthExp
ArrayLiteralExp [ e1, e2, e3, ... ]
AssertExp
AssignExp
AssocArrayLiteralExp [ key0 : value0, key1 : value1, ... ]
BinAssignExp
BinExp
BlitExp
CallExp
CastExp Possible to cast to one type while painting to another type
CatAssignExp The ~= operator. It can have one of the following operators:
CatExp
CmpExp op is one of: TOKlt, TOKle, TOKgt, TOKge, TOKunord, TOKlg, TOKleg, TOKule, TOKul, TOKuge, TOKug, TOKue
ComExp
CommaExp
CompileExp
ComplexExp
CondExp econd ? e1 : e2
ConstructExp
DeclarationExp Declaration of a symbol
DefaultInitExp
DelegateExp
DelegateFuncptrExp
DeleteExp
DivAssignExp
DivExp
DollarExp
DotExp
DotIdExp
DotTemplateExp Mainly just a placeholder
DotTemplateInstanceExp foo.bar!(args)
DotTypeExp
DotVarExp
DsymbolExp Won't be generated by parser.
EqualExp == and !=
ErrorExp Use this expression for error recovery. It should behave as a 'sink' to prevent further cascaded error messages.
Expression
FileInitExp
FuncExp Function/Delegate literal
FuncInitExp
HaltExp
IdentifierExp
IdentityExp is and !is
ImportExp
IndexExp e1 [ e2 ]
InExp
IntegerExp
IntervalExp Mainly just a placeholder
IsExp is(targ id tok tspec) is(targ id == tok2)
LineInitExp
LogicalExp
MinAssignExp
MinExp
ModAssignExp
ModExp
ModuleInitExp
MulAssignExp
MulExp
NegExp
NewAnonClassExp thisexp.new(newargs) class baseclasses { } (arguments)
NewExp thisexp.new(newargs) newtype(arguments)
NotExp
NullExp
OrAssignExp
OrExp
OverExp Overload Set
PostExp For both i++ and i--
PowAssignExp
PowExp
PreExp For both ++i and --i
PrettyFuncInitExp
PtrExp
RealExp
RemoveExp This deletes the key e1 from the associative array e2
ScopeExp Mainly just a placeholder of Package, Module, Nspace, and TemplateInstance (including TemplateMixin)
ShlAssignExp
ShlExp
ShrAssignExp
ShrExp
SliceExp e1 [lwr .. upr]
StringExp
StructLiteralExp sd( e1, e2, e3, ... )
SuperExp
SymbolExp
SymOffExp Offset from symbol
TemplateExp Mainly just a placeholder
ThisExp
TraitsExp _traits(identifier, args...)
TupleExp
TypeExp Mainly just a placeholder
TypeidExp typeid(int)
UAddExp
UnaExp
UshrAssignExp
UshrExp
VarExp Variable
VectorExp
XorAssignExp
XorExp

Structs

Name Description
UnionExp

Enum values

Name Type Description
stageApply apply is running
stageInlineScan inlineScan is running
stageOptimize optimize is running
stageScrub scrubReturnValue is running
stageSearchPointers hasNonConstPointers is running
stageToCBuffer toCBuffer is running

Authors

Walter Bright

License

Boost License 1.0

Comments