Skip to content

Commit 219976c

Browse files
generatedunixname1734921407115435meta-codesync[bot]
authored andcommitted
Import upstream Github python/cpython ref 'main'
Summary: Imported python/cpython `3.15.0a5+` from upstream rev [`29f1e77`](https://www.github.com/python/cpython/commit/29f1e778faaa31479e4ef84e2fb37a7a53984550) (committed 2026-01-24 02:34:41+00:00). # Commit Info Base: (`3.15.0a5+`) - [`f8262b8`](https://www.github.com/python/cpython/commit/f8262b84f5b76e45cfea9d73b09657919926850f) (commit date: 2026-01-22 22:00:37+00:00) Imported: (`3.15.0a5+`) - [`29f1e77`](https://www.github.com/python/cpython/commit/29f1e778faaa31479e4ef84e2fb37a7a53984550) (commit date: 2026-01-24 02:34:41+00:00) # Files added ``` Misc/NEWS.d/next/Core_and_Builtins/2026-01-19-01-26-12.gh-issue-144005.Z3O33m.rst Misc/NEWS.d/next/Security/2026-01-21-12-34-05.gh-issue-144125.TAz5uo.rst ``` Differential Revision: D91388517 fbshipit-source-id: b342ae94fec40b25b6c879407488e17a8a4638a2
1 parent 335b49d commit 219976c

2 files changed

Lines changed: 24 additions & 14 deletions

File tree

cinderx/Interpreter/3.15/Includes/Python/ceval_macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ do { \
433433
JUMP_TO_LABEL(error); \
434434
} \
435435
if (keep_tracing_bit) { \
436-
assert(((_PyThreadStateImpl *)tstate)->jit_tracer_state->prev_state.code_curr_size == 2); \
436+
assert(uop_buffer_length(&((_PyThreadStateImpl *)tstate)->jit_tracer_state->code_buffer)); \
437437
ENTER_TRACING(); \
438438
DISPATCH_NON_TRACING(); \
439439
} \

cinderx/Interpreter/3.15/Includes/generated_cases.c.h

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,9 @@
318318
_PyStackRef left;
319319
_PyStackRef right;
320320
_PyStackRef res;
321+
_PyStackRef l;
322+
_PyStackRef r;
323+
_PyStackRef value;
321324
/* Skip 1 cache entry */
322325
// _GUARD_BINARY_OP_EXTEND
323326
{
@@ -349,25 +352,32 @@
349352
STAT_INC(BINARY_OP, hit);
350353
_PyFrame_SetStackPointer(frame, stack_pointer);
351354
PyObject *res_o = d->action(left_o, right_o);
352-
_PyStackRef tmp = right;
353-
right = PyStackRef_NULL;
354-
stack_pointer[-1] = right;
355-
PyStackRef_CLOSE(tmp);
356-
tmp = left;
357-
left = PyStackRef_NULL;
358-
stack_pointer[-2] = left;
359-
PyStackRef_CLOSE(tmp);
360355
stack_pointer = _PyFrame_GetStackPointer(frame);
361-
stack_pointer += -2;
362-
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
363356
if (res_o == NULL) {
364357
JUMP_TO_LABEL(error);
365358
}
366359
res = PyStackRef_FromPyObjectSteal(res_o);
360+
l = left;
361+
r = right;
362+
}
363+
// _POP_TOP
364+
{
365+
value = r;
366+
stack_pointer[-2] = res;
367+
stack_pointer[-1] = l;
368+
_PyFrame_SetStackPointer(frame, stack_pointer);
369+
PyStackRef_XCLOSE(value);
370+
stack_pointer = _PyFrame_GetStackPointer(frame);
371+
}
372+
// _POP_TOP
373+
{
374+
value = l;
375+
stack_pointer += -1;
376+
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
377+
_PyFrame_SetStackPointer(frame, stack_pointer);
378+
PyStackRef_XCLOSE(value);
379+
stack_pointer = _PyFrame_GetStackPointer(frame);
367380
}
368-
stack_pointer[0] = res;
369-
stack_pointer += 1;
370-
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
371381
DISPATCH();
372382
}
373383

0 commit comments

Comments
 (0)