dmd

Modules

access
module dmd.access

Enforce visibility contrains such as public and private.

aggregate
module dmd.aggregate

Defines a Dsymbol representing an aggregate, which is a struct, union or class.

aliasthis
module dmd.aliasthis

Implements the alias this symbol.

argtypes_aarch64
module dmd.argtypes_aarch64

Break down a D type into basic (register) types for the AArch64 ABI.

argtypes_sysv_x64
module dmd.argtypes_sysv_x64

Break down a D type into basic (register) types for the x86_64 System V ABI.

argtypes_x86
module dmd.argtypes_x86

Break down a D type into basic (register) types for the 32-bit x86 ABI.

arrayop
module dmd.arrayop

Implement array operations, such as a[] = b[] + c[].

arraytypes
module dmd.arraytypes

Provide aliases for arrays of certain declarations or statements.

ast_node
module dmd.ast_node

Defines the base class for all nodes which are part of the AST.

astbase
module dmd.astbase

Defines AST nodes for the parsing stage.

astcodegen
module dmd.astcodegen

Defines AST nodes for the code generation stage.

astenums
module dmd.astenums

Defines enums common to dmd and dmd as parse library.

asttypename
module dmd.asttypename

Development utility for printing AST nodes by their internal name, instead of as D source code.

attrib
module dmd.attrib

Defines declarations of various attributes.

backend
module dmd.backend
blockexit
module dmd.blockexit

Find out in what ways control flow can exit a statement block.

builtin
module dmd.builtin

Implement CTFE for intrinsic (builtin) functions.

canthrow
module dmd.canthrow

Perform checks for nothrow.

chkformat
module dmd.chkformat

Check the arguments to printf and scanf against the format string.

cli
module dmd.cli

Defines the help texts for the CLI options offered by DMD.

clone
module dmd.clone

Builds struct member functions if needed and not defined by the user. Includes opEquals, opAssign, post blit, copy constructor and destructor.

common
module dmd.common
compiler
module dmd.compiler

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

cond
module dmd.cond

Evaluate compile-time conditionals, such as static if version and debug.

console
module dmd.console

Control the various text mode attributes, such as color, when writing text to the console.

constfold
module dmd.constfold

Perform constant folding of arithmetic expressions.

cparse
module dmd.cparse

Takes a token stream from the lexer, and parses it into an abstract syntax tree.

cppmangle
module dmd.cppmangle

Do mangling for C++ linkage.

cppmanglewin
module dmd.cppmanglewin

Do mangling for C++ linkage for Digital Mars C++ and Microsoft Visual C++.

cpreprocess
module dmd.cpreprocess

Run the C preprocessor on a C source file.

ctfeexpr
module dmd.ctfeexpr

CTFE for expressions involving pointers, slices, array concatenation etc.

ctorflow
module dmd.ctorflow

Manage flow analysis for constructors.

dcast
module dmd.dcast

Semantic analysis for cast-expressions.

dclass
module dmd.dclass

Defines a class declaration.

declaration
module dmd.declaration

Miscellaneous declarations, including typedef, alias, variable declarations including the implicit this declaration, type tuples, ClassInfo, ModuleInfo and various TypeInfos.

delegatize
module dmd.delegatize

Implements conversion from expressions to delegates for lazy parameters.

denum
module dmd.denum

Define enum declarations and enum members.

dimport
module dmd.dimport

A Dsymbol representing a renamed import.

dinifile
module dmd.dinifile

Parses compiler settings from a .ini file.

dinterpret
module dmd.dinterpret

The entry point for CTFE.

dmacro
module dmd.dmacro

Text macro processor for Ddoc.

dmangle
module dmd.dmangle

Does name mangling for extern(D) symbols.

dmdparams
module dmd.dmdparams

DMD-specific parameters.

dmodule
module dmd.dmodule

Defines a package and module.

dmsc
module dmd.dmsc

Configures and initializes the backend.

doc
module dmd.doc

Ddoc documentation generation.

dscope
module dmd.dscope

A scope as defined by curly braces {}.

dstruct
module dmd.dstruct

Struct and union declarations.

