View source code
Display the source code in ddmd/ctfeexpr.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.ctfeexpr

Compiler implementation of the D programming language.

Functions

Name Description
assignInPlace Assignment helper functions
changeArrayLiteralLength Given array literal oldval of type ArrayLiteralExp or StringExp, of length oldlen, change its length to newlen. If the newlen is longer than oldlen, all new elements will be set to the default initializer for the element type.
createBlockDuplicatedArrayLiteral Helper for NewExp Create an array literal consisting of 'elem' duplicated 'dim' times.
createBlockDuplicatedStringLiteral Helper for NewExp Create a string literal consisting of 'value' duplicated 'dim' times.
ctfeCmp Evaluate >,<=, etc. Resolves slices before comparing. Returns 0 or 1
ctfeEqual Evaluate ==, !=. Resolves slices before comparing. Returns 0 or 1
ctfeIdentity Evaluate is, !is. Resolves slices before comparing. Returns 0 or 1
intSignedCmp Returns e1 OP e2; where OP is ==, !=, <, >=, etc. Result is 0 or 1
intUnsignedCmp Returns e1 OP e2; where OP is ==, !=, <, >=, etc. Result is 0 or 1
isCtfeComparable Constant folding, with support for CTFE Return true if non-pointer expression e can be compared with >,is, ==, etc, using ctfeCmp, ctfeEqual, ctfeIdentity
isCtfeValueValid CTFE Sanity Checks
isPointer Pointer operations
isTypeInfo_Class TypeInfo operations
needToCopyLiteral Aggregate literals (AA/string/array/struct)
pointToSameMemoryBlock Return true if agg1 and agg2 are pointers to the same memory block
realCmp Returns e1 OP e2; where OP is ==, !=, <, >=, etc. Result is 0 or 1
specificCmp Returns cmp OP 0; where OP is ==, !=, <, >=, etc. Result is 0 or 1
voidInitLiteral Void initialization

Classes

Name Description
ClassReferenceExp A reference to a class, or an interface. We need this when we point to a base class (we must record what the type is).
CTFEExp This type is only used by the interpreter.
ThrownExceptionExp Fake class which holds the thrown exception. Used for implementing exception handling.
VoidInitExp An uninitialized value

Structs

Name Description
CtfeStatus Global status of the CTFE engine. Mostly used for performance diagnostics

Authors

Walter Bright

License

Boost License 1.0

Comments