Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,34 @@
# Later matches take precedence.

src/dmd/access.d @MartinNowak
src/dmd/astbase* @RazvanN7
src/dmd/astcodegen.d @RazvanN7
src/dmd/asttypename.d @UplinkCoder
src/dmd/attrib.d @Geod24
src/dmd/ast/base* @RazvanN7
src/dmd/ast/codegen.d @RazvanN7
src/dmd/ast/typename.d @UplinkCoder
src/dmd/astattrib.d @Geod24
src/dmd/builtin.d @klickvebot @WalterBright
src/dmd/cond.d @Geod24
src/dmd/ast/cond.d @Geod24
src/dmd/console.d @CyberShadow
src/dmd/cppmangle.d @ibuclaw @Geod24
src/dmd/mangle/cpp.d @ibuclaw @Geod24
src/dmd/cparse.d @ibuclaw @WalterBright
src/dmd/ctfeexpr.d @UplinkCoder
src/dmd/doc.d @andralex @jacob-carlborg
src/dmd/dscope.d @Geod24
src/dmd/hdrgen.d @UplinkCoder @WalterBright
src/dmd/iasm.d @ibuclaw @WalterBright
src/dmd/iasmdmd.d @WalterBright
src/dmd/iasmgcc.d @ibuclaw
src/dmd/iasm/package.d @ibuclaw @WalterBright
src/dmd/iasm/dmdx86.d @WalterBright
src/dmd/iasm/dmdaarch64.d @WalterBright
src/dmd/iasm/gcc.d @ibuclaw
src/dmd/mars.d @MartinNowak @Geod24 @rainers @UplinkCoder @WalterBright
src/dmd/objc* @jacob-carlborg
src/dmd/permissivevisitor.d @RazvanN7
src/dmd/visitor/permissive.d @RazvanN7
src/dmd/target.d @ibuclaw @MartinNowak
src/dmd/transitivevisitor.d @RazvanN7
src/dmd/visitor/transitive.d @RazvanN7
src/dmd/vcbuild @rainers

# GitHub's implementation of the CODEOWNERS format is buggy, it doesn't allow src/dmd/*.h
*.h @ibuclaw @klickverbot

# CI & automation
posix.mak @MartinNowak @wilzbach
posix.mak @MartinNowak
src/posix.mak @MartinNowak @wilzbach
circle.sh @MartinNowak @wilzbach
circle.sh @MartinNowak
2 changes: 1 addition & 1 deletion compiler/include/dmd/declaration.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace dmd
bool isVirtual(const FuncDeclaration * const fd);
}

//enum STC : ulong from astenums.d:
//enum STC : ulong from ast/enums.d:

#define STCundefined 0ULL

