summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-07-12 16:12:39 (GMT)
committerGitHub <noreply@github.com>2023-07-12 16:12:39 (GMT)
commit7f55f58b6c97306da350f5b441d26f859e9d8f16 (patch)
tree47ab62907dff5a38c4a43f6ddf4432df1c0be268 /Python/executor_cases.c.h
parentb03755a2347325a89a48b08fc158419000513bcb (diff)
downloadcpython-7f55f58b6c97306da350f5b441d26f859e9d8f16.zip
cpython-7f55f58b6c97306da350f5b441d26f859e9d8f16.tar.gz
cpython-7f55f58b6c97306da350f5b441d26f859e9d8f16.tar.bz2
gh-106656: Remove --emit-line-directives from regen-cases (#106657)
If you prefer to see `#line` directives in generated_cases.c.h, run ``` make regen-cases CASESFLAG=-l ``` But please don't commit the result.
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h314
1 files changed, 0 insertions, 314 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 94536ed..1df8feb 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -9,11 +9,9 @@
case LOAD_FAST_CHECK: {
PyObject *value;
- #line 182 "Python/bytecodes.c"
value = GETLOCAL(oparg);
if (value == NULL) goto unbound_local_error;
Py_INCREF(value);
- #line 17 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = value;
break;
@@ -21,11 +19,9 @@
case LOAD_FAST: {
PyObject *value;
- #line 188 "Python/bytecodes.c"
value = GETLOCAL(oparg);
assert(value != NULL);
Py_INCREF(value);
- #line 29 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = value;
break;
@@ -33,11 +29,9 @@
case LOAD_FAST_AND_CLEAR: {
PyObject *value;
- #line 194 "Python/bytecodes.c"
value = GETLOCAL(oparg);
// do not use SETLOCAL here, it decrefs the old value
GETLOCAL(oparg) = NULL;
- #line 41 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = value;
break;
@@ -45,10 +39,8 @@
case LOAD_CONST: {
PyObject *value;
- #line 209 "Python/bytecodes.c"
value = GETITEM(FRAME_CO_CONSTS, oparg);
Py_INCREF(value);
- #line 52 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = value;
break;
@@ -56,17 +48,13 @@
case STORE_FAST: {
PyObject *value = stack_pointer[-1];
- #line 214 "Python/bytecodes.c"
SETLOCAL(oparg, value);
- #line 62 "Python/executor_cases.c.h"
STACK_SHRINK(1);
break;
}
case POP_TOP: {
PyObject *value = stack_pointer[-1];
- #line 237 "Python/bytecodes.c"
- #line 70 "Python/executor_cases.c.h"
Py_DECREF(value);
STACK_SHRINK(1);
break;
@@ -74,9 +62,7 @@
case PUSH_NULL: {
PyObject *res;
- #line 241 "Python/bytecodes.c"
res = NULL;
- #line 80 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = res;
break;
@@ -85,9 +71,7 @@
case END_SEND: {
PyObject *value = stack_pointer[-1];
PyObject *receiver = stack_pointer[-2];
- #line 260 "Python/bytecodes.c"
Py_DECREF(receiver);
- #line 91 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = value;
break;
@@ -96,13 +80,9 @@
case UNARY_NEGATIVE: {
PyObject *value = stack_pointer[-1];
PyObject *res;
- #line 275 "Python/bytecodes.c"
res = PyNumber_Negative(value);
- #line 102 "Python/executor_cases.c.h"
Py_DECREF(value);
- #line 277 "Python/bytecodes.c"
if (res == NULL) goto pop_1_error;
- #line 106 "Python/executor_cases.c.h"
stack_pointer[-1] = res;
break;
}
@@ -110,10 +90,8 @@
case UNARY_NOT: {
PyObject *value = stack_pointer[-1];
PyObject *res;
- #line 281 "Python/bytecodes.c"
assert(PyBool_Check(value));
res = Py_IsFalse(value) ? Py_True : Py_False;
- #line 117 "Python/executor_cases.c.h"
stack_pointer[-1] = res;
break;
}
@@ -122,7 +100,6 @@
static_assert(INLINE_CACHE_ENTRIES_TO_BOOL == 3, "incorrect cache size");
PyObject *value = stack_pointer[-1];
PyObject *res;
- #line 296 "Python/bytecodes.c"
#if ENABLE_SPECIALIZATION
_PyToBoolCache *cache = (_PyToBoolCache *)next_instr;
if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) {
@@ -134,29 +111,23 @@
DECREMENT_ADAPTIVE_COUNTER(cache->counter);
#endif /* ENABLE_SPECIALIZATION */
int err = PyObject_IsTrue(value);
- #line 138 "Python/executor_cases.c.h"
Py_DECREF(value);
- #line 308 "Python/bytecodes.c"
if (err < 0) goto pop_1_error;
res = err ? Py_True : Py_False;
- #line 143 "Python/executor_cases.c.h"
stack_pointer[-1] = res;
break;
}
case TO_BOOL_BOOL: {
PyObject *value = stack_pointer[-1];
- #line 313 "Python/bytecodes.c"
DEOPT_IF(!PyBool_Check(value), TO_BOOL);
STAT_INC(TO_BOOL, hit);
- #line 153 "Python/executor_cases.c.h"
break;
}
case TO_BOOL_INT: {
PyObject *value = stack_pointer[-1];
PyObject *res;
- #line 318 "Python/bytecodes.c"
DEOPT_IF(!PyLong_CheckExact(value), TO_BOOL);
STAT_INC(TO_BOOL, hit);
if (_PyLong_IsZero((PyLongObject *)value)) {
@@ -164,12 +135,9 @@
res = Py_False;
}
else {
- #line 168 "Python/executor_cases.c.h"
Py_DECREF(value);
- #line 326 "Python/bytecodes.c"
res = Py_True;
}
- #line 173 "Python/executor_cases.c.h"
stack_pointer[-1] = res;
break;
}
@@ -177,11 +145,9 @@
case TO_BOOL_LIST: {
PyObject *value = stack_pointer[-1];
PyObject *res;
- #line 331 "Python/bytecodes.c"
DEOPT_IF(!PyList_CheckExact(value), TO_BOOL);
STAT_INC(TO_BOOL, hit);
res = Py_SIZE(value) ? Py_True : Py_False;
- #line 185 "Python/executor_cases.c.h"
Py_DECREF(value);
stack_pointer[-1] = res;
break;
@@ -190,12 +156,10 @@
case TO_BOOL_NONE: {
PyObject *value = stack_pointer[-1];
PyObject *res;
- #line 338 "Python/bytecodes.c"
// This one is a bit weird, because we expect *some* failures:
DEOPT_IF(!Py_IsNone(value), TO_BOOL);
STAT_INC(TO_BOOL, hit);
res = Py_False;
- #line 199 "Python/executor_cases.c.h"
stack_pointer[-1] = res;
break;
}
@@ -203,7 +167,6 @@
case TO_BOOL_STR: {
PyObject *value = stack_pointer[-1];
PyObject *res;
- #line 345 "Python/bytecodes.c"
DEOPT_IF(!PyUnicode_CheckExact(value), TO_BOOL);
STAT_INC(TO_BOOL, hit);
if (value == &_Py_STR(empty)) {
@@ -212,12 +175,9 @@
}
else {
assert(Py_SIZE(value));
- #line 216 "Python/executor_cases.c.h"
Py_DECREF(value);
- #line 354 "Python/bytecodes.c"
res = Py_True;
}
- #line 221 "Python/executor_cases.c.h"
stack_pointer[-1] = res;
break;
}
@@ -226,16 +186,12 @@
PyObject *value = stack_pointer[-1];
PyObject *res;
uint32_t version = (uint32_t)operand;
- #line 359 "Python/bytecodes.c"
// This one is a bit weird, because we expect *some* failures:
assert(version);
DEOPT_IF(Py_TYPE(value)->tp_version_tag != version, TO_BOOL);
STAT_INC(TO_BOOL, hit);
- #line 235 "Python/executor_cases.c.h"
Py_DECREF(value);
- #line 364 "Python/bytecodes.c"
res = Py_True;
- #line 239 "Python/executor_cases.c.h"
stack_pointer[-1] = res;
break;
}
@@ -243,13 +199,9 @@
case UNARY_INVERT: {
PyObject *value = stack_pointer[-1];
PyObject *res;
- #line 368 "Python/bytecodes.c"
res = PyNumber_Invert(value);
- #line 249 "Python/executor_cases.c.h"
Py_DECREF(value);
- #line 370 "Python/bytecodes.c"
if (res == NULL) goto pop_1_error;
- #line 253 "Python/executor_cases.c.h"
stack_pointer[-1] = res;
break;
}
@@ -257,10 +209,8 @@
case _GUARD_BOTH_INT: {
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
- #line 386 "Python/bytecodes.c"
DEOPT_IF(!PyLong_CheckExact(left), BINARY_OP);
DEOPT_IF(!PyLong_CheckExact(right), BINARY_OP);
- #line 264 "Python/executor_cases.c.h"
break;
}
@@ -268,13 +218,11 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *res;
- #line 391 "Python/bytecodes.c"
STAT_INC(BINARY_OP, hit);
res = _PyLong_Multiply((PyLongObject *)left, (PyLongObject *)right);
_Py_DECREF_SPECIALIZED(right, (destructor)PyObject_Free);
_Py_DECREF_SPECIALIZED(left, (destructor)PyObject_Free);
if (res == NULL) goto pop_2_error;
- #line 278 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -284,13 +232,11 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *res;
- #line 399 "Python/bytecodes.c"
STAT_INC(BINARY_OP, hit);
res = _PyLong_Add((PyLongObject *)left, (PyLongObject *)right);
_Py_DECREF_SPECIALIZED(right, (destructor)PyObject_Free);
_Py_DECREF_SPECIALIZED(left, (destructor)PyObject_Free);
if (res == NULL) goto pop_2_error;
- #line 294 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -300,13 +246,11 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *res;
- #line 407 "Python/bytecodes.c"
STAT_INC(BINARY_OP, hit);
res = _PyLong_Subtract((PyLongObject *)left, (PyLongObject *)right);
_Py_DECREF_SPECIALIZED(right, (destructor)PyObject_Free);
_Py_DECREF_SPECIALIZED(left, (destructor)PyObject_Free);
if (res == NULL) goto pop_2_error;
- #line 310 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -315,10 +259,8 @@
case _GUARD_BOTH_FLOAT: {
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
- #line 422 "Python/bytecodes.c"
DEOPT_IF(!PyFloat_CheckExact(left), BINARY_OP);
DEOPT_IF(!PyFloat_CheckExact(right), BINARY_OP);
- #line 322 "Python/executor_cases.c.h"
break;
}
@@ -326,13 +268,11 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *res;
- #line 427 "Python/bytecodes.c"
STAT_INC(BINARY_OP, hit);
double dres =
((PyFloatObject *)left)->ob_fval *
((PyFloatObject *)right)->ob_fval;
DECREF_INPUTS_AND_REUSE_FLOAT(left, right, dres, res);
- #line 336 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -342,13 +282,11 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *res;
- #line 435 "Python/bytecodes.c"
STAT_INC(BINARY_OP, hit);
double dres =
((PyFloatObject *)left)->ob_fval +
((PyFloatObject *)right)->ob_fval;
DECREF_INPUTS_AND_REUSE_FLOAT(left, right, dres, res);
- #line 352 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -358,13 +296,11 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *res;
- #line 443 "Python/bytecodes.c"
STAT_INC(BINARY_OP, hit);
double dres =
((PyFloatObject *)left)->ob_fval -
((PyFloatObject *)right)->ob_fval;
DECREF_INPUTS_AND_REUSE_FLOAT(left, right, dres, res);
- #line 368 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -373,10 +309,8 @@
case _GUARD_BOTH_UNICODE: {
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
- #line 458 "Python/bytecodes.c"
DEOPT_IF(!PyUnicode_CheckExact(left), BINARY_OP);
DEOPT_IF(!PyUnicode_CheckExact(right), BINARY_OP);
- #line 380 "Python/executor_cases.c.h"
break;
}
@@ -384,13 +318,11 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *res;
- #line 463 "Python/bytecodes.c"
STAT_INC(BINARY_OP, hit);
res = PyUnicode_Concat(left, right);
_Py_DECREF_SPECIALIZED(left, _PyUnicode_ExactDealloc);
_Py_DECREF_SPECIALIZED(right, _PyUnicode_ExactDealloc);
if (res == NULL) goto pop_2_error;
- #line 394 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -401,7 +333,6 @@
PyObject *sub = stack_pointer[-1];
PyObject *container = stack_pointer[-2];
PyObject *res;
- #line 517 "Python/bytecodes.c"
#if ENABLE_SPECIALIZATION
_PyBinarySubscrCache *cache = (_PyBinarySubscrCache *)next_instr;
if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) {
@@ -413,12 +344,9 @@
DECREMENT_ADAPTIVE_COUNTER(cache->counter);
#endif /* ENABLE_SPECIALIZATION */
res = PyObject_GetItem(container, sub);
- #line 417 "Python/executor_cases.c.h"
Py_DECREF(container);
Py_DECREF(sub);
- #line 529 "Python/bytecodes.c"
if (res == NULL) goto pop_2_error;
- #line 422 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -429,7 +357,6 @@
PyObject *start = stack_pointer[-2];
PyObject *container = stack_pointer[-3];
PyObject *res;
- #line 533 "Python/bytecodes.c"
PyObject *slice = _PyBuildSlice_ConsumeRefs(start, stop);
// Can't use ERROR_IF() here, because we haven't
// DECREF'ed container yet, and we still own slice.
@@ -442,7 +369,6 @@
}
Py_DECREF(container);
if (res == NULL) goto pop_3_error;
- #line 446 "Python/executor_cases.c.h"
STACK_SHRINK(2);
stack_pointer[-1] = res;
break;
@@ -453,7 +379,6 @@
PyObject *start = stack_pointer[-2];
PyObject *container = stack_pointer[-3];
PyObject *v = stack_pointer[-4];
- #line 548 "Python/bytecodes.c"
PyObject *slice = _PyBuildSlice_ConsumeRefs(start, stop);
int err;
if (slice == NULL) {
@@ -466,7 +391,6 @@
Py_DECREF(v);
Py_DECREF(container);
if (err) goto pop_4_error;
- #line 470 "Python/executor_cases.c.h"
STACK_SHRINK(4);
break;
}
@@ -475,7 +399,6 @@
PyObject *sub = stack_pointer[-1];
PyObject *list = stack_pointer[-2];
PyObject *res;
- #line 563 "Python/bytecodes.c"
DEOPT_IF(!PyLong_CheckExact(sub), BINARY_SUBSCR);
DEOPT_IF(!PyList_CheckExact(list), BINARY_SUBSCR);
@@ -489,7 +412,6 @@
Py_INCREF(res);
_Py_DECREF_SPECIALIZED(sub, (destructor)PyObject_Free);
Py_DECREF(list);
- #line 493 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -499,7 +421,6 @@
PyObject *sub = stack_pointer[-1];
PyObject *tuple = stack_pointer[-2];
PyObject *res;
- #line 579 "Python/bytecodes.c"
DEOPT_IF(!PyLong_CheckExact(sub), BINARY_SUBSCR);
DEOPT_IF(!PyTuple_CheckExact(tuple), BINARY_SUBSCR);
@@ -513,7 +434,6 @@
Py_INCREF(res);
_Py_DECREF_SPECIALIZED(sub, (destructor)PyObject_Free);
Py_DECREF(tuple);
- #line 517 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -523,7 +443,6 @@
PyObject *sub = stack_pointer[-1];
PyObject *dict = stack_pointer[-2];
PyObject *res;
- #line 595 "Python/bytecodes.c"
DEOPT_IF(!PyDict_CheckExact(dict), BINARY_SUBSCR);
STAT_INC(BINARY_SUBSCR, hit);
res = PyDict_GetItemWithError(dict, sub);
@@ -531,14 +450,11 @@
if (!_PyErr_Occurred(tstate)) {
_PyErr_SetKeyError(sub);
}
- #line 535 "Python/executor_cases.c.h"
Py_DECREF(dict);
Py_DECREF(sub);
- #line 603 "Python/bytecodes.c"
if (true) goto pop_2_error;
}
Py_INCREF(res); // Do this before DECREF'ing dict, sub
- #line 542 "Python/executor_cases.c.h"
Py_DECREF(dict);
Py_DECREF(sub);
STACK_SHRINK(1);
@@ -549,9 +465,7 @@
case LIST_APPEND: {
PyObject *v = stack_pointer[-1];
PyObject *list = stack_pointer[-(2 + (oparg-1))];
- #line 635 "Python/bytecodes.c"
if (_PyList_AppendTakeRef((PyListObject *)list, v) < 0) goto pop_1_error;
- #line 555 "Python/executor_cases.c.h"
STACK_SHRINK(1);
break;
}
@@ -559,13 +473,9 @@
case SET_ADD: {
PyObject *v = stack_pointer[-1];
PyObject *set = stack_pointer[-(2 + (oparg-1))];
- #line 639 "Python/bytecodes.c"
int err = PySet_Add(set, v);
- #line 565 "Python/executor_cases.c.h"
Py_DECREF(v);
- #line 641 "Python/bytecodes.c"
if (err) goto pop_1_error;
- #line 569 "Python/executor_cases.c.h"
STACK_SHRINK(1);
break;
}
@@ -576,7 +486,6 @@
PyObject *container = stack_pointer[-2];
PyObject *v = stack_pointer[-3];
uint16_t counter = (uint16_t)operand;
- #line 651 "Python/bytecodes.c"
#if ENABLE_SPECIALIZATION
if (ADAPTIVE_COUNTER_IS_ZERO(counter)) {
next_instr--;
@@ -591,13 +500,10 @@
#endif /* ENABLE_SPECIALIZATION */
/* container[sub] = v */
int err = PyObject_SetItem(container, sub, v);
- #line 595 "Python/executor_cases.c.h"
Py_DECREF(v);
Py_DECREF(container);
Py_DECREF(sub);
- #line 666 "Python/bytecodes.c"
if (err) goto pop_3_error;
- #line 601 "Python/executor_cases.c.h"
STACK_SHRINK(3);
break;
}
@@ -606,7 +512,6 @@
PyObject *sub = stack_pointer[-1];
PyObject *list = stack_pointer[-2];
PyObject *value = stack_pointer[-3];
- #line 670 "Python/bytecodes.c"
DEOPT_IF(!PyLong_CheckExact(sub), STORE_SUBSCR);
DEOPT_IF(!PyList_CheckExact(list), STORE_SUBSCR);
@@ -623,7 +528,6 @@
Py_DECREF(old_value);
_Py_DECREF_SPECIALIZED(sub, (destructor)PyObject_Free);
Py_DECREF(list);
- #line 627 "Python/executor_cases.c.h"
STACK_SHRINK(3);
break;
}
@@ -632,13 +536,11 @@
PyObject *sub = stack_pointer[-1];
PyObject *dict = stack_pointer[-2];
PyObject *value = stack_pointer[-3];
- #line 689 "Python/bytecodes.c"
DEOPT_IF(!PyDict_CheckExact(dict), STORE_SUBSCR);
STAT_INC(STORE_SUBSCR, hit);
int err = _PyDict_SetItem_Take2((PyDictObject *)dict, sub, value);
Py_DECREF(dict);
if (err) goto pop_3_error;
- #line 642 "Python/executor_cases.c.h"
STACK_SHRINK(3);
break;
}
@@ -646,15 +548,11 @@
case DELETE_SUBSCR: {
PyObject *sub = stack_pointer[-1];
PyObject *container = stack_pointer[-2];
- #line 697 "Python/bytecodes.c"
/* del container[sub] */
int err = PyObject_DelItem(container, sub);
- #line 653 "Python/executor_cases.c.h"
Py_DECREF(container);
Py_DECREF(sub);
- #line 700 "Python/bytecodes.c"
if (err) goto pop_2_error;
- #line 658 "Python/executor_cases.c.h"
STACK_SHRINK(2);
break;
}
@@ -662,14 +560,10 @@
case CALL_INTRINSIC_1: {
PyObject *value = stack_pointer[-1];
PyObject *res;
- #line 704 "Python/bytecodes.c"
assert(oparg <= MAX_INTRINSIC_1);
res = _PyIntrinsics_UnaryFunctions[oparg](tstate, value);
- #line 669 "Python/executor_cases.c.h"
Py_DECREF(value);
- #line 707 "Python/bytecodes.c"
if (res == NULL) goto pop_1_error;
- #line 673 "Python/executor_cases.c.h"
stack_pointer[-1] = res;
break;
}
@@ -678,15 +572,11 @@
PyObject *value1 = stack_pointer[-1];
PyObject *value2 = stack_pointer[-2];
PyObject *res;
- #line 711 "Python/bytecodes.c"
assert(oparg <= MAX_INTRINSIC_2);
res = _PyIntrinsics_BinaryFunctions[oparg](tstate, value2, value1);
- #line 685 "Python/executor_cases.c.h"
Py_DECREF(value2);
Py_DECREF(value1);
- #line 714 "Python/bytecodes.c"
if (res == NULL) goto pop_2_error;
- #line 690 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -695,7 +585,6 @@
case GET_AITER: {
PyObject *obj = stack_pointer[-1];
PyObject *iter;
- #line 819 "Python/bytecodes.c"
unaryfunc getter = NULL;
PyTypeObject *type = Py_TYPE(obj);
@@ -708,16 +597,12 @@
"'async for' requires an object with "
"__aiter__ method, got %.100s",
type->tp_name);
- #line 712 "Python/executor_cases.c.h"
Py_DECREF(obj);
- #line 832 "Python/bytecodes.c"
if (true) goto pop_1_error;
}
iter = (*getter)(obj);
- #line 719 "Python/executor_cases.c.h"
Py_DECREF(obj);
- #line 837 "Python/bytecodes.c"
if (iter == NULL) goto pop_1_error;
if (Py_TYPE(iter)->tp_as_async == NULL ||
@@ -730,7 +615,6 @@
Py_DECREF(iter);
if (true) goto pop_1_error;
}
- #line 734 "Python/executor_cases.c.h"
stack_pointer[-1] = iter;
break;
}
@@ -738,7 +622,6 @@
case GET_ANEXT: {
PyObject *aiter = stack_pointer[-1];
PyObject *awaitable;
- #line 852 "Python/bytecodes.c"
unaryfunc getter = NULL;
PyObject *next_iter = NULL;
PyTypeObject *type = Py_TYPE(aiter);
@@ -781,7 +664,6 @@
Py_DECREF(next_iter);
}
}
- #line 785 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = awaitable;
break;
@@ -790,16 +672,13 @@
case GET_AWAITABLE: {
PyObject *iterable = stack_pointer[-1];
PyObject *iter;
- #line 897 "Python/bytecodes.c"
iter = _PyCoro_GetAwaitableIter(iterable);
if (iter == NULL) {
format_awaitable_error(tstate, Py_TYPE(iterable), oparg);
}
- #line 801 "Python/executor_cases.c.h"
Py_DECREF(iterable);
- #line 904 "Python/bytecodes.c"
if (iter != NULL && PyCoro_CheckExact(iter)) {
PyObject *yf = _PyGen_yf((PyGenObject*)iter);
@@ -816,26 +695,21 @@
}
if (iter == NULL) goto pop_1_error;
- #line 820 "Python/executor_cases.c.h"
stack_pointer[-1] = iter;
break;
}
case POP_EXCEPT: {
PyObject *exc_value = stack_pointer[-1];
- #line 1034 "Python/bytecodes.c"
_PyErr_StackItem *exc_info = tstate->exc_info;
Py_XSETREF(exc_info->exc_value, exc_value);
- #line 830 "Python/executor_cases.c.h"
STACK_SHRINK(1);
break;
}
case LOAD_ASSERTION_ERROR: {
PyObject *value;
- #line 1085 "Python/bytecodes.c"
value = Py_NewRef(PyExc_AssertionError);
- #line 839 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = value;
break;
@@ -843,14 +717,12 @@
case LOAD_BUILD_CLASS: {
PyObject *bc;
- #line 1089 "Python/bytecodes.c"
if (PyMapping_GetOptionalItem(BUILTINS(), &_Py_ID(__build_class__), &bc) < 0) goto error;
if (bc == NULL) {
_PyErr_SetString(tstate, PyExc_NameError,
"__build_class__ not found");
if (true) goto error;
}
- #line 854 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = bc;
break;
@@ -858,33 +730,26 @@
case STORE_NAME: {
PyObject *v = stack_pointer[-1];
- #line 1099 "Python/bytecodes.c"
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
PyObject *ns = LOCALS();
int err;
if (ns == NULL) {
_PyErr_Format(tstate, PyExc_SystemError,
"no locals found when storing %R", name);
- #line 869 "Python/executor_cases.c.h"
Py_DECREF(v);
- #line 1106 "Python/bytecodes.c"
if (true) goto pop_1_error;
}
if (PyDict_CheckExact(ns))
err = PyDict_SetItem(ns, name, v);
else
err = PyObject_SetItem(ns, name, v);
- #line 878 "Python/executor_cases.c.h"
Py_DECREF(v);
- #line 1113 "Python/bytecodes.c"
if (err) goto pop_1_error;
- #line 882 "Python/executor_cases.c.h"
STACK_SHRINK(1);
break;
}
case DELETE_NAME: {
- #line 1117 "Python/bytecodes.c"
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
PyObject *ns = LOCALS();
int err;
@@ -901,14 +766,12 @@
name);
goto error;
}
- #line 905 "Python/executor_cases.c.h"
break;
}
case UNPACK_SEQUENCE: {
static_assert(INLINE_CACHE_ENTRIES_UNPACK_SEQUENCE == 1, "incorrect cache size");
PyObject *seq = stack_pointer[-1];
- #line 1143 "Python/bytecodes.c"
#if ENABLE_SPECIALIZATION
_PyUnpackSequenceCache *cache = (_PyUnpackSequenceCache *)next_instr;
if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) {
@@ -921,11 +784,8 @@
#endif /* ENABLE_SPECIALIZATION */
PyObject **top = stack_pointer + oparg - 1;
int res = unpack_iterable(tstate, seq, oparg, -1, top);
- #line 925 "Python/executor_cases.c.h"
Py_DECREF(seq);
- #line 1156 "Python/bytecodes.c"
if (res == 0) goto pop_1_error;
- #line 929 "Python/executor_cases.c.h"
STACK_SHRINK(1);
STACK_GROW(oparg);
break;
@@ -934,14 +794,12 @@
case UNPACK_SEQUENCE_TWO_TUPLE: {
PyObject *seq = stack_pointer[-1];
PyObject **values = stack_pointer - (1);
- #line 1160 "Python/bytecodes.c"
DEOPT_IF(!PyTuple_CheckExact(seq), UNPACK_SEQUENCE);
DEOPT_IF(PyTuple_GET_SIZE(seq) != 2, UNPACK_SEQUENCE);
assert(oparg == 2);
STAT_INC(UNPACK_SEQUENCE, hit);
values[0] = Py_NewRef(PyTuple_GET_ITEM(seq, 1));
values[1] = Py_NewRef(PyTuple_GET_ITEM(seq, 0));
- #line 945 "Python/executor_cases.c.h"
Py_DECREF(seq);
STACK_SHRINK(1);
STACK_GROW(oparg);
@@ -951,7 +809,6 @@
case UNPACK_SEQUENCE_TUPLE: {
PyObject *seq = stack_pointer[-1];
PyObject **values = stack_pointer - (1);
- #line 1170 "Python/bytecodes.c"
DEOPT_IF(!PyTuple_CheckExact(seq), UNPACK_SEQUENCE);
DEOPT_IF(PyTuple_GET_SIZE(seq) != oparg, UNPACK_SEQUENCE);
STAT_INC(UNPACK_SEQUENCE, hit);
@@ -959,7 +816,6 @@
for (int i = oparg; --i >= 0; ) {
*values++ = Py_NewRef(items[i]);
}
- #line 963 "Python/executor_cases.c.h"
Py_DECREF(seq);
STACK_SHRINK(1);
STACK_GROW(oparg);
@@ -969,7 +825,6 @@
case UNPACK_SEQUENCE_LIST: {
PyObject *seq = stack_pointer[-1];
PyObject **values = stack_pointer - (1);
- #line 1181 "Python/bytecodes.c"
DEOPT_IF(!PyList_CheckExact(seq), UNPACK_SEQUENCE);
DEOPT_IF(PyList_GET_SIZE(seq) != oparg, UNPACK_SEQUENCE);
STAT_INC(UNPACK_SEQUENCE, hit);
@@ -977,7 +832,6 @@
for (int i = oparg; --i >= 0; ) {
*values++ = Py_NewRef(items[i]);
}
- #line 981 "Python/executor_cases.c.h"
Py_DECREF(seq);
STACK_SHRINK(1);
STACK_GROW(oparg);
@@ -986,49 +840,36 @@
case UNPACK_EX: {
PyObject *seq = stack_pointer[-1];
- #line 1192 "Python/bytecodes.c"
int totalargs = 1 + (oparg & 0xFF) + (oparg >> 8);
PyObject **top = stack_pointer + totalargs - 1;
int res = unpack_iterable(tstate, seq, oparg & 0xFF, oparg >> 8, top);
- #line 994 "Python/executor_cases.c.h"
Py_DECREF(seq);
- #line 1196 "Python/bytecodes.c"
if (res == 0) goto pop_1_error;
- #line 998 "Python/executor_cases.c.h"
STACK_GROW((oparg & 0xFF) + (oparg >> 8));
break;
}
case DELETE_ATTR: {
PyObject *owner = stack_pointer[-1];
- #line 1227 "Python/bytecodes.c"
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
int err = PyObject_DelAttr(owner, name);
- #line 1008 "Python/executor_cases.c.h"
Py_DECREF(owner);
- #line 1230 "Python/bytecodes.c"
if (err) goto pop_1_error;
- #line 1012 "Python/executor_cases.c.h"
STACK_SHRINK(1);
break;
}
case STORE_GLOBAL: {
PyObject *v = stack_pointer[-1];
- #line 1234 "Python/bytecodes.c"
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
int err = PyDict_SetItem(GLOBALS(), name, v);
- #line 1022 "Python/executor_cases.c.h"
Py_DECREF(v);
- #line 1237 "Python/bytecodes.c"
if (err) goto pop_1_error;
- #line 1026 "Python/executor_cases.c.h"
STACK_SHRINK(1);
break;
}
case DELETE_GLOBAL: {
- #line 1241 "Python/bytecodes.c"
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
int err;
err = PyDict_DelItem(GLOBALS(), name);
@@ -1040,13 +881,11 @@
}
goto error;
}
- #line 1044 "Python/executor_cases.c.h"
break;
}
case _LOAD_LOCALS: {
PyObject *locals;
- #line 1255 "Python/bytecodes.c"
locals = LOCALS();
if (locals == NULL) {
_PyErr_SetString(tstate, PyExc_SystemError,
@@ -1054,7 +893,6 @@
if (true) goto error;
}
Py_INCREF(locals);
- #line 1058 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = locals;
break;
@@ -1063,7 +901,6 @@
case _LOAD_FROM_DICT_OR_GLOBALS: {
PyObject *mod_or_class_dict = stack_pointer[-1];
PyObject *v;
- #line 1267 "Python/bytecodes.c"
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
if (PyMapping_GetOptionalItem(mod_or_class_dict, name, &v) < 0) {
Py_DECREF(mod_or_class_dict);
@@ -1090,7 +927,6 @@
}
}
}
- #line 1094 "Python/executor_cases.c.h"
stack_pointer[-1] = v;
break;
}
@@ -1099,7 +935,6 @@
static_assert(INLINE_CACHE_ENTRIES_LOAD_GLOBAL == 4, "incorrect cache size");
PyObject *null = NULL;
PyObject *v;
- #line 1306 "Python/bytecodes.c"
#if ENABLE_SPECIALIZATION
_PyLoadGlobalCache *cache = (_PyLoadGlobalCache *)next_instr;
if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) {
@@ -1146,7 +981,6 @@
}
}
null = NULL;
- #line 1150 "Python/executor_cases.c.h"
STACK_GROW(1);
STACK_GROW(((oparg & 1) ? 1 : 0));
stack_pointer[-1] = v;
@@ -1160,37 +994,30 @@
case _GUARD_GLOBALS_VERSION: {
uint16_t version = (uint16_t)operand;
- #line 1358 "Python/bytecodes.c"
PyDictObject *dict = (PyDictObject *)GLOBALS();
DEOPT_IF(!PyDict_CheckExact(dict), LOAD_GLOBAL);
DEOPT_IF(dict->ma_keys->dk_version != version, LOAD_GLOBAL);
assert(DK_IS_UNICODE(dict->ma_keys));
- #line 1169 "Python/executor_cases.c.h"
break;
}
case _GUARD_BUILTINS_VERSION: {
uint16_t version = (uint16_t)operand;
- #line 1365 "Python/bytecodes.c"
PyDictObject *dict = (PyDictObject *)BUILTINS();
DEOPT_IF(!PyDict_CheckExact(dict), LOAD_GLOBAL);
DEOPT_IF(dict->ma_keys->dk_version != version, LOAD_GLOBAL);
assert(DK_IS_UNICODE(dict->ma_keys));
- #line 1180 "Python/executor_cases.c.h"
break;
}
case DELETE_FAST: {
- #line 1404 "Python/bytecodes.c"
PyObject *v = GETLOCAL(oparg);
if (v == NULL) goto unbound_local_error;
SETLOCAL(oparg, NULL);
- #line 1189 "Python/executor_cases.c.h"
break;
}
case DELETE_DEREF: {
- #line 1421 "Python/bytecodes.c"
PyObject *cell = GETLOCAL(oparg);
PyObject *oldobj = PyCell_GET(cell);
// Can't use ERROR_IF here.
@@ -1201,14 +1028,12 @@
}
PyCell_SET(cell, NULL);
Py_DECREF(oldobj);
- #line 1205 "Python/executor_cases.c.h"
break;
}
case LOAD_FROM_DICT_OR_DEREF: {
PyObject *class_dict = stack_pointer[-1];
PyObject *value;
- #line 1434 "Python/bytecodes.c"
PyObject *name;
assert(class_dict);
assert(oparg >= 0 && oparg < _PyFrame_GetCode(frame)->co_nlocalsplus);
@@ -1227,14 +1052,12 @@
}
Py_INCREF(value);
}
- #line 1231 "Python/executor_cases.c.h"
stack_pointer[-1] = value;
break;
}
case LOAD_DEREF: {
PyObject *value;
- #line 1455 "Python/bytecodes.c"
PyObject *cell = GETLOCAL(oparg);
value = PyCell_GET(cell);
if (value == NULL) {
@@ -1242,7 +1065,6 @@
if (true) goto error;
}
Py_INCREF(value);
- #line 1246 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = value;
break;
@@ -1250,18 +1072,15 @@
case STORE_DEREF: {
PyObject *v = stack_pointer[-1];
- #line 1465 "Python/bytecodes.c"
PyObject *cell = GETLOCAL(oparg);
PyObject *oldobj = PyCell_GET(cell);
PyCell_SET(cell, v);
Py_XDECREF(oldobj);
- #line 1259 "Python/executor_cases.c.h"
STACK_SHRINK(1);
break;
}
case COPY_FREE_VARS: {
- #line 1472 "Python/bytecodes.c"
/* Copy closure variables to free variables */
PyCodeObject *co = _PyFrame_GetCode(frame);
assert(PyFunction_Check(frame->f_funcobj));
@@ -1272,22 +1091,17 @@
PyObject *o = PyTuple_GET_ITEM(closure, i);
frame->localsplus[offset + i] = Py_NewRef(o);
}
- #line 1276 "Python/executor_cases.c.h"
break;
}
case BUILD_STRING: {
PyObject **pieces = (stack_pointer - oparg);
PyObject *str;
- #line 1485 "Python/bytecodes.c"
str = _PyUnicode_JoinArray(&_Py_STR(empty), pieces, oparg);
- #line 1285 "Python/executor_cases.c.h"
for (int _i = oparg; --_i >= 0;) {
Py_DECREF(pieces[_i]);
}
- #line 1487 "Python/bytecodes.c"
if (str == NULL) { STACK_SHRINK(oparg); goto error; }
- #line 1291 "Python/executor_cases.c.h"
STACK_SHRINK(oparg);
STACK_GROW(1);
stack_pointer[-1] = str;
@@ -1297,10 +1111,8 @@
case BUILD_TUPLE: {
PyObject **values = (stack_pointer - oparg);
PyObject *tup;
- #line 1491 "Python/bytecodes.c"
tup = _PyTuple_FromArraySteal(values, oparg);
if (tup == NULL) { STACK_SHRINK(oparg); goto error; }
- #line 1304 "Python/executor_cases.c.h"
STACK_SHRINK(oparg);
STACK_GROW(1);
stack_pointer[-1] = tup;
@@ -1310,10 +1122,8 @@
case BUILD_LIST: {
PyObject **values = (stack_pointer - oparg);
PyObject *list;
- #line 1496 "Python/bytecodes.c"
list = _PyList_FromArraySteal(values, oparg);
if (list == NULL) { STACK_SHRINK(oparg); goto error; }
- #line 1317 "Python/executor_cases.c.h"
STACK_SHRINK(oparg);
STACK_GROW(1);
stack_pointer[-1] = list;
@@ -1323,7 +1133,6 @@
case LIST_EXTEND: {
PyObject *iterable = stack_pointer[-1];
PyObject *list = stack_pointer[-(2 + (oparg-1))];
- #line 1501 "Python/bytecodes.c"
PyObject *none_val = _PyList_Extend((PyListObject *)list, iterable);
if (none_val == NULL) {
if (_PyErr_ExceptionMatches(tstate, PyExc_TypeError) &&
@@ -1334,13 +1143,10 @@
"Value after * must be an iterable, not %.200s",
Py_TYPE(iterable)->tp_name);
}
- #line 1338 "Python/executor_cases.c.h"
Py_DECREF(iterable);
- #line 1512 "Python/bytecodes.c"
if (true) goto pop_1_error;
}
assert(Py_IsNone(none_val));
- #line 1344 "Python/executor_cases.c.h"
Py_DECREF(iterable);
STACK_SHRINK(1);
break;
@@ -1349,13 +1155,9 @@
case SET_UPDATE: {
PyObject *iterable = stack_pointer[-1];
PyObject *set = stack_pointer[-(2 + (oparg-1))];
- #line 1519 "Python/bytecodes.c"
int err = _PySet_Update(set, iterable);
- #line 1355 "Python/executor_cases.c.h"
Py_DECREF(iterable);
- #line 1521 "Python/bytecodes.c"
if (err < 0) goto pop_1_error;
- #line 1359 "Python/executor_cases.c.h"
STACK_SHRINK(1);
break;
}
@@ -1363,7 +1165,6 @@
case BUILD_SET: {
PyObject **values = (stack_pointer - oparg);
PyObject *set;
- #line 1525 "Python/bytecodes.c"
set = PySet_New(NULL);
if (set == NULL)
goto error;
@@ -1378,7 +1179,6 @@
Py_DECREF(set);
if (true) { STACK_SHRINK(oparg); goto error; }
}
- #line 1382 "Python/executor_cases.c.h"
STACK_SHRINK(oparg);
STACK_GROW(1);
stack_pointer[-1] = set;
@@ -1388,7 +1188,6 @@
case BUILD_MAP: {
PyObject **values = (stack_pointer - oparg*2);
PyObject *map;
- #line 1542 "Python/bytecodes.c"
map = _PyDict_FromItems(
values, 2,
values+1, 2,
@@ -1396,13 +1195,10 @@
if (map == NULL)
goto error;
- #line 1400 "Python/executor_cases.c.h"
for (int _i = oparg*2; --_i >= 0;) {
Py_DECREF(values[_i]);
}
- #line 1550 "Python/bytecodes.c"
if (map == NULL) { STACK_SHRINK(oparg*2); goto error; }
- #line 1406 "Python/executor_cases.c.h"
STACK_SHRINK(oparg*2);
STACK_GROW(1);
stack_pointer[-1] = map;
@@ -1410,7 +1206,6 @@
}
case SETUP_ANNOTATIONS: {
- #line 1554 "Python/bytecodes.c"
int err;
PyObject *ann_dict;
if (LOCALS() == NULL) {
@@ -1448,7 +1243,6 @@
Py_DECREF(ann_dict);
}
}
- #line 1452 "Python/executor_cases.c.h"
break;
}
@@ -1456,7 +1250,6 @@
PyObject *keys = stack_pointer[-1];
PyObject **values = (stack_pointer - (1 + oparg));
PyObject *map;
- #line 1594 "Python/bytecodes.c"
if (!PyTuple_CheckExact(keys) ||
PyTuple_GET_SIZE(keys) != (Py_ssize_t)oparg) {
_PyErr_SetString(tstate, PyExc_SystemError,
@@ -1466,14 +1259,11 @@
map = _PyDict_FromItems(
&PyTuple_GET_ITEM(keys, 0), 1,
values, 1, oparg);
- #line 1470 "Python/executor_cases.c.h"
for (int _i = oparg; --_i >= 0;) {
Py_DECREF(values[_i]);
}
Py_DECREF(keys);
- #line 1604 "Python/bytecodes.c"
if (map == NULL) { STACK_SHRINK(oparg); goto pop_1_error; }
- #line 1477 "Python/executor_cases.c.h"
STACK_SHRINK(oparg);
stack_pointer[-1] = map;
break;
@@ -1481,7 +1271,6 @@
case DICT_UPDATE: {
PyObject *update = stack_pointer[-1];
- #line 1608 "Python/bytecodes.c"
PyObject *dict = PEEK(oparg + 1); // update is still on the stack
if (PyDict_Update(dict, update) < 0) {
if (_PyErr_ExceptionMatches(tstate, PyExc_AttributeError)) {
@@ -1489,12 +1278,9 @@
"'%.200s' object is not a mapping",
Py_TYPE(update)->tp_name);
}
- #line 1493 "Python/executor_cases.c.h"
Py_DECREF(update);
- #line 1616 "Python/bytecodes.c"
if (true) goto pop_1_error;
}
- #line 1498 "Python/executor_cases.c.h"
Py_DECREF(update);
STACK_SHRINK(1);
break;
@@ -1502,17 +1288,13 @@
case DICT_MERGE: {
PyObject *update = stack_pointer[-1];
- #line 1622 "Python/bytecodes.c"
PyObject *dict = PEEK(oparg + 1); // update is still on the stack
if (_PyDict_MergeEx(dict, update, 2) < 0) {
format_kwargs_error(tstate, PEEK(3 + oparg), update);
- #line 1511 "Python/executor_cases.c.h"
Py_DECREF(update);
- #line 1627 "Python/bytecodes.c"
if (true) goto pop_1_error;
}
- #line 1516 "Python/executor_cases.c.h"
Py_DECREF(update);
STACK_SHRINK(1);
break;
@@ -1521,13 +1303,11 @@
case MAP_ADD: {
PyObject *value = stack_pointer[-1];
PyObject *key = stack_pointer[-2];
- #line 1633 "Python/bytecodes.c"
PyObject *dict = PEEK(oparg + 2); // key, value are still on the stack
assert(PyDict_CheckExact(dict));
/* dict[key] = value */
// Do not DECREF INPUTS because the function steals the references
if (_PyDict_SetItem_Take2((PyDictObject *)dict, key, value) != 0) goto pop_2_error;
- #line 1531 "Python/executor_cases.c.h"
STACK_SHRINK(2);
break;
}
@@ -1538,20 +1318,16 @@
PyObject *global_super = stack_pointer[-3];
PyObject *res2 = NULL;
PyObject *res;
- #line 1716 "Python/bytecodes.c"
assert(!(oparg & 1));
DEOPT_IF(global_super != (PyObject *)&PySuper_Type, LOAD_SUPER_ATTR);
DEOPT_IF(!PyType_Check(class), LOAD_SUPER_ATTR);
STAT_INC(LOAD_SUPER_ATTR, hit);
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 2);
res = _PySuper_Lookup((PyTypeObject *)class, self, name, NULL);
- #line 1549 "Python/executor_cases.c.h"
Py_DECREF(global_super);
Py_DECREF(class);
Py_DECREF(self);
- #line 1723 "Python/bytecodes.c"
if (res == NULL) goto pop_3_error;
- #line 1555 "Python/executor_cases.c.h"
STACK_SHRINK(2);
STACK_GROW(((oparg & 1) ? 1 : 0));
stack_pointer[-1] = res;
@@ -1565,7 +1341,6 @@
PyObject *global_super = stack_pointer[-3];
PyObject *res2;
PyObject *res;
- #line 1727 "Python/bytecodes.c"
assert(oparg & 1);
DEOPT_IF(global_super != (PyObject *)&PySuper_Type, LOAD_SUPER_ATTR);
DEOPT_IF(!PyType_Check(class), LOAD_SUPER_ATTR);
@@ -1588,7 +1363,6 @@
res = res2;
res2 = NULL;
}
- #line 1592 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
stack_pointer[-2] = res2;
@@ -1600,7 +1374,6 @@
PyObject *owner = stack_pointer[-1];
PyObject *res2 = NULL;
PyObject *res;
- #line 1768 "Python/bytecodes.c"
#if ENABLE_SPECIALIZATION
_PyAttrCache *cache = (_PyAttrCache *)next_instr;
if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) {
@@ -1634,9 +1407,7 @@
NULL | meth | arg1 | ... | argN
*/
- #line 1638 "Python/executor_cases.c.h"
Py_DECREF(owner);
- #line 1802 "Python/bytecodes.c"
if (meth == NULL) goto pop_1_error;
res2 = NULL;
res = meth;
@@ -1645,12 +1416,9 @@
else {
/* Classic, pushes one value. */
res = PyObject_GetAttr(owner, name);
- #line 1649 "Python/executor_cases.c.h"
Py_DECREF(owner);
- #line 1811 "Python/bytecodes.c"
if (res == NULL) goto pop_1_error;
}
- #line 1654 "Python/executor_cases.c.h"
STACK_GROW(((oparg & 1) ? 1 : 0));
stack_pointer[-1] = res;
if (oparg & 1) { stack_pointer[-(1 + ((oparg & 1) ? 1 : 0))] = res2; }
@@ -1662,7 +1430,6 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *res;
- #line 2044 "Python/bytecodes.c"
#if ENABLE_SPECIALIZATION
_PyCompareOpCache *cache = (_PyCompareOpCache *)next_instr;
if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) {
@@ -1675,10 +1442,8 @@
#endif /* ENABLE_SPECIALIZATION */
assert((oparg >> 5) <= Py_GE);
res = PyObject_RichCompare(left, right, oparg >> 5);
- #line 1679 "Python/executor_cases.c.h"
Py_DECREF(left);
Py_DECREF(right);
- #line 2057 "Python/bytecodes.c"
if (res == NULL) goto pop_2_error;
if (oparg & 16) {
int res_bool = PyObject_IsTrue(res);
@@ -1686,7 +1451,6 @@
if (res_bool < 0) goto pop_2_error;
res = res_bool ? Py_True : Py_False;
}
- #line 1690 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -1696,7 +1460,6 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *res;
- #line 2067 "Python/bytecodes.c"
DEOPT_IF(!PyFloat_CheckExact(left), COMPARE_OP);
DEOPT_IF(!PyFloat_CheckExact(right), COMPARE_OP);
STAT_INC(COMPARE_OP, hit);
@@ -1708,7 +1471,6 @@
_Py_DECREF_SPECIALIZED(right, _PyFloat_ExactDealloc);
res = (sign_ish & oparg) ? Py_True : Py_False;
// It's always a bool, so we don't care about oparg & 16.
- #line 1712 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -1718,7 +1480,6 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *res;
- #line 2082 "Python/bytecodes.c"
DEOPT_IF(!PyLong_CheckExact(left), COMPARE_OP);
DEOPT_IF(!PyLong_CheckExact(right), COMPARE_OP);
DEOPT_IF(!_PyLong_IsCompact((PyLongObject *)left), COMPARE_OP);
@@ -1734,7 +1495,6 @@
_Py_DECREF_SPECIALIZED(right, (destructor)PyObject_Free);
res = (sign_ish & oparg) ? Py_True : Py_False;
// It's always a bool, so we don't care about oparg & 16.
- #line 1738 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -1744,7 +1504,6 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *res;
- #line 2101 "Python/bytecodes.c"
DEOPT_IF(!PyUnicode_CheckExact(left), COMPARE_OP);
DEOPT_IF(!PyUnicode_CheckExact(right), COMPARE_OP);
STAT_INC(COMPARE_OP, hit);
@@ -1757,7 +1516,6 @@
assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS);
res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? Py_True : Py_False;
// It's always a bool, so we don't care about oparg & 16.
- #line 1761 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -1767,14 +1525,10 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *b;
- #line 2116 "Python/bytecodes.c"
int res = Py_Is(left, right) ^ oparg;
- #line 1773 "Python/executor_cases.c.h"
Py_DECREF(left);
Py_DECREF(right);
- #line 2118 "Python/bytecodes.c"
b = res ? Py_True : Py_False;
- #line 1778 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = b;
break;
@@ -1784,15 +1538,11 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *b;
- #line 2122 "Python/bytecodes.c"
int res = PySequence_Contains(right, left);
- #line 1790 "Python/executor_cases.c.h"
Py_DECREF(left);
Py_DECREF(right);
- #line 2124 "Python/bytecodes.c"
if (res < 0) goto pop_2_error;
b = (res ^ oparg) ? Py_True : Py_False;
- #line 1796 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = b;
break;
@@ -1803,12 +1553,9 @@
PyObject *exc_value = stack_pointer[-2];
PyObject *rest;
PyObject *match;
- #line 2129 "Python/bytecodes.c"
if (check_except_star_type_valid(tstate, match_type) < 0) {
- #line 1809 "Python/executor_cases.c.h"
Py_DECREF(exc_value);
Py_DECREF(match_type);
- #line 2131 "Python/bytecodes.c"
if (true) goto pop_2_error;
}
@@ -1816,10 +1563,8 @@
rest = NULL;
int res = exception_group_match(exc_value, match_type,
&match, &rest);
- #line 1820 "Python/executor_cases.c.h"
Py_DECREF(exc_value);
Py_DECREF(match_type);
- #line 2139 "Python/bytecodes.c"
if (res < 0) goto pop_2_error;
assert((match == NULL) == (rest == NULL));
@@ -1828,7 +1573,6 @@
if (!Py_IsNone(match)) {
PyErr_SetHandledException(match);
}
- #line 1832 "Python/executor_cases.c.h"
stack_pointer[-1] = match;
stack_pointer[-2] = rest;
break;
@@ -1838,21 +1582,15 @@
PyObject *right = stack_pointer[-1];
PyObject *left = stack_pointer[-2];
PyObject *b;
- #line 2150 "Python/bytecodes.c"
assert(PyExceptionInstance_Check(left));
if (check_except_type_valid(tstate, right) < 0) {
- #line 1845 "Python/executor_cases.c.h"
Py_DECREF(right);
- #line 2153 "Python/bytecodes.c"
if (true) goto pop_1_error;
}
int res = PyErr_GivenExceptionMatches(left, right);
- #line 1852 "Python/executor_cases.c.h"
Py_DECREF(right);
- #line 2158 "Python/bytecodes.c"
b = res ? Py_True : Py_False;
- #line 1856 "Python/executor_cases.c.h"
stack_pointer[-1] = b;
break;
}
@@ -1860,17 +1598,13 @@
case IS_NONE: {
PyObject *value = stack_pointer[-1];
PyObject *b;
- #line 2237 "Python/bytecodes.c"
if (Py_IsNone(value)) {
b = Py_True;
}
else {
b = Py_False;
- #line 1870 "Python/executor_cases.c.h"
Py_DECREF(value);
- #line 2243 "Python/bytecodes.c"
}
- #line 1874 "Python/executor_cases.c.h"
stack_pointer[-1] = b;
break;
}
@@ -1878,13 +1612,11 @@
case GET_LEN: {
PyObject *obj = stack_pointer[-1];
PyObject *len_o;
- #line 2260 "Python/bytecodes.c"
// PUSH(len(TOS))
Py_ssize_t len_i = PyObject_Length(obj);
if (len_i < 0) goto error;
len_o = PyLong_FromSsize_t(len_i);
if (len_o == NULL) goto error;
- #line 1888 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = len_o;
break;
@@ -1895,16 +1627,13 @@
PyObject *type = stack_pointer[-2];
PyObject *subject = stack_pointer[-3];
PyObject *attrs;
- #line 2268 "Python/bytecodes.c"
// Pop TOS and TOS1. Set TOS to a tuple of attributes on success, or
// None on failure.
assert(PyTuple_CheckExact(names));
attrs = match_class(tstate, subject, type, oparg, names);
- #line 1904 "Python/executor_cases.c.h"
Py_DECREF(subject);
Py_DECREF(type);
Py_DECREF(names);
- #line 2273 "Python/bytecodes.c"
if (attrs) {
assert(PyTuple_CheckExact(attrs)); // Success!
}
@@ -1912,7 +1641,6 @@
if (_PyErr_Occurred(tstate)) goto pop_3_error;
attrs = Py_None; // Failure!
}
- #line 1916 "Python/executor_cases.c.h"
STACK_SHRINK(2);
stack_pointer[-1] = attrs;
break;
@@ -1921,10 +1649,8 @@
case MATCH_MAPPING: {
PyObject *subject = stack_pointer[-1];
PyObject *res;
- #line 2283 "Python/bytecodes.c"
int match = Py_TYPE(subject)->tp_flags & Py_TPFLAGS_MAPPING;
res = match ? Py_True : Py_False;
- #line 1928 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = res;
break;
@@ -1933,10 +1659,8 @@
case MATCH_SEQUENCE: {
PyObject *subject = stack_pointer[-1];
PyObject *res;
- #line 2288 "Python/bytecodes.c"
int match = Py_TYPE(subject)->tp_flags & Py_TPFLAGS_SEQUENCE;
res = match ? Py_True : Py_False;
- #line 1940 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = res;
break;
@@ -1946,11 +1670,9 @@
PyObject *keys = stack_pointer[-1];
PyObject *subject = stack_pointer[-2];
PyObject *values_or_none;
- #line 2293 "Python/bytecodes.c"
// On successful match, PUSH(values). Otherwise, PUSH(None).
values_or_none = match_keys(tstate, subject, keys);
if (values_or_none == NULL) goto error;
- #line 1954 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = values_or_none;
break;
@@ -1959,14 +1681,10 @@
case GET_ITER: {
PyObject *iterable = stack_pointer[-1];
PyObject *iter;
- #line 2299 "Python/bytecodes.c"
/* before: [obj]; after [getiter(obj)] */
iter = PyObject_GetIter(iterable);
- #line 1966 "Python/executor_cases.c.h"
Py_DECREF(iterable);
- #line 2302 "Python/bytecodes.c"
if (iter == NULL) goto pop_1_error;
- #line 1970 "Python/executor_cases.c.h"
stack_pointer[-1] = iter;
break;
}
@@ -1974,7 +1692,6 @@
case GET_YIELD_FROM_ITER: {
PyObject *iterable = stack_pointer[-1];
PyObject *iter;
- #line 2306 "Python/bytecodes.c"
/* before: [obj]; after [getiter(obj)] */
if (PyCoro_CheckExact(iterable)) {
/* `iterable` is a coroutine */
@@ -1997,11 +1714,8 @@
if (iter == NULL) {
goto error;
}
- #line 2001 "Python/executor_cases.c.h"
Py_DECREF(iterable);
- #line 2329 "Python/bytecodes.c"
}
- #line 2005 "Python/executor_cases.c.h"
stack_pointer[-1] = iter;
break;
}
@@ -2011,7 +1725,6 @@
PyObject *lasti = stack_pointer[-3];
PyObject *exit_func = stack_pointer[-4];
PyObject *res;
- #line 2561 "Python/bytecodes.c"
/* At the top of the stack are 4 values:
- val: TOP = exc_info()
- unused: SECOND = previous exception
@@ -2032,7 +1745,6 @@
res = PyObject_Vectorcall(exit_func, stack + 1,
3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
if (res == NULL) goto error;
- #line 2036 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = res;
break;
@@ -2041,7 +1753,6 @@
case PUSH_EXC_INFO: {
PyObject *new_exc = stack_pointer[-1];
PyObject *prev_exc;
- #line 2600 "Python/bytecodes.c"
_PyErr_StackItem *exc_info = tstate->exc_info;
if (exc_info->exc_value != NULL) {
prev_exc = exc_info->exc_value;
@@ -2051,7 +1762,6 @@
}
assert(PyExceptionInstance_Check(new_exc));
exc_info->exc_value = Py_NewRef(new_exc);
- #line 2055 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = new_exc;
stack_pointer[-2] = prev_exc;
@@ -2060,7 +1770,6 @@
case EXIT_INIT_CHECK: {
PyObject *should_be_none = stack_pointer[-1];
- #line 2999 "Python/bytecodes.c"
assert(STACK_LEVEL() == 2);
if (should_be_none != Py_None) {
PyErr_Format(PyExc_TypeError,
@@ -2068,7 +1777,6 @@
Py_TYPE(should_be_none)->tp_name);
goto error;
}
- #line 2072 "Python/executor_cases.c.h"
STACK_SHRINK(1);
break;
}
@@ -2076,7 +1784,6 @@
case MAKE_FUNCTION: {
PyObject *codeobj = stack_pointer[-1];
PyObject *func;
- #line 3413 "Python/bytecodes.c"
PyFunctionObject *func_obj = (PyFunctionObject *)
PyFunction_New(codeobj, GLOBALS());
@@ -2088,7 +1795,6 @@
func_obj->func_version = ((PyCodeObject *)codeobj)->co_version;
func = (PyObject *)func_obj;
- #line 2092 "Python/executor_cases.c.h"
stack_pointer[-1] = func;
break;
}
@@ -2096,7 +1802,6 @@
case SET_FUNCTION_ATTRIBUTE: {
PyObject *func = stack_pointer[-1];
PyObject *attr = stack_pointer[-2];
- #line 3427 "Python/bytecodes.c"
assert(PyFunction_Check(func));
PyFunctionObject *func_obj = (PyFunctionObject *)func;
switch(oparg) {
@@ -2121,7 +1826,6 @@
default:
Py_UNREACHABLE();
}
- #line 2125 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = func;
break;
@@ -2132,15 +1836,11 @@
PyObject *stop = stack_pointer[-(1 + ((oparg == 3) ? 1 : 0))];
PyObject *start = stack_pointer[-(2 + ((oparg == 3) ? 1 : 0))];
PyObject *slice;
- #line 3477 "Python/bytecodes.c"
slice = PySlice_New(start, stop, step);
- #line 2138 "Python/executor_cases.c.h"
Py_DECREF(start);
Py_DECREF(stop);
Py_XDECREF(step);
- #line 3479 "Python/bytecodes.c"
if (slice == NULL) { STACK_SHRINK(((oparg == 3) ? 1 : 0)); goto pop_2_error; }
- #line 2144 "Python/executor_cases.c.h"
STACK_SHRINK(((oparg == 3) ? 1 : 0));
STACK_SHRINK(1);
stack_pointer[-1] = slice;
@@ -2150,14 +1850,12 @@
case CONVERT_VALUE: {
PyObject *value = stack_pointer[-1];
PyObject *result;
- #line 3483 "Python/bytecodes.c"
convertion_func_ptr conv_fn;
assert(oparg >= FVC_STR && oparg <= FVC_ASCII);
conv_fn = CONVERSION_FUNCTIONS[oparg];
result = conv_fn(value);
Py_DECREF(value);
if (result == NULL) goto pop_1_error;
- #line 2161 "Python/executor_cases.c.h"
stack_pointer[-1] = result;
break;
}
@@ -2165,7 +1863,6 @@
case FORMAT_SIMPLE: {
PyObject *value = stack_pointer[-1];
PyObject *res;
- #line 3492 "Python/bytecodes.c"
/* If value is a unicode object, then we know the result
* of format(value) is value itself. */
if (!PyUnicode_CheckExact(value)) {
@@ -2176,7 +1873,6 @@
else {
res = value;
}
- #line 2180 "Python/executor_cases.c.h"
stack_pointer[-1] = res;
break;
}
@@ -2185,12 +1881,10 @@
PyObject *fmt_spec = stack_pointer[-1];
PyObject *value = stack_pointer[-2];
PyObject *res;
- #line 3505 "Python/bytecodes.c"
res = PyObject_Format(value, fmt_spec);
Py_DECREF(value);
Py_DECREF(fmt_spec);
if (res == NULL) goto pop_2_error;
- #line 2194 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -2199,10 +1893,8 @@
case COPY: {
PyObject *bottom = stack_pointer[-(1 + (oparg-1))];
PyObject *top;
- #line 3512 "Python/bytecodes.c"
assert(oparg > 0);
top = Py_NewRef(bottom);
- #line 2206 "Python/executor_cases.c.h"
STACK_GROW(1);
stack_pointer[-1] = top;
break;
@@ -2213,7 +1905,6 @@
PyObject *rhs = stack_pointer[-1];
PyObject *lhs = stack_pointer[-2];
PyObject *res;
- #line 3517 "Python/bytecodes.c"
#if ENABLE_SPECIALIZATION
_PyBinaryOpCache *cache = (_PyBinaryOpCache *)next_instr;
if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) {
@@ -2228,12 +1919,9 @@
assert((unsigned)oparg < Py_ARRAY_LENGTH(binary_ops));
assert(binary_ops[oparg]);
res = binary_ops[oparg](lhs, rhs);
- #line 2232 "Python/executor_cases.c.h"
Py_DECREF(lhs);
Py_DECREF(rhs);
- #line 3532 "Python/bytecodes.c"
if (res == NULL) goto pop_2_error;
- #line 2237 "Python/executor_cases.c.h"
STACK_SHRINK(1);
stack_pointer[-1] = res;
break;
@@ -2242,9 +1930,7 @@
case SWAP: {
PyObject *top = stack_pointer[-1];
PyObject *bottom = stack_pointer[-(2 + (oparg-2))];
- #line 3537 "Python/bytecodes.c"
assert(oparg >= 2);
- #line 2248 "Python/executor_cases.c.h"
stack_pointer[-1] = bottom;
stack_pointer[-(2 + (oparg-2))] = top;
break;