summaryrefslogtreecommitdiffstats
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
authorNeil Schemenauer <nas-github@arctrix.com>2024-12-03 17:32:26 (GMT)
committerGitHub <noreply@github.com>2024-12-03 17:32:26 (GMT)
commit0cb52220790d8bc70ec325fd89d52b5f3b7ad29c (patch)
treefb6d278b8932ce83053c9285638f76428a86f3d0 /Python/generated_cases.c.h
parent8ba9f5bca9c0ce6130e1f4ba761a68f74f8457d0 (diff)
downloadcpython-0cb52220790d8bc70ec325fd89d52b5f3b7ad29c.zip
cpython-0cb52220790d8bc70ec325fd89d52b5f3b7ad29c.tar.gz
cpython-0cb52220790d8bc70ec325fd89d52b5f3b7ad29c.tar.bz2
gh-115999: Specialize `LOAD_SUPER_ATTR` in free-threaded builds (gh-127128)
Use existing helpers to atomically modify the bytecode. Add unit tests to ensure specializing is happening as expected. Add test_specialize.py that can be used with ThreadSanitizer to detect data races. Fix thread safety issue with cell_set_contents().
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index e1f9515..c31601f 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -6330,7 +6330,7 @@
global_super_st = stack_pointer[-3];
uint16_t counter = read_u16(&this_instr[1].cache);
(void)counter;
- #if ENABLE_SPECIALIZATION
+ #if ENABLE_SPECIALIZATION_FT
int load_method = oparg & 1;
if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
next_instr = this_instr;
@@ -6341,7 +6341,7 @@
}
OPCODE_DEFERRED_INC(LOAD_SUPER_ATTR);
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
- #endif /* ENABLE_SPECIALIZATION */
+ #endif /* ENABLE_SPECIALIZATION_FT */
}
// _LOAD_SUPER_ATTR
{