File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,22 @@ struct _PyOpcache {
26
26
};
27
27
28
28
29
+ /* "Locals plus" for a code object is the set of locals + cell vars +
30
+ * free vars. This relates to variable names as well as offsets into
31
+ * the "fast locals" storage array of execution frames. The compiler
32
+ * builds the list of names, their offsets, and the corresponding
33
+ * kind of local.
34
+ *
35
+ * Those kinds represent the source of the initial value and the
36
+ * variable's scope (as related to closures). A "local" is an
37
+ * argument or other variable defined in the current scope. A "free"
38
+ * variable is one that is defined in an outer scope and comes from
39
+ * the function's closure. A "cell" variable is a local that escapes
40
+ * into an inner function as part of a closure, and thus must be
41
+ * wrapped in a cell. Any "local" can also be a "cell", but the
42
+ * "free" kind is mutually exclusive with both.
43
+ */
44
+
29
45
// We would use an enum if C let us specify the storage type.
30
46
typedef unsigned char _PyLocalsPlusKind ;
31
47
/* Note that these all fit within _PyLocalsPlusKind, as do combinations. */
You can’t perform that action at this time.
0 commit comments