Commit 9cdd2fa
authored
The presence of this macro indicates that a particular instruction
may be considered for conversion to a register-based format
(see faster-cpython/ideas#485).
An invariant (currently unchecked) is that `DEOPT_IF()` may only
occur *before* `DECREF_INPUTS()`, and `ERROR_IF()` may only occur
*after* it. One reason not to check this is that there are a few
places where we insert *two* `DECREF_INPUTS()` calls, in different
branches of the code. The invariant checking would have to be able
to do some flow control analysis to understand this.
Note that many instructions, especially specialized ones,
can't be converted to use this macro straightforwardly.
This is because the generator currently only generates plain
`Py_DECREF(variable)` statements, and cannot generate
things like `_Py_DECREF_SPECIALIZED()` let alone deal with
`_PyList_AppendTakeRef()`.
1 parent 5a991da commit 9cdd2fa
2 files changed
+18
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
355 | | - | |
| 354 | + | |
356 | 355 | | |
357 | 356 | | |
358 | 357 | | |
| |||
438 | 437 | | |
439 | 438 | | |
440 | 439 | | |
441 | | - | |
442 | | - | |
| 440 | + | |
443 | 441 | | |
444 | 442 | | |
445 | 443 | | |
| |||
500 | 498 | | |
501 | 499 | | |
502 | 500 | | |
503 | | - | |
504 | | - | |
505 | | - | |
| 501 | + | |
506 | 502 | | |
507 | 503 | | |
508 | 504 | | |
| |||
538 | 534 | | |
539 | 535 | | |
540 | 536 | | |
541 | | - | |
542 | | - | |
| 537 | + | |
543 | 538 | | |
544 | 539 | | |
545 | 540 | | |
| |||
550 | 545 | | |
551 | 546 | | |
552 | 547 | | |
553 | | - | |
| 548 | + | |
554 | 549 | | |
555 | 550 | | |
556 | 551 | | |
557 | | - | |
| 552 | + | |
558 | 553 | | |
559 | 554 | | |
560 | 555 | | |
| |||
625 | 620 | | |
626 | 621 | | |
627 | 622 | | |
628 | | - | |
| 623 | + | |
629 | 624 | | |
630 | 625 | | |
631 | 626 | | |
632 | 627 | | |
633 | | - | |
| 628 | + | |
634 | 629 | | |
635 | 630 | | |
636 | 631 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
235 | 239 | | |
236 | 240 | | |
237 | 241 | | |
| |||
0 commit comments