Skip to content

Commit fe23f8e

Browse files
authored
GH-122821: Simplify compilation of while statements to ensure consistency of offsets for sys.monitoring (GH-122934)
1 parent 0e207f3 commit fe23f8e

File tree

6 files changed

+122
-87
lines changed

6 files changed

+122
-87
lines changed

Include/internal/pycore_magic_number.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ Known values:
255255
Python 3.14a1 3601 (Fix miscompilation of private names in generic classes)
256256
Python 3.14a1 3602 (Add LOAD_SPECIAL. Remove BEFORE_WITH and BEFORE_ASYNC_WITH)
257257
Python 3.14a1 3603 (Remove BUILD_CONST_KEY_MAP)
258+
Python 3.14a1 3604 (Do not duplicate test at end of while statements)
258259
259260
Python 3.15 will start with 3650
260261
@@ -267,7 +268,7 @@ PC/launcher.c must also be updated.
267268
268269
*/
269270

270-
#define PYC_MAGIC_NUMBER 3603
271+
#define PYC_MAGIC_NUMBER 3604
271272
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
272273
(little-endian) and then appending b'\r\n'. */
273274
#define PYC_MAGIC_NUMBER_TOKEN \

Lib/test/test_capi/test_opt.py

+1
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ def many_vars():
274274
z0 = z1 = z2 = z3 = z4 = z5 = z6 = z7 = z8 = z9 = 42
275275
while z9 > 0:
276276
z9 = z9 - 1
277+
+z9
277278
"""), ns, ns)
278279
many_vars = ns["many_vars"]
279280

0 commit comments

Comments
 (0)