Skip to content

Commit 43f4987

Browse files
committed
mark more returns as unique
1 parent 925841c commit 43f4987

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

Modules/_testinternalcapi/test_cases.c.h

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

Python/bytecodes.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,11 @@ dummy_func(
10301030
if (res_o == NULL) {
10311031
ERROR_NO_POP();
10321032
}
1033+
// The JIT and tier 2 optimizer assume that float results from
1034+
// binary operations are always uniquely referenced (refcount == 1).
1035+
// If this assertion fails, update the optimizer to stop marking
1036+
// float results as unique in optimizer_bytecodes.c.
1037+
assert(!PyFloat_CheckExact(res_o) || Py_REFCNT(res_o) == 1);
10331038
res = PyStackRef_FromPyObjectSteal(res_o);
10341039
l = left;
10351040
r = right;

Python/executor_cases.c.h

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

Python/generated_cases.c.h

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

0 commit comments

Comments
 (0)