dsymbol
module dmd.dsymbol

The base class for a D symbol, which can be a module, variable, function, enum, etc.

dsymbolsem
module dmd.dsymbolsem

Does the semantic 1 pass on the AST, which looks at symbol declarations but not initializers or function bodies.

dtemplate
module dmd.dtemplate

Defines TemplateDeclaration, TemplateInstance and a few utilities

dtoh
module dmd.dtoh

This module contains the implementation of the C++ header generation available through the command line switch -Hc.

dversion
module dmd.dversion

Defines a Dsymbol for version = identifier and debug = identifier statements.

e2ir
module dmd.e2ir

Converts expressions to Intermediate Representation (IR) for the backend.

entity
module dmd.entity

Defines the named entities to support the "\\&Entity;" escape sequence for strings / character literals.

errors
module dmd.errors

Functions for raising errors.

errorsink
module dmd.errorsink

Provides an abstraction for what to do with error messages.

escape
module dmd.escape

Most of the logic to implement scoped pointers and scoped references is here.

expression
module dmd.expression

Defines the bulk of the classes which represent the AST at the expression level.

expressionsem
module dmd.expressionsem

Semantic analysis of expressions.

file_manager
module dmd.file_manager

Read a file from disk and store it in memory.

foreachvar
module dmd.foreachvar

Utility to visit every variable in an expression.

frontend
module dmd.frontend

Contains high-level interfaces for interacting with DMD as a library.

func
module dmd.func

Defines a function declaration.

globals
module dmd.globals

Stores command line options and contains other miscellaneous declarations.

glue
module dmd.glue

Generate the object file for function declarations and critical sections.

gluelayer
module dmd.gluelayer

Declarations for back-end functions that the front-end invokes.

hdrgen
module dmd.hdrgen

Generate D interface files.

iasm
module dmd.iasm

Inline assembler for the D programming language compiler.

iasmdmd
module dmd.iasmdmd

Inline assembler implementation for DMD. https://dlang.org/spec/iasm.html

iasmgcc
module dmd.iasmgcc

Inline assembler for the GCC D compiler.

id
module dmd.id

Contains the Id struct with a list of predefined symbols the compiler knows about.

identifier
module dmd.identifier

Defines an identifier, which is the name of a Dsymbol.

impcnvtab
module dmd.impcnvtab

Provides an implicit conversion table for basic types.

imphint
module dmd.imphint

Give import hints for common symbol names that couldn't be resolved.

importc
module dmd.importc

Contains semantic routines specific to ImportC

init
module dmd.init

Defines initializers of variables, e.g. the array literal in int[3] x = [0, 1, 2].

initsem
module dmd.initsem

Semantic analysis of initializers.

inline
module dmd.inline

Performs inlining, which is an optimization pass enabled with the -inline flag.

inlinecost
module dmd.inlinecost

Compute the cost of inlining a function call by counting expressions.

intrange
module dmd.intrange

Implement Value Range Propagation.

json
module dmd.json

Code for generating .json descriptions of the module when passing the -X flag to dmd.

lambdacomp
module dmd.lambdacomp

Implements the serialization of a lambda function.

lexer
module dmd.lexer

Implements the lexical analyzer, which converts source code into lexical tokens.

lib
module dmd.lib

A module defining an abstract library. Implementations for various formats are in separate libXXX.d modules.

libelf
module dmd.libelf

A library in the ELF format, used on Unix.

libmach
module dmd.libmach

A library in the Mach-O format, used on macOS.

libmscoff
module dmd.libmscoff

A library in the COFF format, used on 32-bit and 64-bit Windows targets.

libomf
module dmd.libomf

A library in the OMF format, a legacy format for 32-bit Windows.

link
module dmd.link

Invoke the linker as a separate process.

location
module dmd.location

Encapsulates file/line/column locations.

main
module dmd.main

Entry point for DMD console version.

mars
module dmd.mars

This modules defines related utilities needed for arguments parsing, path manipulation, etc... This file is not shared with other compilers which use the DMD front-end.

mtype
module dmd.mtype

Defines a D type.

