Skip to content

Commit 0714013

Browse files
committed
Merge remote-tracking branch 'cpython/main' into test/executor-map-ref-cycles
2 parents 4fab860 + bab1398 commit 0714013

20 files changed

Lines changed: 546 additions & 253 deletions

.github/CODEOWNERS

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,16 @@ Objects/exceptions.c @iritkatriel
107107
# Hashing & cryptographic primitives
108108
**/*hashlib* @gpshead @tiran @picnixz
109109
**/*hashopenssl* @gpshead @tiran @picnixz
110-
**/*pyhash* @gpshead @tiran
111-
**/sha* @gpshead @tiran @picnixz
112-
Modules/md5* @gpshead @tiran @picnixz
113-
**/*blake* @gpshead @tiran @picnixz
114-
Modules/_hacl/** @gpshead
110+
**/*pyhash* @gpshead @tiran @picnixz
111+
Modules/*blake* @gpshead @tiran @picnixz
112+
Modules/*md5* @gpshead @tiran @picnixz
113+
Modules/*sha* @gpshead @tiran @picnixz
114+
Modules/_hacl/** @gpshead @picnixz
115115
**/*hmac* @gpshead @picnixz
116116

117+
# libssl
118+
**/*ssl* @gpshead @picnixz
119+
117120
# logging
118121
**/*logging* @vsajip
119122

.github/workflows/tail-call.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ jobs:
112112
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
113113
brew install llvm@${{ matrix.llvm }}
114114
export SDKROOT="$(xcrun --show-sdk-path)"
115-
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
116-
export PATH="/usr/local/opt/llvm/bin:$PATH"
115+
export PATH="/opt/homebrew/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
116+
export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
117117
CC=clang-19 ./configure --with-tail-call-interp
118118
make all --jobs 4
119119
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

Include/internal/pycore_opcode_metadata.h

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

Include/internal/pycore_uop_ids.h

Lines changed: 97 additions & 96 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: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/test/test_capi/test_opt.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,6 +1581,24 @@ def testfunc(n):
15811581
self.assertNotIn("_COMPARE_OP_INT", uops)
15821582
self.assertIn("_POP_TWO_LOAD_CONST_INLINE_BORROW", uops)
15831583

1584+
def test_remove_guard_for_known_type_str(self):
1585+
def f(n):
1586+
for i in range(n):
1587+
false = i == TIER2_THRESHOLD
1588+
empty = "X"[:false]
1589+
empty += "" # Make JIT realize this is a string.
1590+
if empty:
1591+
return 1
1592+
return 0
1593+
1594+
res, ex = self._run_with_optimizer(f, TIER2_THRESHOLD)
1595+
self.assertEqual(res, 0)
1596+
self.assertIsNotNone(ex)
1597+
uops = get_opnames(ex)
1598+
self.assertIn("_TO_BOOL_STR", uops)
1599+
self.assertNotIn("_GUARD_TOS_UNICODE", uops)
1600+
1601+
15841602
def global_identity(x):
15851603
return x
15861604

0 commit comments

Comments
 (0)