# DMD Source code
This is the source code to the DMD compiler
for the D Programming Language defined in the documents at
https://dlang.org/
These sources are free, they are redistributable and modifiable
under the terms of the Boost Software License, Version 1.0.
The terms of this license are in the file boostlicense.txt,
or see https://www.boost.org/LICENSE_1_0.txt.
If a particular file has a different license in it, that overrides
this license for that file.
-Walter Bright
## Directory structure
| Folder | Purpose |
|--------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [dmd/](https://github.com/dlang/dmd/tree/master/compiler/src/dmd) | The dmd driver and front-end |
| [dmd/backend/](https://github.com/dlang/dmd/tree/master/compiler/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/). |
| [dmd/common/](https://github.com/dlang/dmd/tree/master/compiler/src/dmd/common) | Code shared by the front-end and back-end |
| [dmd/root/](https://github.com/dlang/dmd/tree/master/compiler/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). |
DMD has a mostly flat directory structure, so this section aims to divide all source files into logical groups for easier navigation.
The groups are roughly ordered by how late they appear in the compilation process.
Note that these groups have no strict meaning, the category assignments are a bit subjective.
### Driver
| File | Purpose |
|-----------------------------------------------------------------------------|-----------------------------------------------------------------------|
| [mars.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/mars.d) | The entry point. Contains `main`. |
| [cli.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cli.d) | Define the command line interface |
| [dmdparams.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dmdparams.d) | DMD-specific parameters |
| [globals.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/globals.d) | Define a structure storing command line options |
| [dinifile.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dinifile.d) | Parse settings from .ini file (`sc.ini` / `dmd.conf`) |
| [vsoptions.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/vsoptions.d) | Detect the Microsoft Visual Studio toolchain for linking |
| [frontend.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/frontend.d) | An interface for using DMD as a library |
| [errors.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/errors.d) | Error reporting implementation |
| [errorsink.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/errorsink.d) | Error reporting interface |
| [target.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/target.d) | Manage target-specific parameters for cross-compiling (for LDC/GDC) |
| [compiler.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/compiler.d) | Describe a back-end compiler and implements compiler-specific actions |
### Lexing / parsing
| File | Purpose |
|-----------------------------------------------------------------------|----------------------------------------------------------------------|
| [lexer.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/lexer.d) | Convert source code into tokens for the D and ImportC parsers |
| [location.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/location.d)| Encapsulate file/line/column info for error messages, etc. |
| [entity.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/entity.d) | Define "\\&Entity;" escape sequence for strings / character literals |
| [tokens.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/tokens.d) | Define lexical tokens. |
| [parse.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/parse.d) | D parser, converting tokens into an Abstract Syntax Tree (AST) |
| [cparse.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cparse.d) | ImportC parser, converting tokens into an Abstract Syntax Tree (AST) |
### Semantic analysis
**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. |
| [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()` |
| [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`
没有合适的资源?快使用搜索试试~ 我知道了~
gcc-13.2.0.tar.gz
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 138 浏览量
2024-06-23
16:05:32
上传
评论
收藏 146.24MB GZ 举报
温馨提示
GCC(GNU Compiler Collection,GNU编译器套件)是由GNU开发的编程语言编译器。GNU编译器套件包括C、C++、 Objective-C、 Fortran、Java、Ada和Go语言前端,也包括了这些语言的库(如libstdc++,libgcj等。) GCC的初衷是为GNU操作系统专门编写的一款编译器。GNU系统是彻底的自由软件。此处,“自由”的含义是它尊重用户的自由 。 早期 GCC 的全拼为 GNU C Compiler,即 GUN 计划诞生的 C 语言编译器,显然最初 GCC 的定位确实只用于编译 C 语言。但经过这些年不断的迭代,GCC 的功能得到了很大的扩展,它不仅可以用来编译 C 语言程序,还可以处理 C++、Go、Objective -C 等多种编译语言编写的程序。与此同时,由于之前的 GNU C Compiler 已经无法完美诠释 GCC 的含义,所以其英文全称被重新定义为 GNU Compiler Collection,即 GNU 编译器套件。
资源推荐
资源详情
资源评论
收起资源包目录
gcc-13.2.0.tar.gz (2000个子文件)
bid_binarydecimal.c 6.1MB
decNumber.c 321KB
regex.c 253KB
cp-demangle.c 191KB
elf.c 187KB
dlmalloc.c 179KB
bid128_fma.c 171KB
decBasic.c 157KB
bid128.c 151KB
bid128_compare.c 131KB
bid128_to_int32.c 130KB
bid128_to_uint32.c 127KB
transfer.c 123KB
bid128_to_int64.c 106KB
dwarf.c 105KB
test-callback.c 102KB
bid128_add.c 101KB
bid64_compare.c 93KB
single.c 92KB
bid64_to_int32.c 88KB
fpioconst.c 86KB
matmul_c10.c 86KB
matmul_i16.c 86KB
matmul_c16.c 86KB
matmul_c17.c 86KB
matmul_c4.c 85KB
matmul_i1.c 85KB
matmul_c8.c 85KB
matmul_i2.c 85KB
matmul_i8.c 85KB
matmul_i4.c 85KB
matmul_r16.c 85KB
matmul_r17.c 85KB
matmul_r10.c 85KB
matmul_r8.c 85KB
matmul_r4.c 85KB
bid64_to_int64.c 84KB
bid64_to_uint64.c 80KB
list_read.c 78KB
deflate.c 77KB
decCommon.c 73KB
unzip.c 69KB
zip.c 64KB
write.c 54KB
libgcc2.c 54KB
inflate.c 54KB
test-call.c 52KB
sincos_table.c 51KB
simple-object-elf.c 49KB
bid128_div.c 48KB
strtod_l.c 48KB
unix.c 47KB
d-demangle.c 47KB
bid64_div.c 46KB
trees.c 43KB
lto-plugin.c 42KB
c99_functions.c 42KB
gzlog.c 41KB
xcoff.c 40KB
bid64_round_integral.c 40KB
simple-object-mach-o.c 40KB
inffas86.c 40KB
unwind-dw2.c 40KB
libgcov-util.c 39KB
ffi_darwin.c 39KB
bid_round.c 39KB
bid128_noncomp.c 38KB
bid128_minmax.c 38KB
sendmsg.c 37KB
puff.c 37KB
generic-morestack.c 37KB
fp-bit.c 36KB
macho.c 35KB
printf_fp.c 35KB
rust-demangle.c 35KB
bid_convert_data.c 34KB
init.c 34KB
matmulavx128_i16.c 34KB
matmulavx128_c16.c 34KB
matmulavx128_c10.c 34KB
matmulavx128_c17.c 34KB
matmulavx128_i2.c 34KB
matmulavx128_c4.c 34KB
matmulavx128_i8.c 34KB
matmulavx128_i4.c 34KB
matmulavx128_i1.c 34KB
matmulavx128_c8.c 34KB
matmulavx128_r17.c 34KB
matmulavx128_r10.c 34KB
matmulavx128_r16.c 34KB
matmulavx128_r4.c 34KB
matmulavx128_r8.c 34KB
format.c 33KB
unwind-dw2-fde.c 33KB
decimal64.c 32KB
j1q.c 32KB
lgammaq.c 31KB
j0q.c 31KB
bid128_2_str_tables.c 31KB
ffi_linux64.c 30KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
ssxueyi
- 粉丝: 505
- 资源: 345
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功