|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 30-Jul-2023 | - |
| common/ | H | 30-Jul-2023 | - | 1,874 | 1,296 |
| res/ | H | 30-Jul-2023 | - | 826 | 697 |
| root/ | H | 30-Jul-2023 | - | 9,335 | 6,460 |
| MERGE | H A D | 30-Jul-2023 | 154 | 5 | 3 |
| README.md | H A D | 30-Jul-2023 | 30.5 KiB | 262 | 214 |
| VERSION | H A D | 30-Jul-2023 | 9 | 2 | 1 |
| access.c | H A D | 08-May-2022 | 16.8 KiB | 570 | 400 |
| access.d | H A D | 30-Jul-2023 | 12.7 KiB | 403 | 261 |
| aggregate.d | H A D | 30-Jul-2023 | 26.9 KiB | 817 | 540 |
| aggregate.h | H A D | 30-Jul-2023 | 11.4 KiB | 331 | 237 |
| aliasthis.c | H A D | 08-May-2022 | 4.5 KiB | 169 | 130 |
| aliasthis.d | H A D | 30-Jul-2023 | 6.7 KiB | 218 | 141 |
| aliasthis.h | H A D | 30-Jul-2023 | 863 | 32 | 15 |
| apply.c | H A D | 08-May-2022 | 3.6 KiB | 150 | 101 |
| apply.d | H A D | 30-Jul-2023 | 5.1 KiB | 190 | 126 |
| arrayop.c | H A D | 08-May-2022 | 17.9 KiB | 636 | 478 |
| arrayop.d | H A D | 30-Jul-2023 | 10.8 KiB | 389 | 280 |
| arraytypes.d | H A D | 30-Jul-2023 | 2.1 KiB | 57 | 43 |
| arraytypes.h | H A D | 30-Jul-2023 | 1.9 KiB | 70 | 31 |
| ast_node.d | H A D | 30-Jul-2023 | 923 | 27 | 7 |
| ast_node.h | H A D | 30-Jul-2023 | 499 | 21 | 7 |
| astcodegen.d | H A D | 30-Jul-2023 | 4.3 KiB | 103 | 86 |
| astenums.d | H A D | 30-Jul-2023 | 13.5 KiB | 443 | 350 |
| attrib.c | H A D | 08-May-2022 | 46.5 KiB | 1,753 | 1,291 |
| attrib.d | H A D | 30-Jul-2023 | 47.4 KiB | 1,604 | 1,036 |
| attrib.h | H A D | 30-Jul-2023 | 6.9 KiB | 256 | 200 |
| blockexit.c | H A D | 08-May-2022 | 15.7 KiB | 505 | 417 |
| blockexit.d | H A D | 30-Jul-2023 | 17.3 KiB | 559 | 438 |
| boostlicense.txt | H A D | 08-May-2022 | 1.3 KiB | 24 | 20 |
| builtin.d | H A D | 30-Jul-2023 | 1.1 KiB | 32 | 7 |
| canthrow.c | H A D | 08-May-2022 | 9.4 KiB | 317 | 258 |
| canthrow.d | H A D | 30-Jul-2023 | 8.3 KiB | 288 | 218 |
| chkformat.d | H A D | 30-Jul-2023 | 41.2 KiB | 1,365 | 991 |
| clone.c | H A D | 08-May-2022 | 37.4 KiB | 1,182 | 827 |
| clone.d | H A D | 30-Jul-2023 | 55.9 KiB | 1,700 | 1,115 |
| compiler.d | H A D | 30-Jul-2023 | 1.9 KiB | 58 | 19 |
| compiler.h | H A D | 30-Jul-2023 | 1 KiB | 38 | 17 |
| complex_t.h | H A D | 08-May-2022 | 2 KiB | 72 | 46 |
| cond.c | H A D | 30-Jul-2022 | 21.7 KiB | 752 | 563 |
| cond.d | H A D | 30-Jul-2023 | 30.3 KiB | 1,004 | 669 |
| cond.h | H A D | 30-Jul-2023 | 2.2 KiB | 99 | 71 |
| constfold.c | H A D | 08-May-2022 | 51.9 KiB | 1,923 | 1,662 |
| constfold.d | H A D | 30-Jul-2023 | 52.1 KiB | 1,822 | 1,645 |
| cparse.d | H A D | 30-Jul-2023 | 158.3 KiB | 5,034 | 3,459 |
| cppmangle.c | H A D | 08-May-2022 | 34.8 KiB | 1,133 | 800 |
| cppmangle.d | H A D | 30-Jul-2023 | 80 KiB | 2,579 | 1,686 |
| ctfe.h | H A D | 30-Jul-2023 | 1.6 KiB | 65 | 30 |
| ctfeexpr.c | H A D | 08-May-2022 | 65.7 KiB | 2,126 | 1,731 |
| ctfeexpr.d | H A D | 30-Jul-2023 | 67.4 KiB | 2,109 | 1,721 |
| ctorflow.d | H A D | 30-Jul-2023 | 6.1 KiB | 225 | 136 |
| dcast.c | H A D | 30-Jul-2022 | 116.7 KiB | 3,565 | 2,825 |
| dcast.d | H A D | 30-Jul-2023 | 122.3 KiB | 3,895 | 3,004 |
| dclass.c | H A D | 08-May-2022 | 56.9 KiB | 1,941 | 1,395 |
| dclass.d | H A D | 30-Jul-2023 | 35.6 KiB | 1,160 | 792 |
| declaration.c | H A D | 08-May-2022 | 75.8 KiB | 2,561 | 1,901 |
| declaration.d | H A D | 30-Jul-2023 | 72.1 KiB | 2,389 | 1,775 |
| declaration.h | H A D | 30-Jul-2023 | 28.5 KiB | 868 | 658 |
| delegatize.c | H A D | 08-May-2022 | 5.5 KiB | 210 | 145 |
| delegatize.d | H A D | 30-Jul-2023 | 8.4 KiB | 306 | 202 |
| denum.c | H A D | 08-May-2022 | 19.6 KiB | 751 | 574 |
| denum.d | H A D | 30-Jul-2023 | 9 KiB | 338 | 233 |
| dimport.c | H A D | 08-May-2022 | 13.4 KiB | 488 | 363 |
| dimport.d | H A D | 30-Jul-2023 | 11.3 KiB | 359 | 271 |
| dinterpret.c | H A D | 11-Jul-2023 | 235 KiB | 7,079 | 5,823 |
| dinterpret.d | H A D | 30-Jul-2023 | 247.3 KiB | 7,485 | 6,101 |
| dmacro.c | H A D | 08-May-2022 | 14 KiB | 459 | 334 |
| dmacro.d | H A D | 30-Jul-2023 | 14.8 KiB | 425 | 318 |
| dmangle.c | H A D | 08-May-2022 | 23.1 KiB | 875 | 689 |
| dmangle.d | H A D | 30-Jul-2023 | 37.1 KiB | 1,372 | 1,037 |
| dmodule.c | H A D | 08-May-2022 | 39.2 KiB | 1,362 | 960 |
| dmodule.d | H A D | 30-Jul-2023 | 50.3 KiB | 1,519 | 1,070 |
| doc.c | H A D | 08-May-2022 | 80.4 KiB | 2,806 | 2,175 |
| doc.d | H A D | 30-Jul-2023 | 178.2 KiB | 5,391 | 4,194 |
| doc.h | H A D | 30-Jul-2023 | 417 | 16 | 3 |
| dscope.c | H A D | 08-May-2022 | 18.8 KiB | 702 | 514 |
| dscope.d | H A D | 30-Jul-2023 | 26.5 KiB | 804 | 559 |
| dstruct.c | H A D | 08-May-2022 | 41.6 KiB | 1,484 | 1,068 |
| dstruct.d | H A D | 30-Jul-2023 | 18.2 KiB | 636 | 440 |
| dsymbol.c | H A D | 08-May-2022 | 51.2 KiB | 1,890 | 1,324 |
| dsymbol.d | H A D | 30-Jul-2023 | 82.7 KiB | 2,605 | 1,771 |
| dsymbol.h | H A D | 30-Jul-2023 | 15.2 KiB | 432 | 352 |
| dsymbolsem.d | H A D | 30-Jul-2023 | 249.5 KiB | 6,915 | 5,210 |
| dtemplate.c | H A D | 08-May-2022 | 279 KiB | 8,671 | 6,379 |
| dtemplate.d | H A D | 30-Jul-2023 | 292.1 KiB | 8,429 | 6,157 |
| dtoh.d | H A D | 30-Jul-2023 | 99.4 KiB | 3,295 | 2,458 |
| dversion.c | H A D | 08-May-2022 | 4.4 KiB | 201 | 151 |
| dversion.d | H A D | 30-Jul-2023 | 5.4 KiB | 216 | 166 |
| entity.c | H A D | 08-May-2022 | 156.8 KiB | 2,391 | 2,205 |
| entity.d | H A D | 30-Jul-2023 | 147.6 KiB | 2,396 | 2,207 |
| enum.h | H A D | 30-Jul-2023 | 2.2 KiB | 87 | 46 |
| errors.d | H A D | 30-Jul-2023 | 14 KiB | 459 | 248 |
| errors.h | H A D | 30-Jul-2023 | 2.7 KiB | 56 | 36 |
| escape.c | H A D | 08-May-2022 | 39.5 KiB | 1,235 | 892 |
| escape.d | H A D | 30-Jul-2023 | 77.7 KiB | 2,365 | 1,626 |
| expression.c | H A D | 30-Jul-2022 | 195.9 KiB | 7,023 | 5,265 |
| expression.d | H A D | 30-Jul-2023 | 210.5 KiB | 7,234 | 5,231 |
| expression.h | H A D | 30-Jul-2023 | 33.7 KiB | 1,406 | 1,101 |
| expressionsem.c | H A D | 11-Jul-2023 | 283.6 KiB | 8,803 | 7,226 |
| expressionsem.d | H A D | 30-Jul-2023 | 447.9 KiB | 13,466 | 10,437 |
| file_manager.d | H A D | 30-Jul-2023 | 8.9 KiB | 293 | 199 |
| foreachvar.d | H A D | 30-Jul-2023 | 9 KiB | 323 | 260 |
| func.c | H A D | 08-May-2022 | 176.9 KiB | 5,662 | 4,101 |
| func.d | H A D | 30-Jul-2023 | 137.6 KiB | 4,301 | 2,911 |
| globals.d | H A D | 30-Jul-2023 | 23.5 KiB | 616 | 412 |
| globals.h | H A D | 30-Jul-2023 | 15.3 KiB | 422 | 316 |
| gluelayer.d | H A D | 30-Jul-2023 | 2.1 KiB | 92 | 64 |
| hdrgen.c | H A D | 08-May-2022 | 89.4 KiB | 3,480 | 3,023 |
| hdrgen.d | H A D | 30-Jul-2023 | 112.2 KiB | 4,151 | 3,618 |
| hdrgen.h | H A D | 30-Jul-2023 | 595 | 22 | 8 |
| iasm.c | H A D | 08-May-2022 | 1.2 KiB | 45 | 23 |
| iasm.d | H A D | 30-Jul-2023 | 1.5 KiB | 60 | 35 |
| iasmgcc.c | H A D | 08-May-2022 | 10.5 KiB | 382 | 236 |
| iasmgcc.d | H A D | 30-Jul-2023 | 14.9 KiB | 538 | 349 |
| id.d | H A D | 30-Jul-2023 | 13.7 KiB | 586 | 473 |
| id.h | H A D | 30-Jul-2023 | 418 | 17 | 5 |
| identifier.c | H A D | 08-May-2022 | 4.1 KiB | 189 | 137 |
| identifier.d | H A D | 30-Jul-2023 | 10 KiB | 363 | 232 |
| identifier.h | H A D | 30-Jul-2023 | 1.1 KiB | 42 | 25 |
| idgen.c | H A D | 08-May-2022 | 13.3 KiB | 505 | 425 |
| impcnvgen.c | H A D | 08-May-2022 | 19.8 KiB | 599 | 463 |
| impcnvtab.d | H A D | 30-Jul-2023 | 16.2 KiB | 435 | 302 |
| imphint.c | H A D | 08-May-2022 | 1.3 KiB | 53 | 31 |
| imphint.d | H A D | 30-Jul-2023 | 2.7 KiB | 92 | 66 |
| import.h | H A D | 30-Jul-2023 | 1.6 KiB | 55 | 32 |
| importc.d | H A D | 30-Jul-2023 | 9.9 KiB | 358 | 208 |
| init.c | H A D | 08-May-2022 | 7 KiB | 286 | 228 |
| init.d | H A D | 30-Jul-2023 | 8.8 KiB | 333 | 247 |
| init.h | H A D | 30-Jul-2023 | 2.7 KiB | 118 | 85 |
| initsem.c | H A D | 08-May-2022 | 29.4 KiB | 918 | 770 |
| initsem.d | H A D | 30-Jul-2023 | 47.8 KiB | 1,395 | 1,101 |
| inline.d | H A D | 30-Jul-2023 | 1.2 KiB | 31 | 7 |
| intrange.c | H A D | 08-May-2022 | 23.3 KiB | 840 | 649 |
| intrange.d | H A D | 30-Jul-2023 | 27.3 KiB | 920 | 708 |
| intrange.h | H A D | 08-May-2022 | 7.2 KiB | 178 | 84 |
| json.c | H A D | 08-May-2022 | 20.7 KiB | 892 | 700 |
| json.d | H A D | 30-Jul-2023 | 28.7 KiB | 1,082 | 910 |
| json.h | H A D | 30-Jul-2023 | 541 | 20 | 6 |
| lambdacomp.d | H A D | 30-Jul-2023 | 13.6 KiB | 497 | 363 |
| lexer.c | H A D | 08-May-2022 | 66.1 KiB | 2,402 | 1,987 |
| lexer.d | H A D | 30-Jul-2023 | 99.7 KiB | 3,312 | 2,842 |
| lexer.h | H A D | 08-May-2022 | 2.2 KiB | 76 | 54 |
| macro.h | H A D | 08-May-2022 | 1.1 KiB | 39 | 19 |
| mangle.h | H A D | 30-Jul-2023 | 1 KiB | 35 | 17 |
| mars.h | H A D | 08-May-2022 | 2.7 KiB | 94 | 26 |
| module.h | H A D | 30-Jul-2023 | 6.1 KiB | 173 | 118 |
| mtype.c | H A D | 30-Jul-2022 | 254.2 KiB | 9,599 | 7,536 |
| mtype.d | H A D | 30-Jul-2023 | 207.5 KiB | 7,319 | 5,506 |
| mtype.h | H A D | 30-Jul-2023 | 24.5 KiB | 934 | 780 |
| mustuse.d | H A D | 30-Jul-2023 | 6.5 KiB | 245 | 168 |
| nogc.c | H A D | 08-May-2022 | 6 KiB | 242 | 201 |
| nogc.d | H A D | 30-Jul-2023 | 7 KiB | 244 | 195 |
| nspace.c | H A D | 08-May-2022 | 5.6 KiB | 239 | 197 |
| nspace.d | H A D | 30-Jul-2023 | 5.2 KiB | 172 | 100 |
| nspace.h | H A D | 30-Jul-2023 | 986 | 33 | 16 |
| ob.d | H A D | 30-Jul-2023 | 79 KiB | 2,686 | 1,968 |
| objc.c | H A D | 08-May-2022 | 1.6 KiB | 85 | 56 |
| objc.d | H A D | 30-Jul-2023 | 26.3 KiB | 896 | 549 |
| objc.h | H A D | 30-Jul-2023 | 2.5 KiB | 85 | 58 |
| opover.c | H A D | 08-May-2022 | 66.4 KiB | 1,964 | 1,478 |
| opover.d | H A D | 30-Jul-2023 | 68.5 KiB | 1,857 | 1,408 |
| optimize.c | H A D | 08-May-2022 | 41.5 KiB | 1,275 | 1,016 |
| optimize.d | H A D | 30-Jul-2023 | 46.9 KiB | 1,403 | 1,147 |
| parse.c | H A D | 08-May-2022 | 243.3 KiB | 8,150 | 6,677 |
| parse.d | H A D | 30-Jul-2023 | 316 KiB | 9,626 | 7,717 |
| parse.h | H A D | 08-May-2022 | 6.7 KiB | 192 | 160 |
| parsetimevisitor.d | H A D | 30-Jul-2023 | 17 KiB | 299 | 230 |
| permissivevisitor.d | H A D | 30-Jul-2023 | 949 | 29 | 14 |
| printast.d | H A D | 30-Jul-2023 | 5.6 KiB | 212 | 165 |
| readme.txt | H A D | 08-May-2022 | 463 | 14 | 10 |
| safe.c | H A D | 08-May-2022 | 5 KiB | 169 | 101 |
| safe.d | H A D | 30-Jul-2023 | 7.3 KiB | 229 | 143 |
| sapply.c | H A D | 08-May-2022 | 3.7 KiB | 156 | 127 |
| sapply.d | H A D | 30-Jul-2023 | 4.1 KiB | 180 | 130 |
| scope.h | H A D | 30-Jul-2023 | 5.7 KiB | 151 | 102 |
| semantic2.d | H A D | 30-Jul-2023 | 25.8 KiB | 779 | 568 |
| semantic3.d | H A D | 30-Jul-2023 | 65.7 KiB | 1,653 | 1,218 |
| sideeffect.c | H A D | 08-May-2022 | 12.9 KiB | 439 | 288 |
| sideeffect.d | H A D | 30-Jul-2023 | 13.2 KiB | 423 | 272 |
| statement.c | H A D | 08-May-2022 | 42.3 KiB | 1,773 | 1,334 |
| statement.d | H A D | 30-Jul-2023 | 54.8 KiB | 2,064 | 1,508 |
| statement.h | H A D | 30-Jul-2023 | 20.7 KiB | 767 | 584 |
| statement_rewrite_walker.d | H A D | 30-Jul-2023 | 4.4 KiB | 195 | 150 |
| statementsem.c | H A D | 30-Jul-2022 | 142.6 KiB | 3,911 | 3,129 |
| statementsem.d | H A D | 30-Jul-2023 | 165.9 KiB | 4,879 | 3,749 |
| staticassert.c | H A D | 08-May-2022 | 2.6 KiB | 103 | 76 |
| staticassert.d | H A D | 30-Jul-2023 | 1.8 KiB | 72 | 45 |
| staticassert.h | H A D | 30-Jul-2023 | 791 | 30 | 15 |
| staticcond.c | H A D | 08-May-2022 | 2.7 KiB | 101 | 66 |
| staticcond.d | H A D | 30-Jul-2023 | 12.9 KiB | 424 | 336 |
| stmtstate.d | H A D | 30-Jul-2023 | 3.8 KiB | 143 | 106 |
| target.d | H A D | 30-Jul-2023 | 15.1 KiB | 442 | 166 |
| target.h | H A D | 30-Jul-2023 | 6.8 KiB | 215 | 163 |
| template.h | H A D | 30-Jul-2023 | 9.9 KiB | 318 | 208 |
| templateparamsem.d | H A D | 30-Jul-2023 | 5.9 KiB | 191 | 137 |
| tokens.c | H A D | 08-May-2022 | 15.6 KiB | 477 | 409 |
| tokens.d | H A D | 30-Jul-2023 | 24.8 KiB | 1,155 | 1,008 |
| tokens.h | H A D | 30-Jul-2023 | 7.5 KiB | 488 | 402 |
| traits.c | H A D | 08-May-2022 | 47 KiB | 1,484 | 1,259 |
| traits.d | H A D | 30-Jul-2023 | 67 KiB | 2,236 | 1,803 |
| transitivevisitor.d | H A D | 30-Jul-2023 | 29.6 KiB | 1,212 | 909 |
| typesem.c | H A D | 08-May-2022 | 3.2 KiB | 124 | 90 |
| typesem.d | H A D | 30-Jul-2023 | 163.9 KiB | 4,943 | 3,895 |
| typinf.d | H A D | 30-Jul-2023 | 8.4 KiB | 263 | 177 |
| utf.c | H A D | 08-May-2022 | 9 KiB | 306 | 207 |
| utf.h | H A D | 08-May-2022 | 6.8 KiB | 118 | 93 |
| utils.c | H A D | 08-May-2022 | 2.7 KiB | 124 | 69 |
| utils.d | H A D | 30-Jul-2023 | 7.1 KiB | 300 | 191 |
| version.h | H A D | 30-Jul-2023 | 1,019 | 42 | 24 |
| visitor.d | H A D | 30-Jul-2023 | 10 KiB | 255 | 201 |
| visitor.h | H A D | 30-Jul-2023 | 26.5 KiB | 663 | 587 |
README.md
1# DMD Source code
2
3This is the source code to the DMD compiler
4for the D Programming Language defined in the documents at
5https://dlang.org/
6
7These sources are free, they are redistributable and modifiable
8under the terms of the Boost Software License, Version 1.0.
9The terms of this license are in the file boostlicense.txt,
10or see https://www.boost.org/LICENSE_1_0.txt.
11
12If a particular file has a different license in it, that overrides
13this license for that file.
14
15-Walter Bright
16
17## Directory structure
18
19| Folder | Purpose |
20|--------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
21| [dmd/](https://github.com/dlang/dmd/tree/master/src/dmd) | The dmd driver and front-end |
22| [dmd/backend/](https://github.com/dlang/dmd/tree/master/src/dmd/backend) | Code generation for x86 or x86-64. Shared by the [Digital Mars C compiler](https://github.com/DigitalMars/Compiler/), but not [LDC](https://github.com/ldc-developers/ldc) or [GDC](https://gdcproject.org/). |
23| [dmd/common/](https://github.com/dlang/dmd/tree/master/src/dmd/common) | Code shared by the front-end and back-end |
24| [dmd/root/](https://github.com/dlang/dmd/tree/master/src/dmd/root) | Meant as a portable utility library, but ["it wasn't very good and the only project left using it is dmd"](https://github.com/dlang/dmd/pull/9844#issuecomment-498479516). |
25
26DMD has a mostly flat directory structure, so this section aims to divide all source files into logical groups for easier navigation.
27The groups are roughly ordered by how late they appear in the compilation process.
28Note that these groups have no strict meaning, the category assignments are a bit subjective.
29
30### Driver
31
32| File | Purpose |
33|-----------------------------------------------------------------------------|-----------------------------------------------------------------------|
34| [mars.d](https://github.com/dlang/dmd/blob/master/src/dmd/mars.d) | The entry point. Contains `main`. |
35| [cli.d](https://github.com/dlang/dmd/blob/master/src/dmd/cli.d) | Define the command line interface |
36| [dmdparams.d](https://github.com/dlang/dmd/blob/master/src/dmd/dmdparams.d) | DMD-specific parameters |
37| [globals.d](https://github.com/dlang/dmd/blob/master/src/dmd/globals.d) | Define a structure storing command line options |
38| [dinifile.d](https://github.com/dlang/dmd/blob/master/src/dmd/dinifile.d) | Parse settings from .ini file (`sc.ini` / `dmd.conf`) |
39| [vsoptions.d](https://github.com/dlang/dmd/blob/master/src/dmd/vsoptions.d) | Detect the Microsoft Visual Studio toolchain for linking |
40| [frontend.d](https://github.com/dlang/dmd/blob/master/src/dmd/frontend.d) | An interface for using DMD as a library |
41| [errors.d](https://github.com/dlang/dmd/blob/master/src/dmd/errors.d) | Error reporting functionality |
42| [target.d](https://github.com/dlang/dmd/blob/master/src/dmd/target.d) | Manage target-specific parameters for cross-compiling (for LDC/GDC) |
43| [compiler.d](https://github.com/dlang/dmd/blob/master/src/dmd/compiler.d) | Describe a back-end compiler and implements compiler-specific actions |
44
45### Lexing / parsing
46
47| File | Purpose |
48|-----------------------------------------------------------------------|----------------------------------------------------------------------|
49| [lexer.d](https://github.com/dlang/dmd/blob/master/src/dmd/lexer.d) | Convert source code into tokens for the D and ImportC parsers |
50| [entity.d](https://github.com/dlang/dmd/blob/master/src/dmd/entity.d) | Define "\\&Entity;" escape sequence for strings / character literals |
51| [tokens.d](https://github.com/dlang/dmd/blob/master/src/dmd/tokens.d) | Define lexical tokens. |
52| [parse.d](https://github.com/dlang/dmd/blob/master/src/dmd/parse.d) | D parser, converting tokens into an Abstract Syntax Tree (AST) |
53| [cparse.d](https://github.com/dlang/dmd/blob/master/src/dmd/cparse.d) | ImportC parser, converting tokens into an Abstract Syntax Tree (AST) |
54
55### Semantic analysis
56
57**Symbols and declarations**
58
59| File | Purpose |
60|---------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
61| [dsymbol.d](https://github.com/dlang/dmd/blob/master/src/dmd/dsymbol.d) | Base class for a D symbol, e.g. a variable, function, module, enum etc. |
62| [identifier.d](https://github.com/dlang/dmd/blob/master/src/dmd/identifier.d) | Represents the name of a `Dsymbol` |
63| [id.d](https://github.com/dlang/dmd/blob/master/src/dmd/id.d) | Define strings for pre-defined identifiers (e.g. `sizeof`, `string`) |
64| [dscope.d](https://github.com/dlang/dmd/blob/master/src/dmd/dscope.d) | Define a 'scope' on which symbol lookup can be performed |
65| [dtemplate.d](https://github.com/dlang/dmd/blob/master/src/dmd/dtemplate.d) | A template declaration or instance |
66| [dmodule.d](https://github.com/dlang/dmd/blob/master/src/dmd/dmodule.d) | Define a package and module |
67| [mtype.d](https://github.com/dlang/dmd/blob/master/src/dmd/mtype.d) | Define expression types such as `int`, `char[]`, `void function()` |
68| [arraytypes.d](https://github.com/dlang/dmd/blob/master/src/dmd/arraytypes.d) | For certain Declaration nodes of type `T`, provides aliases for `Array!T` |
69| [declaration.d](https://github.com/dlang/dmd/blob/master/src/dmd/declaration.d) | Misc. declarations of `alias`, variables, type tuples, `ClassInfo` etc. |
70| [denum.d](https://github.com/dlang/dmd/blob/master/src/dmd/denum.d) | Defines `enum` declarations and enum members |
71| [attrib.d](https://github.com/dlang/dmd/blob/master/src/dmd/nogc.d) | Declarations of 'attributes' such as `private`, `pragma()`, `immutable`, `@UDA`, `align`, `extern(C++)` and more |
72| [func.d](https://github.com/dlang/dmd/blob/master/src/dmd/func.d) | Define a function declaration (includes function literals, `invariant`, `unittest`) |
73| [dversion.d](https://github.com/dlang/dmd/blob/master/src/dmd/dversion.d) | Defines a version symbol, e.g. `version = ident`, `debug = ident` |
74
75**AST nodes**
76
77| File | Purpose |
78|-----------------------------------------------------------------------------------|-------------------------------------------------------------|
79| [ast_node.d](https://github.com/dlang/dmd/blob/master/src/dmd/ast_node.d) | Define an abstract AST node class |
80| [astbase.d](https://github.com/dlang/dmd/blob/master/src/dmd/astbase.d) | Namespace of AST nodes that can be produced by the parser |
81| [astcodegen.d](https://github.com/dlang/dmd/blob/master/src/dmd/astcodegen.d) | Namespace of AST nodes of a AST ready for code generation |
82| [astenums.d](https://github.com/dlang/dmd/blob/master/src/dmd/astenums.d) | Enums common to DMD and AST |
83| [expression.d](https://github.com/dlang/dmd/blob/master/src/dmd/expression.d) | Define expression AST nodes |
84| [statement.d](https://github.com/dlang/dmd/blob/master/src/dmd/statement.d) | Define statement AST nodes |
85| [staticassert.d](https://github.com/dlang/dmd/blob/master/src/dmd/staticassert.d) | Define a `static assert` AST node |
86| [aggregate.d](https://github.com/dlang/dmd/blob/master/src/dmd/aggregate.d) | Define an aggregate (`struct`, `union` or `class`) AST node |
87| [dclass.d](https://github.com/dlang/dmd/blob/master/src/dmd/dclass.d) | Define a `class` AST node |
88| [dstruct.d](https://github.com/dlang/dmd/blob/master/src/dmd/dstruct.d) | Define a `struct` or `union` AST node |
89| [init.d](https://github.com/dlang/dmd/blob/master/src/dmd/init.d) | Define variable initializers |
90
91**AST visitors**
92
93| File | Purpose |
94|-----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|
95| [parsetimevisitor.d](https://github.com/dlang/dmd/blob/master/src/dmd/parsetimevisitor.d) | General [visitor](https://en.wikipedia.org/wiki/Visitor_pattern) for AST nodes |
96| [permissivevisitor.d](https://github.com/dlang/dmd/blob/master/src/dmd/permissivevisitor.d) | Subclass of ParseTimeVisitor that does not `assert(0)` on unimplemented nodes |
97| [strictvisitor.d](https://github.com/dlang/dmd/blob/master/src/dmd/strictvisitor.d) | Visitor that forces derived classes to implement `visit` for every possible node |
98| [visitor.d](https://github.com/dlang/dmd/blob/master/src/dmd/visitor.d) | A visitor implementing `visit` for all nodes present in the compiler |
99| [transitivevisitor.d](https://github.com/dlang/dmd/blob/master/src/dmd/transitivevisitor.d) | Provide a mixin template with visit methods for the parse time AST |
100| [apply.d](https://github.com/dlang/dmd/blob/master/src/dmd/apply.d) | Depth-first expression visitor |
101| [sapply.d](https://github.com/dlang/dmd/blob/master/src/dmd/sapply.d) | Depth-first statement visitor |
102| [statement_rewrite_walker.d](https://github.com/dlang/dmd/blob/master/src/dmd/statement_rewrite_walker.d) | Statement visitor that allows replacing the currently visited node |
103
104**Semantic passes**
105
106| File | Purpose |
107|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
108| [dsymbolsem.d](https://github.com/dlang/dmd/blob/master/src/dmd/dsymbolsem.d) | Do semantic 1 pass (symbol identifiers/types) |
109| [semantic2.d](https://github.com/dlang/dmd/blob/master/src/dmd/semantic2.d) | Do semantic 2 pass (symbol initializers) |
110| [semantic3.d](https://github.com/dlang/dmd/blob/master/src/dmd/semantic3.d) | Do semantic 3 pass (function bodies) |
111| [inline.d](https://github.com/dlang/dmd/blob/master/src/dmd/inline.d) | Do inline pass (optimization pass that dmd does in the front-end) |
112| [inlinecost.d](https://github.com/dlang/dmd/blob/master/src/dmd/inlinecost.d) | Compute the cost of inlining a function call. |
113| [expressionsem.d](https://github.com/dlang/dmd/blob/master/src/dmd/expressionsem.d) | Do semantic analysis for expressions |
114| [statementsem.d](https://github.com/dlang/dmd/blob/master/src/dmd/statementsem.d) | Do semantic analysis for statements |
115| [initsem.d](https://github.com/dlang/dmd/blob/master/src/dmd/initsem.d) | Do semantic analysis for initializers |
116| [templateparamsem.d](https://github.com/dlang/dmd/blob/master/src/dmd/templateparamsem.d) | Do semantic analysis for template parameters |
117| [typesem.d](https://github.com/dlang/dmd/blob/master/src/dmd/typesem.d) | Do semantic analysis for types |
118
119**Semantic helpers**
120
121| File | Purpose |
122|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|
123| [opover.d](https://github.com/dlang/dmd/blob/master/src/dmd/opover.d) | Operator overloading |
124| [clone.d](https://github.com/dlang/dmd/blob/master/src/dmd/dsymbolsem.d) | Generate automatic `opEquals`, `opAssign` and constructors for structs |
125| [blockexit.d](https://github.com/dlang/dmd/blob/master/src/dmd/blockexit.d) | Find out in what ways control flow can exit a block |
126| [ctorflow.d](https://github.com/dlang/dmd/blob/master/src/dmd/ctorflow.d) | Control flow in constructors |
127| [constfold.d](https://github.com/dlang/dmd/blob/master/src/dmd/constfold.d) | Do constant folding of arithmetic expressions |
128| [optimize.d](https://github.com/dlang/dmd/blob/master/src/dmd/optimize.d) | Do constant folding more generally |
129| [dcast.d](https://github.com/dlang/dmd/blob/master/src/dmd/dcast.d) | Implicit or explicit cast(), finding common types e.g. in `x ? a : b`, integral promotions |
130| [impcnvtab.d](https://github.com/dlang/dmd/blob/master/src/dmd/impcnvtab.d) | Define an implicit conversion table for basic types |
131| [importc.d](https://github.com/dlang/dmd/blob/master/src/dmd/importc.d) | Helpers specific to ImportC |
132| [sideeffect.d](https://github.com/dlang/dmd/blob/master/src/dmd/sideeffect.d) | Extract side-effects of expressions for certain lowerings. |
133| [mustuse.d](https://github.com/dlang/dmd/blob/master/src/dmd/mustuse.d) | Helpers related to the `@mustuse` attribute |
134
135
136**Compile Time Function Execution (CTFE)**
137
138| File | Purpose |
139|-------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
140| [dinterpret.d](https://github.com/dlang/dmd/blob/master/src/dmd/dinterpret.d) | CTFE entry point |
141| [ctfeexpr.d](https://github.com/dlang/dmd/blob/master/src/dmd/ctfeexpr.d) | CTFE for expressions involving pointers, slices, array concatenation etc. |
142| [builtin.d](https://github.com/dlang/dmd/blob/master/src/dmd/builtin.d) | Allow CTFE of certain external functions (`core.math`, `std.math` and `core.bitop`) |
143
144### Specific language features
145
146**Attribute checks**
147
148| File | Purpose |
149|---------------------------------------------------------------------------|----------------------------------------|
150| [nogc.d](https://github.com/dlang/dmd/blob/master/src/dmd/nogc.d) | `@nogc` checks |
151| [safe.d](https://github.com/dlang/dmd/blob/master/src/dmd/safe.d) | `@safe` checks |
152| [canthrow.d](https://github.com/dlang/dmd/blob/master/src/dmd/canthrow.d) | `nothrow` checks |
153| [escape.d](https://github.com/dlang/dmd/blob/master/src/dmd/escape.d) | `scope` checks |
154| [access.d](https://github.com/dlang/dmd/blob/master/src/dmd/access.d) | `public` / `private` checks |
155| [ob.d](https://github.com/dlang/dmd/blob/master/src/dmd/ob.d) | Ownership / borrowing (`@live`) checks |
156
157**Inline Assembly**
158
159| File | Purpose |
160|-------------------------------------------------------------------------|-------------------------------------------|
161| [iasm.d](https://github.com/dlang/dmd/blob/master/src/dmd/iasm.d) | Inline assembly depending on the compiler |
162| [iasmdmd.d](https://github.com/dlang/dmd/blob/master/src/dmd/iasmdmd.d) | Inline assembly for DMD |
163| [iasmgcc.d](https://github.com/dlang/dmd/blob/master/src/dmd/iasmgcc.d) | Inline assembly for GDC |
164
165**Other**
166
167| File | Purpose |
168|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|
169| [aliasthis.d](https://github.com/dlang/dmd/blob/master/src/dmd/aliasthis.d) | Resolve implicit conversions for `alias X this` |
170| [traits.d](https://github.com/dlang/dmd/blob/master/src/dmd/traits.d) | `__traits()` |
171| [lambdacomp.d](https://github.com/dlang/dmd/blob/master/src/dmd/lambdacomp.d) | `__traits(isSame, x => y, z => w)` |
172| [cond.d](https://github.com/dlang/dmd/blob/master/src/dmd/cond.d) | Evaluate `static if`, `version` `debug ` |
173| [staticcond.d](https://github.com/dlang/dmd/blob/master/src/dmd/staticcond.d) | Lazily evaluate static conditions for `static if`, `static assert` and template constraints |
174| [delegatize.d](https://github.com/dlang/dmd/blob/master/src/dmd/delegatize.d) | Converts expression to delegates for `lazy` parameters |
175| [eh.d](https://github.com/dlang/dmd/blob/master/src/dmd/eh.d) | Generate tables for exception handling |
176| [nspace.d](https://github.com/dlang/dmd/blob/master/src/dmd/nspace.d) | Namespace for `extern (C++, Module)` |
177| [intrange.d](https://github.com/dlang/dmd/blob/master/src/dmd/intrange.d) | [Value range propagation](https://digitalmars.com/articles/b62.html) |
178| [dimport.d](https://github.com/dlang/dmd/blob/master/src/dmd/dimport.d) | Renamed imports (`import aliasSymbol = pkg1.pkg2.symbol`) |
179| [arrayop.d](https://github.com/dlang/dmd/blob/master/src/dmd/arrayop.d) | Array operations (`a[] = b[] + c[]`) |
180| [typinf.d](https://github.com/dlang/dmd/blob/master/src/dmd/typinf.d) | Generate typeinfo for `typeid()` (as well as internals) |
181
182| File | Purpose |
183|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------|
184| [chkformat.d](https://github.com/dlang/dmd/blob/master/src/dmd/chkformat.d) | Validate arguments with format specifiers for `printf` / `scanf` etc. |
185| [imphint.d](https://github.com/dlang/dmd/blob/master/src/dmd/imphint.d) | Give a suggestion to e.g. `import std.stdio` when `writeln` could not be resolved. |
186
187### Library files
188
189| File | Purpose |
190|-------------------------------------------------------------------------------|------------------------------------------------------|
191| [lib.d](https://github.com/dlang/dmd/blob/master/src/dmd/lib.d) | Abstract library class |
192| [libelf.d](https://github.com/dlang/dmd/blob/master/src/dmd/libelf.d) | Library in ELF format (Unix) |
193| [libmach.d](https://github.com/dlang/dmd/blob/master/src/dmd/libmach.d) | Library in Mach-O format (macOS) |
194| [libmscoff.d](https://github.com/dlang/dmd/blob/master/src/dmd/libmscoff.d) | Library in COFF format (32/64-bit Windows) |
195| [libomf.d](https://github.com/dlang/dmd/blob/master/src/dmd/libomf.d) | Library in OMF format (legacy 32-bit Windows) |
196| [scanelf.d](https://github.com/dlang/dmd/blob/master/src/dmd/scanelf.d) | Extract symbol names from a library in ELF format |
197| [scanmach.d](https://github.com/dlang/dmd/blob/master/src/dmd/scanmach.d) | Extract symbol names from a library in Mach-O format |
198| [scanmscoff.d](https://github.com/dlang/dmd/blob/master/src/dmd/scanmscoff.d) | Extract symbol names from a library in COFF format |
199| [scanomf.d](https://github.com/dlang/dmd/blob/master/src/dmd/scanomf.d) | Extract symbol names from a library in OMF format |
200
201### Code generation / back-end interfacing
202
203| File | Purpose |
204|---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
205| [dmsc.d](https://github.com/dlang/dmd/blob/master/src/dmd/dmsc.d) | Configures and initializes the back-end |
206| [toobj.d](https://github.com/dlang/dmd/blob/master/src/dmd/toobj.d) | Convert an AST that went through all semantic phases into an object file |
207| [toir.d](https://github.com/dlang/dmd/blob/master/src/dmd/toir.d) | Convert Dsymbols intermediate representation |
208| [e2ir.d](https://github.com/dlang/dmd/blob/master/src/dmd/e2ir.d) | Convert Expressions to intermediate representation |
209| [s2ir.d](https://github.com/dlang/dmd/blob/master/src/dmd/s2ir.d) | Convert Statements to intermediate representation |
210| [stmtstate.d](https://github.com/dlang/dmd/blob/master/src/dmd/stmtstate.d) | Used to help transform statement AST into flow graph |
211| [toctype.d](https://github.com/dlang/dmd/blob/master/src/dmd/toctype.d) | Convert a D type to a type the back-end understands |
212| [tocsym.d](https://github.com/dlang/dmd/blob/master/src/dmd/tocsym.d) | Convert a D symbol to a symbol the linker understands (with mangled name) |
213| [argtypes_x86.d](https://github.com/dlang/dmd/blob/master/src/dmd/argtypes_x86.d) | Convert a D type into simple (register) types for the 32-bit x86 ABI |
214| [argtypes_sysv_x64.d](https://github.com/dlang/dmd/blob/master/src/dmd/argtypes_sysv_x64.d) | 'argtypes' for the x86_64 System V ABI |
215| [argtypes_aarch64.d](https://github.com/dlang/dmd/blob/master/src/dmd/argtypes_aarch64.d) | 'argtypes' for the AArch64 ABI |
216| [glue.d](https://github.com/dlang/dmd/blob/master/src/dmd/glue.d) | Generate the object file for function declarations |
217| [gluelayer.d](https://github.com/dlang/dmd/blob/master/src/dmd/gluelayer.d) | Declarations for back-end functions that the front-end invokes |
218| [todt.d](https://github.com/dlang/dmd/blob/master/src/dmd/todt.d) | Convert initializers into structures that the back-end will add to the data segment |
219| [tocvdebug.d](https://github.com/dlang/dmd/blob/master/src/dmd/tovcdebug.d) | Generate debug info in the CV4 debug format. |
220| [objc.d](https://github.com/dlang/dmd/blob/master/src/dmd/objc.d) | Objective-C interfacing |
221| [objc_glue.d](https://github.com/dlang/dmd/blob/master/src/dmd/objc_glue.d) | Glue code for Objective-C interop. |
222
223**Name mangling**
224
225| File | Purpose |
226|-----------------------------------------------------------------------------------|------------------------------------------------------------------|
227| [cppmangle.d](https://github.com/dlang/dmd/blob/master/src/dmd/cppmangle.d) | C++ name mangling |
228| [cppmanglewin.d](https://github.com/dlang/dmd/blob/master/src/dmd/cppmanglewin.d) | C++ name mangling for Windows |
229| [dmangle.d](https://github.com/dlang/dmd/blob/master/src/dmd/dmangle.d) | D [name mangling](https://dlang.org/spec/abi.html#name_mangling) |
230
231### Linking
232
233| File | Purpose |
234|-------------------------------------------------------------------|-----------------------------------------|
235| [link.d](https://github.com/dlang/dmd/blob/master/src/dmd/link.d) | Invoke the linker as a separate process |
236
237### Special output
238
239| File | Purpose |
240|-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
241| [doc.d](https://github.com/dlang/dmd/blob/master/src/dmd/doc.d) | [Documentation generation](https://dlang.org/spec/ddoc.html) |
242| [dmacro.d](https://github.com/dlang/dmd/blob/master/src/dmd/dmacro.d) | DDoc macro processing |
243| [hdrgen.d](https://github.com/dlang/dmd/blob/master/src/dmd/hdrgen.d) | Convert an AST into D source code for `.di` header generation, as well as `-vcg-ast` and error messages |
244| [json.d](https://github.com/dlang/dmd/blob/master/src/dmd/json.d) | Describe the module in a `.json` file for the `-X` flag |
245| [dtoh.d](https://github.com/dlang/dmd/blob/master/src/dmd/dtoh.d) | C++ header generation from D source files |
246
247### Utility
248
249Note: many other utilities are in [dmd/root](https://github.com/dlang/dmd/tree/master/src/dmd/root).
250
251| File | Purpose |
252|-----------------------------------------------------------------------------------|---------------------------------------------------|
253| [console.d](https://github.com/dlang/dmd/blob/master/src/dmd/console.d) | Print error messages in color |
254| [file_manager.d](https://github.com/dlang/dmd/blob/master/src/dmd/file_manager.d) | Keep file contents in memory |
255| [utils.d](https://github.com/dlang/dmd/blob/master/src/dmd/utils.d) | Utility functions related to files and file paths |
256
257| File | Purpose |
258|---------------------------------------------------------------------------------|---------------------------------------------------------------|
259| [asttypename.d](https://github.com/dlang/dmd/blob/master/src/dmd/asttypename.d) | Print the internal name of an AST node (for debugging only) |
260| [printast.d](https://github.com/dlang/dmd/blob/master/src/dmd/printast.d) | Print the AST data structure |
261| [foreachvar.d](https://github.com/dlang/dmd/blob/master/src/dmd/foreachvar.d) | Used in `ob.d` to iterate over all variables in an expression |
262
readme.txt
1This is the source code to the DMD compiler
2for the D Programming Language defined in the documents at
3http://dlang.org/
4
5These sources are free, they are redistributable and modifiable
6under the terms of the Boost Software License, Version 1.0.
7The terms of this license are in the file boostlicense.txt,
8or see http://www.boost.org/LICENSE_1_0.txt.
9
10If a particular file has a different license in it, that overrides
11this license for that file.
12
13-Walter Bright
14