Skip to content

Commit 8b452ac

Browse files
authored
docs: convert Serialization.rst to Markdown (swiftlang#34279)
Converts one more doc file from `.rst` to Markdown for consistency.
1 parent 9249186 commit 8b452ac

File tree

3 files changed

+13
-25
lines changed

3 files changed

+13
-25
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ documentation, please create a thread on the Swift forums under the
120120
lazy type-checking and efficient caching.
121121
- [Literals.md](/docs/Literals.md):
122122
Describes type-checking and inference specifically for literals.
123-
- [Serialization.rst](/docs/Serialization.rst):
123+
- [Serialization.md](/docs/Serialization.md):
124124
Gives an overview of the LLVM bitcode format used for swiftmodules.
125125
- [StableBitcode.md](/docs/StableBitcode.md):
126126
Describes how to maintain compatibility when changing the serialization

docs/Serialization.rst renamed to docs/Serialization.md

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
:orphan:
2-
3-
=================================
4-
Swift Binary Serialization Format
5-
=================================
1+
# Swift Binary Serialization Format
62

73
The fundamental unit of distribution for Swift code is a *module.* A module
84
contains declarations as an interface for clients to write code against. It may
@@ -33,10 +29,9 @@ tied to the compiler internals to be useful for this purpose, and it is likely
3329
we'll invent a new format instead.
3430

3531

36-
Why LLVM bitcode?
37-
=================
32+
## Why LLVM bitcode?
3833

39-
The `LLVM bitstream <http://llvm.org/docs/BitCodeFormat.html>`_ format was
34+
The [LLVM bitstream](http://llvm.org/docs/BitCodeFormat.html) format was
4035
invented as a container format for LLVM IR. It is a binary format supporting
4136
two basic structures: *blocks,* which define regions of the file, and
4237
*records,* which contain data fields that can be up to 64 bits. It has a few
@@ -60,10 +55,9 @@ have most of these properties as well. But we're already linking against
6055
LLVM...might as well use it!
6156

6257

63-
Versioning
64-
==========
58+
## Versioning
6559

66-
.. warning::
60+
#### _Warning_
6761

6862
This section is relevant to any forward-compatible format used for a
6963
library's public interface. However, as mentioned above this may not be
@@ -101,13 +95,11 @@ requires extra work on the compiler's part to detect which features are in use;
10195
a simpler implementation would just use the latest version number supported:
10296
1.9.
10397

104-
*This versioning scheme was inspired by* `Semantic Versioning
105-
<http://semver.org>`_. *However, it is not compatible with Semantic Versioning
98+
*This versioning scheme was inspired by* [Semantic Versioning](http://semver.org). *However, it is not compatible with Semantic Versioning
10699
because it promises* forward-compatibility *rather than* backward-compatibility.
107100

108101

109-
A High-Level Tour of the Current Module Format
110-
==============================================
102+
## A High-Level Tour of the Current Module Format
111103

112104
Every serialized module is represented as a single block called the "module
113105
block". The module block is made up of several other block kinds, largely for
@@ -132,7 +124,7 @@ organizational purposes.
132124
- The **SIL block** contains SIL-level implementations that can be imported
133125
into a client's SILModule context. In most cases this is just a performance
134126
concern, but sometimes it affects language semantics as well, as in the case
135-
of ``@_transparent``. The SIL block precedes the AST block because it affects
127+
of `@_transparent`. The SIL block precedes the AST block because it affects
136128
which AST nodes get serialized.
137129

138130
- The **SIL index block** contains tables for accessing various SIL entities by
@@ -145,9 +137,7 @@ organizational purposes.
145137
Nodes are accessed by a file-unique "DeclIDs" (also covering DeclContexts)
146138
and "TypeIDs"; the two sets of IDs use separate numbering schemes.
147139

148-
.. note::
149-
150-
The AST block is currently referred to as the "decls block" in the source.
140+
_note_: The AST block is currently referred to as the "decls block" in the source.
151141

152142
- The **identifier block** contains a single blob of strings. This is intended
153143
for Identifiers---strings uniqued by the ASTContext---but can in theory
@@ -160,13 +150,11 @@ organizational purposes.
160150
top-level declarations.
161151

162152

163-
SIL
164-
===
153+
## SIL
165154

166155
[to be written]
167156

168157

169-
Cross-reference resilience
170-
==========================
158+
## Cross-reference resilience
171159

172160
[to be written]

include/swift/Basic/SupplementaryOutputPaths.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct SupplementaryOutputPaths {
3535
///
3636
/// This binary format is used to describe the interface of a module when
3737
/// imported by client source code. The swiftmodule format is described in
38-
/// docs/Serialization.rst.
38+
/// docs/Serialization.md.
3939
///
4040
/// \sa swift::serialize
4141
std::string ModuleOutputPath;

0 commit comments

Comments
 (0)