Skip to content

Commit 806c28a

Browse files
committed
Attempt to use tagged RC for a bit of extra speed
1 parent 4768a38 commit 806c28a

13 files changed

+350
-113
lines changed

Include/internal/pycore_opcode_metadata.h

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

Include/internal/pycore_stackref.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,12 @@ PyStackRef_FromPyObjectImmortal(PyObject *obj)
347347
return (_PyStackRef){ .bits = (uintptr_t)obj | Py_TAG_IMMORTAL};
348348
}
349349

350+
static inline _PyStackRef
351+
PyStackRef_WithCount(_PyStackRef ref)
352+
{
353+
return (_PyStackRef){ .bits = ref.bits | Py_TAG_REFCNT };
354+
}
355+
350356
static inline _PyStackRef
351357
PyStackRef_DUP(_PyStackRef ref)
352358
{

Include/internal/pycore_uop_ids.h

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

Include/internal/pycore_uop_metadata.h

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

Include/opcode_ids.h

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

0 commit comments

Comments
 (0)