Skip to content

Update Lexicon to add reference link to SIL and ir/refutable pattern #62807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions docs/Lexicon.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Apple term for "the person assigned to watch CI this week".

## canonical SIL

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

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

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

Expand Down Expand Up @@ -284,6 +284,8 @@ perform structural modification, e.x.:
2. `case let x:`.
3. `case (_, _):`.

Contrast with [refutable pattern](#refutable-pattern)

## IR

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

## mandatory passes / mandatory optimizations

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

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

## raw SIL

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

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

Contrast with [irrefutable pattern](#irrefutable-pattern)

## resilient

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

## witness table

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

Expand Down