Skip to content

Commit f2c8a70

Browse files
authored
Update Lexicon to add reference link to SIL and ir/refutable pattern (#62807)
* Update lexicon.md * fix typo
1 parent bbe27f9 commit f2c8a70

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

docs/Lexicon.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Apple term for "the person assigned to watch CI this week".
100100

101101
## canonical SIL
102102

103-
SIL after the
103+
[SIL](#sil) after the
104104
[mandatory passes](#mandatory-passes--mandatory-optimizations) have run.
105105
This can be used as input to IRGen to generate LLVM IR or object files.
106106

@@ -179,7 +179,7 @@ The other half is provided by corresponding
179179
## DI (definite initialization / definitive initialization)
180180

181181
The feature that no uninitialized variables, constants, or properties will
182-
be read by a program, or the analysis pass that operates on SIL to
182+
be read by a program, or the analysis pass that operates on [SIL](#sil) to
183183
guarantee this. This was
184184
[discussed on Apple's Swift blog](https://developer.apple.com/swift/blog/?id=28).
185185

@@ -284,6 +284,8 @@ perform structural modification, e.x.:
284284
2. `case let x:`.
285285
3. `case (_, _):`.
286286

287+
Contrast with [refutable pattern](#refutable-pattern)
288+
287289
## IR
288290

289291
1. "intermediate representation": a generic term for a format representing
@@ -327,7 +329,7 @@ The module for the file or files currently being compiled.
327329

328330
## mandatory passes / mandatory optimizations
329331

330-
Transformations over SIL that run immediately after SIL generation. Once
332+
Transformations over [SIL](#sil) that run immediately after SIL generation. Once
331333
all mandatory passes have run (and if no errors are found), the SIL is
332334
considered [canonical](#canonical-SIL).
333335

@@ -359,7 +361,7 @@ Has *many* uses in the Swift world. We may want to rename some of them.
359361
2. A compilation unit; that is, source files that are compiled together.
360362
These files may contain cross-references. Represented as "the main
361363
module" (a specific ModuleDecl).
362-
3. (as "SIL module") A container for SIL to be compiled together, along
364+
3. (as "[SIL](#sil) module") A container for SIL to be compiled together, along
363365
with various context for the compilation.
364366
4. (as "LLVM module") A collection of LLVM IR to be compiled together.
365367
Always created in an LLVMContext.
@@ -491,7 +493,7 @@ on that system.
491493

492494
## raw SIL
493495

494-
SIL just after being generated, not yet in a form that can be used for
496+
[SIL](#sil) just after being generated, not yet in a form that can be used for
495497
IR generation.
496498
See [mandatory passes](#mandatory-passes--mandatory-optimizations).
497499

@@ -540,6 +542,8 @@ A pattern that may not always match. These include patterns such as:
540542
2. Enum case check: e.g. `case .none:`.
541543
3. Expr pattern: e.g. `case foo():`.
542544

545+
Contrast with [irrefutable pattern](#irrefutable-pattern)
546+
543547
## resilient
544548

545549
Describes a type or function where making certain changes will not break
@@ -656,7 +660,7 @@ The value or type that satisfies a protocol requirement.
656660

657661
## witness table
658662

659-
The SIL (and runtime) representation of a [conformance](#conformance); essentially a
663+
The [SIL](#sil) (and runtime) representation of a [conformance](#conformance); essentially a
660664
[vtable](#vtable-virtual-dispatch-table) but for a protocol instead of
661665
a class.
662666

0 commit comments

Comments
 (0)