Expand Down
2 changes: 1 addition & 1 deletion compiler/src/.dscanner.ini
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ unused_result="disabled"
trust_too_much="-dmd.root.longdouble"
builtin_property_names_check="-dmd.backend.obj,-dmd.backend.code,-dmd.backend.cc"
object_const_check="-dmd.dtemplate"
enum_array_literal_check="-dmd.astbase,-dmd.backend.oper,-dmd.backend.oper,-dmd.backend.var,-dmd.tokens,-dmd.expression"
enum_array_literal_check="-dmd.ast.base,-dmd.backend.oper,-dmd.backend.oper,-dmd.backend.var,-dmd.tokens,-dmd.ast.expression"
unused_variable_check="-dmd.backend.aarray,\
-dmd.backend.blockopt,\
-dmd.backend.cg,\
Expand Down
31 changes: 18 additions & 13 deletions compiler/src/build.d
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ alias html = makeRule!((htmlBuilder, htmlRule) {
}
const stddocs = env.get("STDDOC", "").split();
auto docSources = .sources.common ~ .sources.root ~ .sources.lexer ~ .sources.dmd.all
~ env["D"].buildPath("astbase.d")
~ env["D"].buildPath("ast/base.d")
~ env["D"].buildPath("cxxfrontend.d")
~ env["D"].buildPath("frontend.d");
htmlBuilder.deps(docSources.chunks(1).map!(sourceArray =>
Expand Down Expand Up @@ -1515,24 +1515,29 @@ auto sourceFiles()
link.d mars.d main.d sarif.d lib/scanelf.d lib/scanmach.d lib/scanmscoff.d timetrace.d vsoptions.d
"),
frontend: fileArray(env["D"], "
access.d aggregate.d aliasthis.d argtypes_x86.d argtypes_sysv_x64.d argtypes_aarch64.d arrayop.d
arraytypes.d astenums.d ast_node.d astcodegen.d asttypename.d attrib.d attribsem.d blockexit.d builtin.d canthrow.d chkformat.d
cli.d clone.d compiler.d cond.d constfold.d cpreprocess.d ctfeexpr.d
ctorflow.d dcast.d dclass.d declaration.d delegatize.d denum.d deps.d dimport.d
dinterpret.d dmacro.d dmodule.d doc.d dscope.d dstruct.d dsymbol.d dsymbolsem.d
dtemplate.d dtoh.d dversion.d enumsem.d escape.d expression.d expressionsem.d func.d funcsem.d hdrgen.d
impcnvtab.d imphint.d importc.d init.d initsem.d inline.d inlinecost.d intrange.d json.d lambdacomp.d
mtype.d mustuse.d nogc.d nspace.d ob.d objc.d opover.d optimize.d
parse.d pragmasem.d printast.d rootobject.d safe.d
semantic2.d semantic3.d sideeffect.d statement.d
statementsem.d staticassert.d staticcond.d stmtstate.d target.d targetcompiler.d templatesem.d templateparamsem.d traits.d
access.d argtypes_x86.d argtypes_sysv_x64.d argtypes_aarch64.d arrayop.d
arraytypes.d attribsem.d blockexit.d builtin.d canthrow.d chkformat.d
cli.d clone.d compiler.d constfold.d cpreprocess.d ctfeexpr.d
ctorflow.d dcast.d delegatize.d deps.d
dinterpret.d dmacro.d doc.d dscope.d dsymbolsem.d
dtoh.d enumsem.d escape.d expressionsem.d funcsem.d hdrgen.d
impcnvtab.d imphint.d importc.d initsem.d inline.d inlinecost.d intrange.d json.d lambdacomp.d
mustuse.d nogc.d ob.d objc.d opover.d optimize.d
parse.d pragmasem.d rootobject.d safe.d
semantic2.d semantic3.d sideeffect.d
statementsem.d stmtstate.d target.d targetcompiler.d templatesem.d templateparamsem.d traits.d
typesem.d typinf.d utils.d
ast/aggregate.d ast/aliasthis.d ast/codegen.d ast/attrib.d ast/cond.d ast/dclass.d ast/declaration.d
ast/denum.d ast/dimport.d ast/dmodule.d ast/dstruct.d ast/dsymbol.d ast/dtemplate.d ast/dversion.d ast/enums.d
ast/expression.d ast/func.d ast/init.d ast/mtype.d ast/node.d ast/nspace.d ast/print.d ast/statement.d
ast/staticassert.d ast/staticcond.d ast/typename.d
dfa/entry.d dfa/utils.d dfa/fast/structure.d dfa/fast/analysis.d dfa/fast/report.d dfa/fast/expression.d dfa/fast/statement.d
iasm/package.d iasm/gcc.d
mangle/package.d mangle/basic.d mangle/cpp.d mangle/cppwin.d
visitor/package.d visitor/foreachvar.d visitor/parsetime.d visitor/permissive.d visitor/postorder.d visitor/statement_rewrite_walker.d
visitor/strict.d visitor/transitive.d
cparse.d
dfa/entry.d dfa/utils.d dfa/fast/structure.d dfa/fast/analysis.d dfa/fast/report.d dfa/fast/expression.d dfa/fast/statement.d

"),
backendHeaders: fileArray(env["C"], "
cc.d cdef.d cgcv.d code.d dt.d el.d global.d
Expand Down
55 changes: 25 additions & 30 deletions compiler/src/dmd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,40 +62,38 @@ Note that these groups have no strict meaning, the category assignments are a bi

### Semantic analysis

**Symbols and declarations**
**AST Nodes, Symbols and declarations**

| File | Purpose |
|---------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| [dsymbol.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dsymbol.d) | Base class for a D symbol, e.g. a variable, function, module, enum etc. |
| [dsymbol.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/dsymbol.d) | Base class for a D symbol, e.g. a variable, function, module, enum etc. |
| [identifier.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/identifier.d) | Represents the name of a `Dsymbol` |
| [id.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/id.d) | Define strings for pre-defined identifiers (e.g. `sizeof`, `string`) |
| [dscope.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dscope.d) | Define a 'scope' on which symbol lookup can be performed |
| [dtemplate.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dtemplate.d) | A template declaration or instance |
| [dmodule.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dmodule.d) | Define a package and module |
| [mtype.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/mtype.d) | Define expression types such as `int`, `char[]`, `void function()` |
| [dscope.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/dscope.d) | Define a 'scope' on which symbol lookup can be performed |
| [dtemplate.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/dtemplate.d) | A template declaration or instance |
| [dmodule.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/dmodule.d) | Define a package and module |
| [mtype.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/mtype.d) | Define expression types such as `int`, `char[]`, `void function()` |
| [arraytypes.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/arraytypes.d) | For certain Declaration nodes of type `T`, provides aliases for `Array!T` |
| [declaration.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/declaration.d) | Misc. declarations of `alias`, variables, type tuples, `ClassInfo` etc. |
| [denum.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/denum.d) | Defines `enum` declarations and enum members |
| [declaration.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/declaration.d) | Misc. declarations of `alias`, variables, type tuples, `ClassInfo` etc. |
| [denum.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/denum.d) | Defines `enum` declarations and enum members |
| [attrib.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/nogc.d) | Declarations of 'attributes' such as `private`, `pragma()`, `immutable`, `@UDA`, `align`, `extern(C++)` and more |
| [func.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/func.d) | Define a function declaration (includes function literals, `invariant`, `unittest`) |
| [dversion.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dversion.d) | Defines a version symbol, e.g. `version = ident`, `debug = ident` |

**AST nodes**

| File | Purpose |
|-----------------------------------------------------------------------------------|-------------------------------------------------------------|
| [ast_node.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast_node.d) | Define an abstract AST node class |
| [astbase.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/astbase.d) | Namespace of AST nodes that can be produced by the parser |
| [astcodegen.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/astcodegen.d) | Namespace of AST nodes of a AST ready for code generation |
| [astenums.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/astenums.d) | Enums common to DMD and AST |
| [expression.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/expression.d) | Define expression AST nodes |
| [func.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/func.d) | Define a function declaration (includes function literals, `invariant`, `unittest`) |
| [dversion.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/dversion.d) | Defines a version symbol, e.g. `version = ident`, `debug = ident` |
| [node.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/node.d) | Define an abstract AST node class |
| [base.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/base.d) | Namespace of AST nodes that can be produced by the parser |
| [codegen.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/codegen.d) | Namespace of AST nodes of a AST ready for code generation |
| [enums.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/enums.d) | Enums common to DMD and AST |
| [cond.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/cond.d) | AST nodes for `static if`, `version` `debug ` |
| [expression.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/expression.d) | Define expression AST nodes |
| [rootobject.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/rootobject.d) | Define an abstract root class |
| [statement.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/statement.d) | Define statement AST nodes |
| [staticassert.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/staticassert.d) | Define a `static assert` AST node |
| [aggregate.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/aggregate.d) | Define an aggregate (`struct`, `union` or `class`) AST node |
| [dclass.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dclass.d) | Define a `class` AST node |
| [dstruct.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dstruct.d) | Define a `struct` or `union` AST node |
| [init.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/init.d) | Define variable initializers |
| [dimport.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/dimport.d) | Renamed imports (`import aliasSymbol = pkg1.pkg2.symbol`) |
| [nspace.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/nspace.d) | Namespace for `extern (C++, Module)` |
| [statement.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/statement.d) | Define statement AST nodes |
| [staticassert.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/staticassert.d) | Define a `static assert` AST node |
| [aggregate.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/aggregate.d) | Define an aggregate (`struct`, `union` or `class`) AST node |
| [dclass.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/dclass.d) | Define a `class` AST node |
| [dstruct.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/dstruct.d) | Define a `struct` or `union` AST node |
| [init.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/init.d) | Define variable initializers |

**AST visitors**

Expand Down Expand Up @@ -184,12 +182,9 @@ Note that these groups have no strict meaning, the category assignments are a bi
| [aliasthis.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/aliasthis.d) | Resolve implicit conversions for `alias X this` |
| [traits.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/traits.d) | `__traits()` |
| [lambdacomp.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/lambdacomp.d) | `__traits(isSame, x => y, z => w)` |
| [cond.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cond.d) | Evaluate `static if`, `version` `debug ` |
| [staticcond.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/staticcond.d) | Lazily evaluate static conditions for `static if`, `static assert` and template constraints |
| [delegatize.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/delegatize.d) | Converts expression to delegates for `lazy` parameters |
| [nspace.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/nspace.d) | Namespace for `extern (C++, Module)` |
| [intrange.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/intrange.d) | [Value range propagation](https://digitalmars.com/articles/b62.html) |
| [dimport.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dimport.d) | Renamed imports (`import aliasSymbol = pkg1.pkg2.symbol`) |
| [arrayop.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/arrayop.d) | Array operations (`a[] = b[] + c[]`) |
| [cpreprocess.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cpreprocess.d)| Run the C preprocessor on C source files |
| [typinf.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/typinf.d) | Generate typeinfo for `typeid()` (as well as internals) |
Expand Down Expand Up @@ -273,5 +268,5 @@ Note: many other utilities are in [dmd/root](https://github.com/dlang/dmd/tree/m

| File | Purpose |
|---------------------------------------------------------------------------------|---------------------------------------------------------------|
| [asttypename.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/asttypename.d) | Print the internal name of an AST node (for debugging only) |
| [asttypename.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast/typename.d) | Print the internal name of an AST node (for debugging only) |
| [printast.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/printast.d) | Print the AST data structure |
15 changes: 8 additions & 7 deletions compiler/src/dmd/access.d
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@

module dmd.access;

import dmd.aggregate;
import dmd.astenums;
import dmd.dclass;
import dmd.dmodule;
import dmd.ast.aggregate;
import dmd.ast.enums;
import dmd.ast.dclass;
import dmd.ast.dmodule;
import dmd.ast.dstruct;
import dmd.ast.dsymbol;
import dmd.ast.expression;

import dmd.dscope;
import dmd.dstruct;
import dmd.dsymbol;
import dmd.dsymbolsem : toAlias;
import dmd.errors;
import dmd.expression;
import dmd.funcsem : overloadApply;
import dmd.location;
import dmd.tokens;
Expand Down
5 changes: 3 additions & 2 deletions compiler/src/dmd/argtypes_aarch64.d
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@

module dmd.argtypes_aarch64;

import dmd.ast.enums;
import dmd.ast.mtype;

import core.stdc.stdio;
import dmd.astenums;
import dmd.dsymbolsem : isPOD;
import dmd.mtype;
import dmd.typesem;
import dmd.expressionsem : toUInteger;

Expand Down
8 changes: 5 additions & 3 deletions compiler/src/dmd/argtypes_sysv_x64.d
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
module dmd.argtypes_sysv_x64;

import core.stdc.stdio;
import dmd.astenums;
import dmd.declaration;

import dmd.ast.enums;
import dmd.ast.declaration;
import dmd.ast.mtype;

import dmd.dsymbolsem : isPOD;
import dmd.mtype;
import dmd.typesem;
import dmd.expressionsem : toInteger;
import dmd.target;
Expand Down
Loading
Loading