# dmd.backend.cc

Common definitions

#### Discussion

Compiler implementation of the D programming language.

#### Authors

Walter Bright

#### License

Boost License 1.0

Source: backend/cc.d

- `Srcpos`

  #### Declaration

  `struct `Srcpos`;`

  Position in source file

  - `set`

    #### Declaration

    `pure nothrow @safe void `set`(const(char)* `filename`, uint `linnum`, int `charnum`);`

    Set fields of Srcpos

    #### Parameters

    `const(char)* `filename`` | file name
    `uint `linnum`` | line number
    `int `charnum`` | character number

- `Pstate`

  #### Declaration

  `struct `Pstate`;`

  Current 'state' of the compiler. Used to gather together most global variables. This struct is saved/restored during function body parsing.

- `Cstate`

  #### Declaration

  `struct `Cstate`;`

  Global variables.

- `ClassDeclaration_`

  #### Declaration

  `alias `ClassDeclaration_` = void*;`

  Basic blocks: Basic blocks are a linked list of all the basic blocks in a function. startblock heads the list.

- `BC`

  #### Declaration

  `alias `BC` = int;`

  Basic block control flow operators.

- `BlockRange`

  #### Declaration

  `struct `BlockRange`;`

  Range for blocks.

- `func_flags_t`

  #### Declaration

  `alias `func_flags_t` = uint;`

  Functions

- `meminit_t`

  #### Declaration

  `struct `meminit_t`;`

  Item in list for member initializer.

- `baseclass_t`

  #### Declaration

  `struct `baseclass_t`;`

  Base classes are a list of these.

- `mptr_flags_t`

  #### Declaration

  `alias `mptr_flags_t` = char;`

  For virtual tables.

- `TMF`

  #### Declaration

  `struct `TMF`;`

  Information gathered about externally defined template member functions, member data, and member classes.

- `TME`

  #### Declaration

  `struct `TME`;`

  Information gathered about primary member template explicit specialization.

- `TMNE`

  #### Declaration

  `struct `TMNE`;`

  Information gathered about nested explicit specializations.

- `TMNF`

  #### Declaration

  `struct `TMNF`;`

  Information gathered about nested class friends.

- `template_t`

  #### Declaration

  `struct `template_t`;`

  Special information for class templates.

- `enum_flags_t`

  #### Declaration

  `alias `enum_flags_t` = uint;`

  Special information for enums.

- `struct_flags_t`

  #### Declaration

  `alias `struct_flags_t` = uint;`

  Special information for structs.

- `list_symbol`

  #### Declaration

  `nothrow @nogc @trusted inout(Symbol)* `list_symbol`(inout list_t `lst`);`

  Symbol Table

- `pflags_t`

  #### Declaration

  `alias `pflags_t` = uint;`

  Function parameters: Pident identifier of parameter Ptype type of argument Pelem default value for argument Psym symbol corresponding to Pident when using the parameter list as a symbol table For template-parameter-list: Pident identifier of parameter Ptype if NULL, this is a type-parameter else the type for a parameter-declaration value argument Pelem default value for value argument Pdeftype default value for type-parameter Pptpl template-parameter-list for template-template-parameter Psym default value for template-template-parameter For template-arg-list: (actual arguments) Pident NULL Ptype type-name Pelem expression (either Ptype or Pelem is NULL) Psym SCtemplate for template-template-argument

- `ehmethod`

  #### Declaration

  `nothrow @nogc @trusted EHmethod `ehmethod`(Symbol* `f`);`

  #### Parameters

  `Symbol* `f`` | function symbol

  #### Return Value

  exception method for `f`

- `FL`

  #### Declaration

  `alias `FL` = int;`

  Element types. These should be combined with storage classes.

- `EEcontext`

  #### Declaration

  `struct `EEcontext`;`

  Srcfiles

  #### Discussion

  This is to support compiling expressions within the context of a function.

- `dt_t`

  #### Declaration

  `struct `dt_t`;`

  Data definitions DTibytes 1..7 bytes DTabytes offset of bytes of data a { a data bytes } DTnbytes bytes of data a { a data bytes } a = offset DTazeros # of 0 bytes a DTsymsize same as DTazeros, but the type of the symbol gives the size DTcommon # of 0 bytes (in a common block) a DTxoff offset from symbol w a w = symbol number (pointer for CPP) a = offset DTcoff offset into code segment