Commit de64e75
authored
his involves moving tp_dict, tp_bases, and tp_mro to PyInterpreterState, in the same way we did for tp_subclasses. Those three fields are effectively const for builtin static types (unlike tp_subclasses). In theory we only need to make their values immortal, along with their contents. However, that isn't such a simple proposition. (See gh-103823.) In the meantime the simplest solution is to move the fields into the interpreter.
One alternative is to statically allocate the values, but that's its own can of worms.
1 parent 872cbc6 commit de64e75
File tree
5 files changed
+185
-86
lines changed- Include/internal
- Modules
- Objects
5 files changed
+185
-86
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2174 | 2174 | | |
2175 | 2175 | | |
2176 | 2176 | | |
2177 | | - | |
2178 | | - | |
2179 | | - | |
2180 | | - | |
2181 | | - | |
2182 | | - | |
2183 | | - | |
2184 | | - | |
2185 | | - | |
2186 | | - | |
2187 | | - | |
2188 | | - | |
2189 | | - | |
2190 | | - | |
2191 | | - | |
2192 | | - | |
2193 | | - | |
2194 | 2177 | | |
2195 | 2178 | | |
2196 | 2179 | | |
2197 | 2180 | | |
2198 | 2181 | | |
2199 | 2182 | | |
2200 | 2183 | | |
2201 | | - | |
2202 | | - | |
2203 | | - | |
2204 | | - | |
2205 | | - | |
2206 | | - | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
2212 | 2187 | | |
2213 | 2188 | | |
2214 | 2189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
515 | 514 | | |
516 | 515 | | |
517 | 516 | | |
| |||
524 | 523 | | |
525 | 524 | | |
526 | 525 | | |
527 | | - | |
528 | 526 | | |
529 | 527 | | |
530 | 528 | | |
| |||
543 | 541 | | |
544 | 542 | | |
545 | 543 | | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | 544 | | |
551 | 545 | | |
552 | | - | |
| 546 | + | |
| 547 | + | |
553 | 548 | | |
554 | 549 | | |
555 | 550 | | |
| |||
0 commit comments