gh-115999: Add free-threaded specialization for COMPARE_OP (#126410)

Add free-threaded specialization for COMPARE_OP, and tests for COMPARE_OP specialization in general.

Co-authored-by: Donghee Na <donghee.na92@gmail.com>
This commit is contained in:
T. Wouters 2025-01-07 06:41:01 -08:00 committed by GitHub
parent a734c1e304
commit 8f93dd8a8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 42 additions and 12 deletions

View file

@ -2464,7 +2464,7 @@ dummy_func(
};
specializing op(_SPECIALIZE_COMPARE_OP, (counter/1, left, right -- left, right)) {
#if ENABLE_SPECIALIZATION
#if ENABLE_SPECIALIZATION_FT
if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
next_instr = this_instr;
_Py_Specialize_CompareOp(left, right, next_instr, oparg);