mustuse
module dmd.mustuse

Compile-time checks associated with the @mustuse attribute.

nogc
module dmd.nogc

Checks that a function marked @nogc does not invoke the Garbage Collector.

nspace
module dmd.nspace

A scoped C++ namespace symbol

ob
module dmd.ob

Flow analysis for Ownership/Borrowing

objc
module dmd.objc

Interfacing with Objective-C.

objc_glue
module dmd.objc_glue

Glue code for Objective-C interop.

opover
module dmd.opover

Handles operator overloading.

optimize
module dmd.optimize

Perform constant folding.

parse
module dmd.parse

Takes a token stream from the lexer, and parses it into an abstract syntax tree.

parsetimevisitor
module dmd.parsetimevisitor

Defines a visitor for the AST.

permissivevisitor
module dmd.permissivevisitor

A visitor that facilitates the traversal of subsets of the AST.

postordervisitor
module dmd.postordervisitor

A depth-first visitor for expressions.

printast
module dmd.printast

Provides an AST printer for debugging.

root
module dmd.root
rootobject
module dmd.rootobject

Provide the root object that AST classes in dmd inherit from.

s2ir
module dmd.s2ir

Convert statements to Intermediate Representation (IR) for the back-end.

safe
module dmd.safe

Checks whether member access or array casting is allowed in @safe code.

sapply
module dmd.sapply

Provides a depth-first statement visitor.

scanelf
module dmd.scanelf

Extract symbols from an ELF object file.

scanmach
module dmd.scanmach

Extract symbols from a Mach-O object file.

scanmscoff
module dmd.scanmscoff

Extract symbols from a COFF object file.

scanomf
module dmd.scanomf

Extract symbols from an OMF object file.

semantic2
module dmd.semantic2

Performs the semantic2 stage, which deals with initializer expressions.

semantic3
module dmd.semantic3

Performs the semantic3 stage, which deals with function bodies.

sideeffect
module dmd.sideeffect

Find side-effects of expressions.

statement
module dmd.statement

Defines AST nodes for statements.

statement_rewrite_walker
module dmd.statement_rewrite_walker

Provides a visitor for statements that allows rewriting the currently visited node.

statementsem
module dmd.statementsem

Does semantic analysis for statements.

staticassert
module dmd.staticassert

Defines the Dsymbol representing a static assert().

staticcond
module dmd.staticcond

Lazily evaluate static conditions for static if, static assert and template constraints.

stmtstate
module dmd.stmtstate

Used to help transform statement AST into flow graph.

strictvisitor
module dmd.strictvisitor

Documentation: https://dlang.org/phobos/dmd_strictvisitor.html Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/strictvisitor.d

target
module dmd.target

Handles target-specific parameters

templateparamsem
module dmd.templateparamsem

Semantic analysis of template parameters.

tocsym
module dmd.tocsym

Convert a D symbol to a symbol the linker understands (with mangled name).

toctype
module dmd.toctype

Convert a D type to a type the backend understands.

tocvdebug
module dmd.tocvdebug

Generate debug info in the CV4 debug format.

todt
module dmd.todt

Put initializers and objects created from CTFE into a dt_t data structure so the backend puts them into the data segment.

toir
module dmd.toir

Convert to Intermediate Representation (IR) for the back-end.

tokens
module dmd.tokens

Defines lexical tokens.

toobj
module dmd.toobj

Convert an AST that went through all semantic phases into an object file.

traits
module dmd.traits

Handle introspection functionality of the __traits() construct.

transitivevisitor
module dmd.transitivevisitor

Documentation: https://dlang.org/phobos/dmd_transitivevisitor.html Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/transitivevisitor.d

typesem
module dmd.typesem

Semantic analysis for D types.

typinf
module dmd.typinf

Generate TypeInfo objects, which are needed for run-time introspection of types.

utils
module dmd.utils

This module defines some utility functions for DMD.

visitor
module dmd.visitor

Provides a visitor class visiting all AST nodes present in the compiler.

vsoptions
module dmd.vsoptions

When compiling on Windows with the Microsoft toolchain, try to detect the Visual Studio setup.