Skip to content

Commit 1254fe4

Browse files
authored
Merge pull request #1853 from raygit/documentation-changes
Minor change to have proper markdowns
2 parents 1197257 + 95b70ce commit 1254fe4

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/docs/internals/backend.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Backend Internals"
44
---
55

66
The code for the backend is split up by functionality and assembled in the
7-
objet `GenBCode`.
7+
object `GenBCode`.
88

99
```none
1010
object GenBCode --- [defines] --> PlainClassBuilder GenBCode also defines class BCodePhase, the compiler phase
@@ -61,29 +61,29 @@ ready for serialization to disk.
6161

6262
Currently the queue subsystem is all sequential, but as can be seen in
6363
http://magarciaepfl.github.io/scala/ the above design enables overlapping (a.1)
64-
building of ClassNodes, (a.2) intra-method optimizations, and (a.3)
64+
building of `ClassNodes`, (a.2) intra-method optimizations, and (a.3)
6565
serialization to disk.
6666

67-
This subsystem is described in detail in GenBCode.scala
67+
This subsystem is described in detail in `GenBCode.scala`
6868

6969
#### (b) Bytecode-level types, BType ####
7070
The previous bytecode emitter goes to great lengths to reason about
7171
bytecode-level types in terms of Symbols.
7272

73-
GenBCode uses BType as a more direct representation. A BType is immutable, and
73+
`GenBCode` uses `BType` as a more direct representation. A `BType` is immutable, and
7474
a value class (once the rest of GenBCode is merged from
7575
http://magarciaepfl.github.io/scala/ ).
7676

7777
Whether value class or not, its API is the same. That API doesn't reach into
78-
the type checker. Instead, each method on a BType answers a question that can
79-
be answered based on the BType itself. Sounds too simple to be good? It's a
78+
the type checker. Instead, each method on a `BType` answers a question that can
79+
be answered based on the `BType` itself. Sounds too simple to be good? It's a
8080
good building block, that's what it is.
8181

82-
The internal representation of a BType is based on what the JVM uses: internal
83-
names (eg Ljava/lang/String; ) and method descriptors; as defined in the JVM
84-
spec (that's why they aren't documented in GenBCode, just read the spec).
82+
The internal representation of a `BType` is based on what the JVM uses: internal
83+
names (e.g. `Ljava/lang/String;` ) and method descriptors; as defined in the JVM
84+
spec (that's why they aren't documented in `GenBCode`, just read the [JVM 8 spec](https://docs.oracle.com/javase/specs/jvms/se8/html/)).
8585

86-
All things BType can be found in BCodeGlue.scala
86+
All things `BType` can be found in `BCodeGlue.scala`
8787

8888
#### (c) Utilities offering a more "high-level" API to bytecode emission ####
8989
Bytecode can be emitted one opcode at a time, but there are recurring patterns
@@ -93,7 +93,7 @@ For example, when emitting a load-constant, a dedicated instruction exists for
9393
emitting load-zero. Similarly, emitting a switch can be done according to one
9494
of two strategies.
9595

96-
All these utilities are encapsulated in file BCodeIdiomatic.scala. They know
96+
All these utilities are encapsulated in file `BCodeIdiomatic.scala`. They know
9797
nothing about the type checker (because, just between us, they don't need to).
9898

9999
#### (d) Mapping between type-checker types and BTypes ####
@@ -109,10 +109,10 @@ To understand how it's built, see:
109109
final def exemplar(csym0: Symbol): Tracked = { ... }
110110
```
111111

112-
Details in BCodeTypes.scala
112+
Details in `BCodeTypes.scala`
113113

114114
#### (e) More "high-level" utilities for bytecode emission ####
115-
In the spirit of BCodeIdiomatic, utilities are added in BCodeHelpers for
115+
In the spirit of `BCodeIdiomatic`, utilities are added in `BCodeHelpers` for
116116
emitting:
117117

118118
- bean info class
@@ -122,4 +122,4 @@ emitting:
122122

123123

124124
#### (f) Building an ASM ClassNode given an AST TypeDef ####
125-
It's done by PlainClassBuilder
125+
It's done by `PlainClassBuilder`(see `GenBCode.scala`).

0 commit comments

Comments
 (0)