Skip to content

Commit 514dc9f

Browse files
committed
Close stackrefs
1 parent 900890b commit 514dc9f

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
@@ -5293,12 +5293,15 @@ dummy_func(
52935293
value = PyStackRef_FromPyObjectBorrow(ptr);
52945294
}
52955295

5296-
tier2 pure op(_POP_TWO, (unused, unused --)) {
5297-
// noop
5296+
tier2 pure op(_POP_TWO, (pop1, pop2 --)) {
5297+
PyStackRef_CLOSE(pop2);
5298+
PyStackRef_CLOSE(pop1);
52985299
}
52995300

5300-
tier2 pure op(_POP_THREE, (unused, unused, unused --)) {
5301-
// noop
5301+
tier2 pure op(_POP_THREE, (pop1, pop2, pop3 --)) {
5302+
PyStackRef_CLOSE(pop3);
5303+
PyStackRef_CLOSE(pop2);
5304+
PyStackRef_CLOSE(pop1);
53025305
}
53035306

53045307
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)