Skip to content

Commit d4131d8

Browse files
authored
[docs] Add "lvalue", "rvalue", and "thunk" to the Lexicon. (#6265)
...and tweak the "QoI" entry based on feedback.
1 parent 4a86714 commit d4131d8

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/Lexicon.rst

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ source code, tests, and commit messages. See also the `LLVM lexicon`_.
116116
LLVM IR
117117
See `IR`.
118118

119+
lvalue
120+
Pronounced "L-value". Refers to an expression that can be assigned to or
121+
passed ``inout``. The term originally comes from C; the "L" refers to the
122+
"l"eft side of an assignment operator. See also `rvalue`.
123+
119124
main module
120125
The module for the file or files currently being compiled.
121126

@@ -214,10 +219,11 @@ source code, tests, and commit messages. See also the `LLVM lexicon`_.
214219
behavior of the compiler--it is not just a general statement that the code
215220
needs to be improved.
216221

217-
It's suspected that this term was originally "quality of life", written as
222+
It's possible that this term was originally "quality of life", written as
218223
"Qol", referring to the experience of end users. At some point along its
219224
history, the lowercase "L" was misinterpreted as an uppercase "i", and a
220-
new meaning derived. Swift inherited this term from LLVM.
225+
new meaning derived. Swift inherited this term from LLVM, which got it from
226+
GCC.
221227

222228
Radar
223229
`Apple's bug-tracking system`__, or an issue reported on that system.
@@ -238,6 +244,12 @@ source code, tests, and commit messages. See also the `LLVM lexicon`_.
238244
compiled down to plain instructions. For example, Swift's runtime library
239245
includes support for dynamic casting and for the Mirror-based reflection.
240246

247+
rvalue
248+
Pronounced "R-value". Represents an expression that can be used as a value;
249+
in Swift this is nearly every expression, so we don't use the term very
250+
often. The term originally comes from C; the "R" refers to the "r"ight side
251+
of an assignment operator. Contrast with `lvalue`.
252+
241253
script mode
242254
The parsing mode that allows top-level imperative code in a source file.
243255

@@ -263,6 +275,13 @@ source code, tests, and commit messages. See also the `LLVM lexicon`_.
263275
known as "swiftCore"); sometimes it means everything in the stdlib/
264276
directory. Pronounced "stid-lib" or "ess-tee-dee-lib".
265277

278+
thunk
279+
In the Swift compiler, a synthesized function whose only purpose is to
280+
perform some kind of adjustment in order to call another function. For
281+
example, Objective-C and Swift have different calling conventions, so the
282+
Swift compiler generates a thunk for use in Objective-C that calls through
283+
to the real Swift implementation.
284+
266285
trap
267286
A deterministic runtime failure. Can be used as both as a noun ("Using an
268287
out-of-bounds index on an Array results in a trap") and a verb

0 commit comments

Comments
 (0)