Module

extern (C++) final
class Module : Package {
extern (C++) __gshared
Module rootModule;
extern (C++) __gshared
DsymbolTable modules;
extern (C++) __gshared
Modules amodules;
extern (C++) __gshared
Dsymbols deferred;
extern (C++) __gshared
Dsymbols deferred2;
extern (C++) __gshared
Dsymbols deferred3;
extern (C++) __gshared
uint dprogress;
extern (C++) __gshared
AggregateDeclaration moduleinfo;
const(char)[] arg;
ModuleDeclaration* md;
const
FileName srcfile;
const
FileName objfile;
const
FileName hdrfile;
FileName docfile;
FileBuffer* srcBuffer;
uint errors;
uint numlines;
bool isHdrFile;
bool isDocFile;
bool hasAlwaysInlines;
bool isPackageFile;
Package pkg;
Strings contentImportedFiles;
int needmoduleinfo;
int selfimports;
int rootimports;
int insearch;
Identifier searchCacheIdent;
Dsymbol searchCacheSymbol;
int searchCacheFlags;
Dsymbols* decldefs;
Modules aimports;
uint debuglevel;
Identifiers* debugids;
Identifiers* debugidsNot;
uint versionlevel;
Identifiers* versionids;
Identifiers* versionidsNot;
MacroTable macrotable;
Escape* escapetable;
size_t nameoffset;
size_t namelen;
int doppelganger;
Symbol* cov;
uint* covb;
Symbol* sictor;
Symbol* sctor;
Symbol* sdtor;
Symbol* ssharedctor;
Symbol* sshareddtor;
Symbol* stest;
Symbol* sfilename;
}

Members

Functions

checkImportDeprecation
void checkImportDeprecation(Loc loc, Scope* sc)

Print deprecation warning if we're deprecated, when this module is imported from scope sc.

fullyQualifiedName
void fullyQualifiedName(OutBuffer buf)

Writes this module's fully-qualified name to buf

imports
int imports(Module m)

Recursively look at every module this module imports, return true if it imports m. Can be used to detect circular imports.

loadSourceBuffer
bool loadSourceBuffer(Loc loc, File.ReadResult readResult)

Loads the source buffer from the given read result into this.srcBuffer.

needModuleInfo
int needModuleInfo()

Determine if we need to generate an instance of ModuleInfo for this Module.

parse
Module parse()
parseModule
Module parseModule()

syntactic parse

read
bool read(Loc loc)

Reads the file from srcfile and loads the source buffer.

rootImports
bool rootImports()

Return true if module imports root module.

selfImports
bool selfImports()

Return true if module imports itself.

setOutfilename
FileName setOutfilename(const(char)[] name, const(char)[] dir, const(char)[] arg, const(char)[] ext)

Combines things into output file name for .html and .di files. Input: name Command line name given for the file, NULL if none dir Command line directory given for the file, NULL if none arg Name of the source file ext File name extension to use if 'name' is NULL global.params.preservePaths get output path from arg srcfile Input file - output file name must not match input file

Static functions

addDeferredSemantic
void addDeferredSemantic(Dsymbol s)

Can't run semantic on s now, try again later.

deinitialize
void deinitialize()

Deinitializes the global state of the compiler.

runDeferredSemantic
void runDeferredSemantic()

Run semantic() on deferred symbols.

Variables

ctfe_cov
uint[uint] ctfe_cov;

coverage information from ctfe execution_countline

importedFrom
Module importedFrom;

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.

Inherited Members

From Package

resolve
DsymbolTable resolve(Identifier[] packages, Dsymbol* pparent, Package* ppkg)

Input: packages[] the pkg1.pkg2 of pkg1.pkg2.mod

isAncestorPackageOf
bool isAncestorPackageOf(Package pkg)

Checks if pkg is a sub-package of this

resolvePKGunknown
void resolvePKGunknown()

Checks for the existence of a package.d to set isPkgMod appropriately if isPkgMod == PKG.unknown

Suggestion Box / Bug Report