summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorNeil Schemenauer <nas-github@arctrix.com>2024-12-03 18:25:12 (GMT)
committerGitHub <noreply@github.com>2024-12-03 18:25:12 (GMT)
commit276cd66ccbbf85996a57bd1db3dd29b93a6eab64 (patch)
treea8f7f3676314b21b546c77e5928f28a5efff52e2 /Python/bytecodes.c
parent13b68e1a61e92a032d255aff5d5af435bbb63e8b (diff)
downloadcpython-276cd66ccbbf85996a57bd1db3dd29b93a6eab64.zip
cpython-276cd66ccbbf85996a57bd1db3dd29b93a6eab64.tar.gz
cpython-276cd66ccbbf85996a57bd1db3dd29b93a6eab64.tar.bz2
gh-115999: Add free-threaded specialization for `SEND` (gh-127426)
No additional thread safety changes are required. Note that sending to a generator that is shared between threads is currently not safe in the free-threaded build.
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index dd28aae..d6be3ce 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -1117,7 +1117,7 @@ dummy_func(
};
specializing op(_SPECIALIZE_SEND, (counter/1, receiver, unused -- receiver, unused)) {
- #if ENABLE_SPECIALIZATION
+ #if ENABLE_SPECIALIZATION_FT
if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
next_instr = this_instr;
_Py_Specialize_Send(receiver, next_instr);
@@ -1125,7 +1125,7 @@ dummy_func(
}
OPCODE_DEFERRED_INC(SEND);
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
- #endif /* ENABLE_SPECIALIZATION */
+ #endif /* ENABLE_SPECIALIZATION_FT */
}
op(_SEND, (receiver, v -- receiver, retval)) {