# dmd.dinterpret

The entry point for CTFE.

Specification: ($LINK2 https://dlang.org/spec/function.html#interpretation, Compile Time Function Execution (CTFE))

#### Authors

Walter Bright

#### License

Boost License 1.0

Source: dinterpret.d

Documentation: https://dlang.org/phobos/dmd_dinterpret.html

Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dinterpret.d

- `ctfeInterpret`

  #### Declaration

  `Expression `ctfeInterpret`(Expression `e`);`

  Entry point for CTFE. A compile-time result is required. Give an error if not possible.

  #### Discussion

  ``e`` must be semantically valid expression. In other words, it should not contain any `ErrorExp`s in it. But, CTFE interpretation will cross over functions and may invoke a function that contains `ErrorStatement` in its body. If that, the "CTFE failed because of previous errors" error is raised.

- `ctfeEmplaceExp`

  #### Declaration

  `T `ctfeEmplaceExp`(T : Expression, Args...)(Args `args`);`

  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

- `incArrayAllocs`

  #### Declaration

  `void `incArrayAllocs`();`