Skip to content

Commit 1c48c1f

Browse files
committed
Add links
1 parent 5ab9e4d commit 1c48c1f

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

docs/dotc-internals/overall-structure.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
# Dotc's Overall Structure
22

3-
The compiler code is found in package `dotty.tools`. It spans the
3+
The compiler code is found in package [dotty.tools](https://github.com/lampepfl/dotty/tree/master/src/dotty/tools). It spans the
44
following three sub-packages:
55

66
backend Compiler backends (currently for JVM and JS)
77
dotc The main compiler
88
io Helper modules for file access and classpath handling.
99

10-
The `dotc` package contains some main classes that can be run as separate
11-
programs. The most important one is class `Main`. `Main` inherits from `Driver` which
12-
contains the highest level functions for starting a compiler and processing some sources
13-
`Driver` in turn is based on two other high-level classes, `Compiler` and `Run`.
10+
The [dotc](https://github.com/lampepfl/dotty/tree/master/src/dotty/tools/dotc)
11+
package contains some main classes that can be run as separate
12+
programs. The most important one is class
13+
[Main](https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/Main.scala).
14+
`Main` inherits from
15+
[Driver](https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/Driver.scala) which
16+
contains the highest level functions for starting a compiler and processing some sources.
17+
`Driver` in turn is based on two other high-level classes,
18+
[Compiler](https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/Compiler.scala) and
19+
[Run](https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/Run.scala).
1420

1521
## Package Structure
1622

@@ -38,7 +44,9 @@ and their focus.
3844

3945
`dotc` has almost no global state (the only significant bit of global state is the name table,
4046
which is used to hash strings into unique names). Instead, all essential bits of information that
41-
can vary over a compiler run are collected in a [Context](https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/core/Context.scala). Most methods in `dotc` take a Context value as an implicit parameter.
47+
can vary over a compiler run are collected in a
48+
[Context](https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/core/Contexts.scala).
49+
Most methods in `dotc` take a Context value as an implicit parameter.
4250

4351
Contexts give a convenient way to customize values in some part of the
4452
call-graph. To run, e.g. some compiler function `f` at a given

0 commit comments

Comments
 (0)