dmd.compiler

Describes a back-end compiler and implements compiler-specific actions.

Authors

Walter Bright

Source: compiler.d

  • Declaration

    struct Compiler;

    A data structure that describes a back-end compiler and implements compiler-specific actions.

    • Declaration

      static Expression paintAsType(UnionExp* pue, Expression e, Type type);

      Encode the given expression, which is assumed to be an rvalue literal as another type for use in CTFE. This corresponds roughly to the idiom *(Type *)&e.

    • Declaration

      static void onParseModule(Module m);

      For the given module, perform any post parsing analysis. Certain compiler backends (ie: GDC) have special placeholder modules whose source are empty, but code gets injected immediately after loading.

    • Declaration

      static bool onImport(Module m);

      A callback function that is called once an imported module is parsed. If the callback returns true, then it tells the frontend that the driver intends on compiling the import.