dmd.dmodule
Defines a package and module.
Specification: Modules
License
Source: dmodule.d
Documentation: https://dlang.org/phobos/dmd_dmodule.html
-
Declaration
nothrow voidremoveHdrFilesAndFail(ref Paramparams, ref Modulesmodules);Remove generated .di files on error and exit
-
Declaration
classPackage: dmd.dsymbol.ScopeDsymbol;-
Declaration
static DsymbolTableresolve(Identifier[]packages, Dsymbol*pparent, Package*ppkg);Input:
packages[] the pkg1.pkg2 of pkg1.pkg2.modReturn Value
the symbol table that mod should be inserted into
Output: *
pparentthe rightmost package, i.e. pkg2, or NULL if nopackages*ppkgthe leftmost package, i.e. pkg1, or NULL if nopackages -
Declaration
final const boolisAncestorPackageOf(const Packagepkg);Checks if
pkgis a sub-package of thisDiscussion
For example, if this qualifies to 'a1.a2' and
pkg- to 'a1.a2.a3', this function returns 'true'. If it is other way around or qualified package paths conflict function returns 'false'.Parameters
Packagepkgpossible subpackage
Return Value
see description
-
Declaration
final voidresolvePKGunknown();Checks for the existence of a package.d to set isPkgMod appropriately if isPkgMod == PKG.unknown
-
-
Declaration
classModule: dmd.dmodule.Package;-
Declaration
static voiddeinitialize();Deinitializes the global state of the compiler.
Discussion
This can be used to restore the state set by
_initto its original state. -
Declaration
const(ubyte)[]src;Raw content of the file
-
Declaration
Dsymbol[void*]tagSymTab;ImportC: tag symbols that conflict with other symbols used as the index
-
Declaration
boolselfImports();Return
trueif module imports itself. -
Declaration
boolrootImports();Return
trueif module imports root module. -
Declaration
ModuleimportedFrom;A root module is one that will be compiled all the way to object code. This field holds the root module that caused this module to be loaded. If this module is a root module, then it will be set to
this. This is used to determine ownership of template instantiation. -
Declaration
FileNamesetOutfilename(const(char)[]name, const(char)[]dir, const(char)[]arg, const(char)[]ext);Combines things into output file
namefor .html and .di files.Input:
nameCommand linenamegiven for the file, NULL if nonedirCommand line directory given for the file, NULL if noneargName of the source fileextFilenameextension to use if 'name' is NULL global.params.preservePaths get output path fromargsrcfile Input file - output filenamemust not match input file -
Declaration
boolread(const ref Locloc);Reads the file from
srcfileand loads the source buffer.Discussion
If makefile module dependency is requested, we add this module to the list of dependencies from here.
Parameters
Loclocthe location
Return Value
trueif successful -
Declaration
Moduleparse();
ModuleparseModule(AST)();syntactic
parse -
Declaration
intneedModuleInfo();Determine if we need to generate an instance of ModuleInfo for this Module.
-
Declaration
voidcheckImportDeprecation(const ref Locloc, Scope*sc);Print deprecation warning if we're deprecated, when this module is imported from scope
sc.Parameters
Scope*scthe scope into which we are imported
Loclocthe location of the import statement
-
Declaration
static voidaddDeferredSemantic(Dsymbols);Can't run semantic on
snow, try again later. -
Declaration
static voidrunDeferredSemantic();Run semantic() on deferred symbols.
-
Declaration
nothrow intimports(Modulem);Recursively look at every module this module
imports, returntrueif itimportsm. Can be used to detect circularimports. -
Declaration
uint[uint]ctfe_cov;coverage information from ctfe execution_count[line]
-
Declaration
nothrow voidfullyQualifiedName(ref OutBufferbuf);Writes this module's fully-qualified name to
bufParameters
OutBufferbufThe buffer to write to
-
Declaration
nothrow Escape*escapetable();Lazily initializes and returns the escape table. Turns out it eats a lot of memory.
-
Declaration
static ModuleloadCoreAtomic();A Singleton that loads core.atomic
Return Value
Module of core.atomic,
nullif couldn't find it -
Declaration
static ModuleloadStdMath();A Singleton that loads std.math
Return Value
Module of std.math,
nullif couldn't find it
-
-
Declaration
structModuleDeclaration;-
Declaration
const const(char)[]toString();Provide a human readable representation
-