Skip to content

Commit 3744da4

Browse files
committed
Close stackrefs
1 parent 5265651 commit 3744da4

File tree

3 files changed

+42
-8
lines changed

3 files changed

+42
-8
lines changed

Include/internal/pycore_uop_metadata.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/bytecodes.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5342,12 +5342,15 @@ dummy_func(
53425342
value = PyStackRef_FromPyObjectImmortal(ptr);
53435343
}
53445344

5345-
tier2 pure op(_POP_TWO, (unused, unused --)) {
5346-
// noop
5345+
tier2 pure op(_POP_TWO, (pop1, pop2 --)) {
5346+
PyStackRef_CLOSE(pop2);
5347+
PyStackRef_CLOSE(pop1);
53475348
}
53485349

5349-
tier2 pure op(_POP_THREE, (unused, unused, unused --)) {
5350-
// noop
5350+
tier2 pure op(_POP_THREE, (pop1, pop2, pop3 --)) {
5351+
PyStackRef_CLOSE(pop3);
5352+
PyStackRef_CLOSE(pop2);
5353+
PyStackRef_CLOSE(pop1);
53515354
}
53525355

53535356
tier2 pure op(_POP_CALL_ONE_LOAD_CONST_INLINE_BORROW, (ptr/4, callable, null, pop -- value)) {

Python/executor_cases.c.h

Lines changed: 33 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)