dmd.ctfeexpr - D Programming Language
Description: D Programming Language
Keywords: D programming language

Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Forums
  - IRC
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Donate
- Resources
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
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 a local clone.

# dmd.ctfeexpr

Compiler implementation of the D programming language.
Authors:
Walter Bright
License:
Boost License 1.0

Source: ctfeexpr.d

struct `CtfeStatus`;
  Global status of the CTFE engine. Mostly used for performance diagnostics
class `ClassReferenceExp`: dmd.expression.Expression;
  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).
class `VoidInitExp`: dmd.expression.Expression;
  An uninitialized value
class `ThrownExceptionExp`: dmd.expression.Expression;
  Fake class which holds the thrown exception. Used for implementing exception handling.
class `CTFEExp`: dmd.expression.Expression;
  This type is only used by the interpreter.
bool `needToCopyLiteral`(Expression `expr`);
  Aggregate literals (AA/string/array/struct)
ArrayLiteralExp `createBlockDuplicatedArrayLiteral`(Loc `loc`, Type `type`, Expression `elem`, size_t `dim`);
  Helper for NewExp Create an array literal consisting of '`elem`' duplicated '`dim`' times.
  Parameters:

  Loc `loc` | source location where the interpretation occurs
  Type `type` | target `type` of the result
  Expression `elem` | the source of array element, it will be owned by the result
  size_t `dim` | element number of the result

  Returns:
  Constructed ArrayLiteralExp
StringExp `createBlockDuplicatedStringLiteral`(Loc `loc`, Type `type`, dchar `value`, size_t `dim`, ubyte `sz`);
  Helper for NewExp Create a string literal consisting of '`value`' duplicated '`dim`' times.
bool `isTypeInfo_Class`(Type `type`);
  TypeInfo operations
bool `isPointer`(Type `t`);
  Pointer operations
bool `pointToSameMemoryBlock`(Expression `agg1`, Expression `agg2`);
  Return `true` if `agg1` and `agg2` are pointers to the same memory block
bool `isCtfeComparable`(Expression `e`);
  Constant folding, with support for CTFE
  Return `true` if non-pointer expression `e` can be compared
  with >,is, ==, etc, using ctfeCmp, ctfeEqual, ctfeIdentity
int `specificCmp`(TOK `op`, int `rawCmp`);
  Returns cmp OP 0; where OP is ==, !=, <, >=, etc. Result is 0 or 1
int `intUnsignedCmp`(TOK `op`, dinteger_t `n1`, dinteger_t `n2`);
  Returns e1 OP e2; where OP is ==, !=, <, >=, etc. Result is 0 or 1
int `intSignedCmp`(TOK `op`, sinteger_t `n1`, sinteger_t `n2`);
  Returns e1 OP e2; where OP is ==, !=, <, >=, etc. Result is 0 or 1
int `realCmp`(TOK `op`, real_t `r1`, real_t `r2`);
  Returns e1 OP e2; where OP is ==, !=, <, >=, etc. Result is 0 or 1
int `ctfeEqual`(Loc `loc`, TOK `op`, Expression `e1`, Expression `e2`);
  Evaluate ==, !=. Resolves slices before comparing. Returns 0 or 1
int `ctfeIdentity`(Loc `loc`, TOK `op`, Expression `e1`, Expression `e2`);
  Evaluate is, !is. Resolves slices before comparing. Returns 0 or 1
int `ctfeCmp`(Loc `loc`, TOK `op`, Expression `e1`, Expression `e2`);
  Evaluate >,<=, etc. Resolves slices before comparing. Returns 0 or 1
void `assignInPlace`(Expression `dest`, Expression `src`);
  Assignment helper functions
UnionExp `changeArrayLiteralLength`(Loc `loc`, TypeArray `arrayType`, Expression `oldval`, size_t `oldlen`, size_t `newlen`);
  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.
bool `isCtfeValueValid`(Expression `newval`);
  CTFE Sanity Checks
UnionExp `voidInitLiteral`(Type `t`, VarDeclaration `var`);
  Void initialization

Copyright © 1999-2018 by the D Language Foundation | Page generated by Ddoc on Sun Jan 21 22:35:12 2018