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
AggregateDeclaration moduleinfo;
const(char)[] arg;
ModuleDeclaration* md;
const
FileName srcfile;
const
FileName objfile;
const
FileName hdrfile;
FileName docfile;
uint errors;
uint numlines;
FileType filetype;
bool hasAlwaysInlines;
bool isPackageFile;
Package pkg;
Strings contentImportedFiles;
int needmoduleinfo;
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.

escapetable
Escape* escapetable()

Lazily initializes and returns the escape table. Turns out it eats a lot of memory.

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.

isCoreModule
bool isCoreModule(Identifier ident)
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.

loadCoreAtomic
Module loadCoreAtomic()

A Singleton that loads core.atomic

loadCoreStdcConfig
Module loadCoreStdcConfig()

A Singleton that loads core.stdc.config

loadStdMath
Module loadStdMath()

A Singleton that loads std.math

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.

src
const(ubyte)[] src;

Raw content of the file

tagSymTab
Dsymbol[void*] tagSymTab;

ImportC: tag symbols that conflict with other symbols used as the index

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

Meta