Skip to content

Commit

Permalink
Assorted cleanup and pipeline fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lazorchakp committed Mar 26, 2024
1 parent 1a7cb94 commit 5eca7ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 0 additions & 3 deletions Lib/test/test_capi/test_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1218,9 +1218,6 @@ def testfunc(n):
_testinternalcapi.get_co_framesize(dummy15.__code__) +
_testinternalcapi.get_co_framesize(dummy_large.__code__)
)
self.assertIn(
("_CHECK_STACK_SPACE_OPERAND", largest_stack), uops_and_operands
)
else:
largest_stack = _testinternalcapi.get_co_framesize(dummy15.__code__)
self.assertIn(
Expand Down
2 changes: 1 addition & 1 deletion Modules/_testinternalcapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ iframe_getlasti(PyObject *self, PyObject *frame)
static PyObject *
get_co_framesize(PyObject *self, PyObject *arg) {
if (!PyCode_Check(arg)) {
PyErr_SetString(PyExc_TypeError, "argument must be a code object");
PyErr_SetString(PyExc_TypeError, "argument must be a code object");
return NULL;
}
PyCodeObject *code = (PyCodeObject *)arg;
Expand Down
4 changes: 4 additions & 0 deletions Python/optimizer_analysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,10 @@ combine_stack_space_checks(
int opcode = buffer[pc].opcode;
switch (opcode) {
case _CHECK_STACK_SPACE_OPERAND: {
#ifdef Py_DEBUG
assert(expecting_push == false);
assert(saw_check_stack_space == false);
#endif
if (first_check_stack == NULL) {
first_check_stack = &buffer[pc];
}
Expand All @@ -629,8 +631,10 @@ combine_stack_space_checks(
break;
}
case _POP_FRAME: {
#ifdef Py_DEBUG
assert(expecting_push == false);
assert(saw_check_stack_space == false);
#endif
depth--;
assert(depth >= 0);
curr_space -= space_at_depth[depth];
Expand Down

0 comments on commit 5eca7ca

Please sign in to comment.