1- :orphan:
2-
3- =================================
4- Swift Binary Serialization Format
5- =================================
1+ # Swift Binary Serialization Format
62
73The fundamental unit of distribution for Swift code is a * module.* A module
84contains 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
3329we'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
4035invented as a container format for LLVM IR. It is a binary format supporting
4136two 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
6055LLVM...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;
10195a simpler implementation would just use the latest version number supported:
102961.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
10699because 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
112104Every serialized module is represented as a single block called the "module
113105block". 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]
0 commit comments