diff options
author | Carl Meyer <carl@oddbird.net> | 2023-04-24 22:22:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-24 22:22:14 (GMT) |
commit | 0dc8b50d33208e9ca4fc3d959c6798529731f020 (patch) | |
tree | 822102a5177183fc6ad7075bd74a02a5633edc52 /Python/generated_cases.c.h | |
parent | 22bed58e531ce780d91f3364c5ace98fad28c2e8 (diff) | |
download | cpython-0dc8b50d33208e9ca4fc3d959c6798529731f020.zip cpython-0dc8b50d33208e9ca4fc3d959c6798529731f020.tar.gz cpython-0dc8b50d33208e9ca4fc3d959c6798529731f020.tar.bz2 |
gh-87729: add LOAD_SUPER_ATTR instruction for faster super() (#103497)
This speeds up `super()` (by around 85%, for a simple one-level
`super().meth()` microbenchmark) by avoiding allocation of a new
single-use `super()` object on each use.
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r-- | Python/generated_cases.c.h | 750 |
1 files changed, 398 insertions, 352 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 0928f82..0b5a91f 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -8,7 +8,7 @@ } TARGET(RESUME) { - #line 136 "Python/bytecodes.c" + #line 137 "Python/bytecodes.c" assert(tstate->cframe == &cframe); assert(frame == cframe.current_frame); /* Possibly combine this with eval breaker */ @@ -25,7 +25,7 @@ } TARGET(INSTRUMENTED_RESUME) { - #line 150 "Python/bytecodes.c" + #line 151 "Python/bytecodes.c" /* Possible performance enhancement: * We need to check the eval breaker anyway, can we * combine the instrument verison check and the eval breaker test? @@ -57,7 +57,7 @@ TARGET(LOAD_CLOSURE) { PyObject *value; - #line 178 "Python/bytecodes.c" + #line 179 "Python/bytecodes.c" /* We keep LOAD_CLOSURE so that the bytecode stays more readable. */ value = GETLOCAL(oparg); if (value == NULL) goto unbound_local_error; @@ -70,7 +70,7 @@ TARGET(LOAD_FAST_CHECK) { PyObject *value; - #line 185 "Python/bytecodes.c" + #line 186 "Python/bytecodes.c" value = GETLOCAL(oparg); if (value == NULL) goto unbound_local_error; Py_INCREF(value); @@ -82,7 +82,7 @@ TARGET(LOAD_FAST) { PyObject *value; - #line 191 "Python/bytecodes.c" + #line 192 "Python/bytecodes.c" value = GETLOCAL(oparg); assert(value != NULL); Py_INCREF(value); @@ -95,7 +95,7 @@ TARGET(LOAD_CONST) { PREDICTED(LOAD_CONST); PyObject *value; - #line 197 "Python/bytecodes.c" + #line 198 "Python/bytecodes.c" value = GETITEM(frame->f_code->co_consts, oparg); Py_INCREF(value); #line 102 "Python/generated_cases.c.h" @@ -106,7 +106,7 @@ TARGET(STORE_FAST) { PyObject *value = stack_pointer[-1]; - #line 202 "Python/bytecodes.c" + #line 203 "Python/bytecodes.c" SETLOCAL(oparg, value); #line 112 "Python/generated_cases.c.h" STACK_SHRINK(1); @@ -118,7 +118,7 @@ PyObject *_tmp_2; { PyObject *value; - #line 191 "Python/bytecodes.c" + #line 192 "Python/bytecodes.c" value = GETLOCAL(oparg); assert(value != NULL); Py_INCREF(value); @@ -128,7 +128,7 @@ oparg = (next_instr++)->op.arg; { PyObject *value; - #line 191 "Python/bytecodes.c" + #line 192 "Python/bytecodes.c" value = GETLOCAL(oparg); assert(value != NULL); Py_INCREF(value); @@ -146,7 +146,7 @@ PyObject *_tmp_2; { PyObject *value; - #line 191 "Python/bytecodes.c" + #line 192 "Python/bytecodes.c" value = GETLOCAL(oparg); assert(value != NULL); Py_INCREF(value); @@ -156,7 +156,7 @@ oparg = (next_instr++)->op.arg; { PyObject *value; - #line 197 "Python/bytecodes.c" + #line 198 "Python/bytecodes.c" value = GETITEM(frame->f_code->co_consts, oparg); Py_INCREF(value); #line 163 "Python/generated_cases.c.h" @@ -172,14 +172,14 @@ PyObject *_tmp_1 = stack_pointer[-1]; { PyObject *value = _tmp_1; - #line 202 "Python/bytecodes.c" + #line 203 "Python/bytecodes.c" SETLOCAL(oparg, value); #line 178 "Python/generated_cases.c.h" } oparg = (next_instr++)->op.arg; { PyObject *value; - #line 191 "Python/bytecodes.c" + #line 192 "Python/bytecodes.c" value = GETLOCAL(oparg); assert(value != NULL); Py_INCREF(value); @@ -195,14 +195,14 @@ PyObject *_tmp_2 = stack_pointer[-2]; { PyObject *value = _tmp_1; - #line 202 "Python/bytecodes.c" + #line 203 "Python/bytecodes.c" SETLOCAL(oparg, value); #line 201 "Python/generated_cases.c.h" } oparg = (next_instr++)->op.arg; { PyObject *value = _tmp_2; - #line 202 "Python/bytecodes.c" + #line 203 "Python/bytecodes.c" SETLOCAL(oparg, value); #line 208 "Python/generated_cases.c.h" } @@ -215,7 +215,7 @@ PyObject *_tmp_2; { PyObject *value; - #line 197 "Python/bytecodes.c" + #line 198 "Python/bytecodes.c" value = GETITEM(frame->f_code->co_consts, oparg); Py_INCREF(value); #line 222 "Python/generated_cases.c.h" @@ -224,7 +224,7 @@ oparg = (next_instr++)->op.arg; { PyObject *value; - #line 191 "Python/bytecodes.c" + #line 192 "Python/bytecodes.c" value = GETLOCAL(oparg); assert(value != NULL); Py_INCREF(value); @@ -239,7 +239,7 @@ TARGET(POP_TOP) { PyObject *value = stack_pointer[-1]; - #line 212 "Python/bytecodes.c" + #line 213 "Python/bytecodes.c" #line 244 "Python/generated_cases.c.h" Py_DECREF(value); STACK_SHRINK(1); @@ -248,7 +248,7 @@ TARGET(PUSH_NULL) { PyObject *res; - #line 216 "Python/bytecodes.c" + #line 217 "Python/bytecodes.c" res = NULL; #line 254 "Python/generated_cases.c.h" STACK_GROW(1); @@ -261,13 +261,13 @@ PyObject *_tmp_2 = stack_pointer[-2]; { PyObject *value = _tmp_1; - #line 212 "Python/bytecodes.c" + #line 213 "Python/bytecodes.c" #line 266 "Python/generated_cases.c.h" Py_DECREF(value); } { PyObject *value = _tmp_2; - #line 212 "Python/bytecodes.c" + #line 213 "Python/bytecodes.c" #line 272 "Python/generated_cases.c.h" Py_DECREF(value); } @@ -278,7 +278,7 @@ TARGET(INSTRUMENTED_END_FOR) { PyObject *value = stack_pointer[-1]; PyObject *receiver = stack_pointer[-2]; - #line 222 "Python/bytecodes.c" + #line 223 "Python/bytecodes.c" /* Need to create a fake StopIteration error here, * to conform to PEP 380 */ if (PyGen_Check(receiver)) { @@ -298,7 +298,7 @@ TARGET(END_SEND) { PyObject *value = stack_pointer[-1]; PyObject *receiver = stack_pointer[-2]; - #line 235 "Python/bytecodes.c" + #line 236 "Python/bytecodes.c" Py_DECREF(receiver); #line 304 "Python/generated_cases.c.h" STACK_SHRINK(1); @@ -309,7 +309,7 @@ TARGET(INSTRUMENTED_END_SEND) { PyObject *value = stack_pointer[-1]; PyObject *receiver = stack_pointer[-2]; - #line 239 "Python/bytecodes.c" + #line 240 "Python/bytecodes.c" if (PyGen_Check(receiver) || PyCoro_CheckExact(receiver)) { PyErr_SetObject(PyExc_StopIteration, value); if (monitor_stop_iteration(tstate, frame, next_instr-1)) { @@ -327,11 +327,11 @@ TARGET(UNARY_NEGATIVE) { PyObject *value = stack_pointer[-1]; PyObject *res; - #line 250 "Python/bytecodes.c" + #line 251 "Python/bytecodes.c" res = PyNumber_Negative(value); #line 333 "Python/generated_cases.c.h" Py_DECREF(value); - #line 252 "Python/bytecodes.c" + #line 253 "Python/bytecodes.c" if (res == NULL) goto pop_1_error; #line 337 "Python/generated_cases.c.h" stack_pointer[-1] = res; @@ -341,11 +341,11 @@ TARGET(UNARY_NOT) { PyObject *value = stack_pointer[-1]; PyObject *res; - #line 256 "Python/bytecodes.c" + #line 257 "Python/bytecodes.c" int err = PyObject_IsTrue(value); #line 347 "Python/generated_cases.c.h" Py_DECREF(value); - #line 258 "Python/bytecodes.c" + #line 259 "Python/bytecodes.c" if (err < 0) goto pop_1_error; if (err == 0) { res = Py_True; @@ -362,11 +362,11 @@ TARGET(UNARY_INVERT) { PyObject *value = stack_pointer[-1]; PyObject *res; - #line 269 "Python/bytecodes.c" + #line 270 "Python/bytecodes.c" res = PyNumber_Invert(value); #line 368 "Python/generated_cases.c.h" Py_DECREF(value); - #line 271 "Python/bytecodes.c" + #line 272 "Python/bytecodes.c" if (res == NULL) goto pop_1_error; #line 372 "Python/generated_cases.c.h" stack_pointer[-1] = res; @@ -377,7 +377,7 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *prod; - #line 288 "Python/bytecodes.c" + #line 289 "Python/bytecodes.c" DEOPT_IF(!PyLong_CheckExact(left), BINARY_OP); DEOPT_IF(!PyLong_CheckExact(right), BINARY_OP); STAT_INC(BINARY_OP, hit); @@ -396,7 +396,7 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *prod; - #line 298 "Python/bytecodes.c" + #line 299 "Python/bytecodes.c" DEOPT_IF(!PyFloat_CheckExact(left), BINARY_OP); DEOPT_IF(!PyFloat_CheckExact(right), BINARY_OP); STAT_INC(BINARY_OP, hit); @@ -414,7 +414,7 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *sub; - #line 307 "Python/bytecodes.c" + #line 308 "Python/bytecodes.c" DEOPT_IF(!PyLong_CheckExact(left), BINARY_OP); DEOPT_IF(!PyLong_CheckExact(right), BINARY_OP); STAT_INC(BINARY_OP, hit); @@ -433,7 +433,7 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *sub; - #line 317 "Python/bytecodes.c" + #line 318 "Python/bytecodes.c" DEOPT_IF(!PyFloat_CheckExact(left), BINARY_OP); DEOPT_IF(!PyFloat_CheckExact(right), BINARY_OP); STAT_INC(BINARY_OP, hit); @@ -450,7 +450,7 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *res; - #line 325 "Python/bytecodes.c" + #line 326 "Python/bytecodes.c" DEOPT_IF(!PyUnicode_CheckExact(left), BINARY_OP); DEOPT_IF(Py_TYPE(right) != Py_TYPE(left), BINARY_OP); STAT_INC(BINARY_OP, hit); @@ -468,7 +468,7 @@ TARGET(BINARY_OP_INPLACE_ADD_UNICODE) { PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; - #line 341 "Python/bytecodes.c" + #line 342 "Python/bytecodes.c" DEOPT_IF(!PyUnicode_CheckExact(left), BINARY_OP); DEOPT_IF(Py_TYPE(right) != Py_TYPE(left), BINARY_OP); _Py_CODEUNIT true_next = next_instr[INLINE_CACHE_ENTRIES_BINARY_OP]; @@ -504,7 +504,7 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *sum; - #line 370 "Python/bytecodes.c" + #line 371 "Python/bytecodes.c" DEOPT_IF(!PyFloat_CheckExact(left), BINARY_OP); DEOPT_IF(Py_TYPE(right) != Py_TYPE(left), BINARY_OP); STAT_INC(BINARY_OP, hit); @@ -522,7 +522,7 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *sum; - #line 379 "Python/bytecodes.c" + #line 380 "Python/bytecodes.c" DEOPT_IF(!PyLong_CheckExact(left), BINARY_OP); DEOPT_IF(Py_TYPE(right) != Py_TYPE(left), BINARY_OP); STAT_INC(BINARY_OP, hit); @@ -543,7 +543,7 @@ PyObject *sub = stack_pointer[-1]; PyObject *container = stack_pointer[-2]; PyObject *res; - #line 397 "Python/bytecodes.c" + #line 398 "Python/bytecodes.c" #if ENABLE_SPECIALIZATION _PyBinarySubscrCache *cache = (_PyBinarySubscrCache *)next_instr; if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) { @@ -558,7 +558,7 @@ #line 559 "Python/generated_cases.c.h" Py_DECREF(container); Py_DECREF(sub); - #line 409 "Python/bytecodes.c" + #line 410 "Python/bytecodes.c" if (res == NULL) goto pop_2_error; #line 564 "Python/generated_cases.c.h" STACK_SHRINK(1); @@ -572,7 +572,7 @@ PyObject *start = stack_pointer[-2]; PyObject *container = stack_pointer[-3]; PyObject *res; - #line 413 "Python/bytecodes.c" + #line 414 "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. @@ -596,7 +596,7 @@ PyObject *start = stack_pointer[-2]; PyObject *container = stack_pointer[-3]; PyObject *v = stack_pointer[-4]; - #line 428 "Python/bytecodes.c" + #line 429 "Python/bytecodes.c" PyObject *slice = _PyBuildSlice_ConsumeRefs(start, stop); int err; if (slice == NULL) { @@ -618,7 +618,7 @@ PyObject *sub = stack_pointer[-1]; PyObject *list = stack_pointer[-2]; PyObject *res; - #line 443 "Python/bytecodes.c" + #line 444 "Python/bytecodes.c" DEOPT_IF(!PyLong_CheckExact(sub), BINARY_SUBSCR); DEOPT_IF(!PyList_CheckExact(list), BINARY_SUBSCR); @@ -643,7 +643,7 @@ PyObject *sub = stack_pointer[-1]; PyObject *tuple = stack_pointer[-2]; PyObject *res; - #line 459 "Python/bytecodes.c" + #line 460 "Python/bytecodes.c" DEOPT_IF(!PyLong_CheckExact(sub), BINARY_SUBSCR); DEOPT_IF(!PyTuple_CheckExact(tuple), BINARY_SUBSCR); @@ -668,7 +668,7 @@ PyObject *sub = stack_pointer[-1]; PyObject *dict = stack_pointer[-2]; PyObject *res; - #line 475 "Python/bytecodes.c" + #line 476 "Python/bytecodes.c" DEOPT_IF(!PyDict_CheckExact(dict), BINARY_SUBSCR); STAT_INC(BINARY_SUBSCR, hit); res = PyDict_GetItemWithError(dict, sub); @@ -679,7 +679,7 @@ #line 680 "Python/generated_cases.c.h" Py_DECREF(dict); Py_DECREF(sub); - #line 483 "Python/bytecodes.c" + #line 484 "Python/bytecodes.c" if (true) goto pop_2_error; } Py_INCREF(res); // Do this before DECREF'ing dict, sub @@ -695,7 +695,7 @@ TARGET(BINARY_SUBSCR_GETITEM) { PyObject *sub = stack_pointer[-1]; PyObject *container = stack_pointer[-2]; - #line 490 "Python/bytecodes.c" + #line 491 "Python/bytecodes.c" PyTypeObject *tp = Py_TYPE(container); DEOPT_IF(!PyType_HasFeature(tp, Py_TPFLAGS_HEAPTYPE), BINARY_SUBSCR); PyHeapTypeObject *ht = (PyHeapTypeObject *)tp; @@ -723,7 +723,7 @@ TARGET(LIST_APPEND) { PyObject *v = stack_pointer[-1]; PyObject *list = stack_pointer[-(2 + (oparg-1))]; - #line 514 "Python/bytecodes.c" + #line 515 "Python/bytecodes.c" if (_PyList_AppendTakeRef((PyListObject *)list, v) < 0) goto pop_1_error; #line 729 "Python/generated_cases.c.h" STACK_SHRINK(1); @@ -734,11 +734,11 @@ TARGET(SET_ADD) { PyObject *v = stack_pointer[-1]; PyObject *set = stack_pointer[-(2 + (oparg-1))]; - #line 519 "Python/bytecodes.c" + #line 520 "Python/bytecodes.c" int err = PySet_Add(set, v); #line 740 "Python/generated_cases.c.h" Py_DECREF(v); - #line 521 "Python/bytecodes.c" + #line 522 "Python/bytecodes.c" if (err) goto pop_1_error; #line 744 "Python/generated_cases.c.h" STACK_SHRINK(1); @@ -753,7 +753,7 @@ PyObject *container = stack_pointer[-2]; PyObject *v = stack_pointer[-3]; uint16_t counter = read_u16(&next_instr[0].cache); - #line 532 "Python/bytecodes.c" + #line 533 "Python/bytecodes.c" #if ENABLE_SPECIALIZATION if (ADAPTIVE_COUNTER_IS_ZERO(counter)) { next_instr--; @@ -772,7 +772,7 @@ Py_DECREF(v); Py_DECREF(container); Py_DECREF(sub); - #line 547 "Python/bytecodes.c" + #line 548 "Python/bytecodes.c" if (err) goto pop_3_error; #line 778 "Python/generated_cases.c.h" STACK_SHRINK(3); @@ -784,7 +784,7 @@ PyObject *sub = stack_pointer[-1]; PyObject *list = stack_pointer[-2]; PyObject *value = stack_pointer[-3]; - #line 551 "Python/bytecodes.c" + #line 552 "Python/bytecodes.c" DEOPT_IF(!PyLong_CheckExact(sub), STORE_SUBSCR); DEOPT_IF(!PyList_CheckExact(list), STORE_SUBSCR); @@ -811,7 +811,7 @@ PyObject *sub = stack_pointer[-1]; PyObject *dict = stack_pointer[-2]; PyObject *value = stack_pointer[-3]; - #line 570 "Python/bytecodes.c" + #line 571 "Python/bytecodes.c" DEOPT_IF(!PyDict_CheckExact(dict), STORE_SUBSCR); STAT_INC(STORE_SUBSCR, hit); int err = _PyDict_SetItem_Take2((PyDictObject *)dict, sub, value); @@ -826,13 +826,13 @@ TARGET(DELETE_SUBSCR) { PyObject *sub = stack_pointer[-1]; PyObject *container = stack_pointer[-2]; - #line 578 "Python/bytecodes.c" + #line 579 "Python/bytecodes.c" /* del container[sub] */ int err = PyObject_DelItem(container, sub); #line 833 "Python/generated_cases.c.h" Py_DECREF(container); Py_DECREF(sub); - #line 581 "Python/bytecodes.c" + #line 582 "Python/bytecodes.c" if (err) goto pop_2_error; #line 838 "Python/generated_cases.c.h" STACK_SHRINK(2); @@ -842,12 +842,12 @@ TARGET(CALL_INTRINSIC_1) { PyObject *value = stack_pointer[-1]; PyObject *res; - #line 585 "Python/bytecodes.c" + #line 586 "Python/bytecodes.c" assert(oparg <= MAX_INTRINSIC_1); res = _PyIntrinsics_UnaryFunctions[oparg](tstate, value); #line 849 "Python/generated_cases.c.h" Py_DECREF(value); - #line 588 "Python/bytecodes.c" + #line 589 "Python/bytecodes.c" if (res == NULL) goto pop_1_error; #line 853 "Python/generated_cases.c.h" stack_pointer[-1] = res; @@ -858,13 +858,13 @@ PyObject *value1 = stack_pointer[-1]; PyObject *value2 = stack_pointer[-2]; PyObject *res; - #line 592 "Python/bytecodes.c" + #line 593 "Python/bytecodes.c" assert(oparg <= MAX_INTRINSIC_2); res = _PyIntrinsics_BinaryFunctions[oparg](tstate, value2, value1); #line 865 "Python/generated_cases.c.h" Py_DECREF(value2); Py_DECREF(value1); - #line 595 "Python/bytecodes.c" + #line 596 "Python/bytecodes.c" if (res == NULL) goto pop_2_error; #line 870 "Python/generated_cases.c.h" STACK_SHRINK(1); @@ -874,7 +874,7 @@ TARGET(RAISE_VARARGS) { PyObject **args = (stack_pointer - oparg); - #line 599 "Python/bytecodes.c" + #line 600 "Python/bytecodes.c" PyObject *cause = NULL, *exc = NULL; switch (oparg) { case 2: @@ -897,7 +897,7 @@ TARGET(INTERPRETER_EXIT) { PyObject *retval = stack_pointer[-1]; - #line 619 "Python/bytecodes.c" + #line 620 "Python/bytecodes.c" assert(frame == &entry_frame); assert(_PyFrame_IsIncomplete(frame)); STACK_SHRINK(1); // Since we're not going to DISPATCH() @@ -913,7 +913,7 @@ TARGET(RETURN_VALUE) { PyObject *retval = stack_pointer[-1]; - #line 632 "Python/bytecodes.c" + #line 633 "Python/bytecodes.c" STACK_SHRINK(1); assert(EMPTY()); _PyFrame_SetStackPointer(frame, stack_pointer); @@ -931,7 +931,7 @@ TARGET(INSTRUMENTED_RETURN_VALUE) { PyObject *retval = stack_pointer[-1]; - #line 647 "Python/bytecodes.c" + #line 648 "Python/bytecodes.c" int err = _Py_call_instrumentation_arg( tstate, PY_MONITORING_EVENT_PY_RETURN, frame, next_instr-1, retval); @@ -952,7 +952,7 @@ } TARGET(RETURN_CONST) { - #line 666 "Python/bytecodes.c" + #line 667 "Python/bytecodes.c" PyObject *retval = GETITEM(frame->f_code->co_consts, oparg); Py_INCREF(retval); assert(EMPTY()); @@ -970,7 +970,7 @@ } TARGET(INSTRUMENTED_RETURN_CONST) { - #line 682 "Python/bytecodes.c" + #line 683 "Python/bytecodes.c" PyObject *retval = GETITEM(frame->f_code->co_consts, oparg); int err = _Py_call_instrumentation_arg( tstate, PY_MONITORING_EVENT_PY_RETURN, @@ -994,7 +994,7 @@ TARGET(GET_AITER) { PyObject *obj = stack_pointer[-1]; PyObject *iter; - #line 702 "Python/bytecodes.c" + #line 703 "Python/bytecodes.c" unaryfunc getter = NULL; PyTypeObject *type = Py_TYPE(obj); @@ -1009,14 +1009,14 @@ type->tp_name); #line 1011 "Python/generated_cases.c.h" Py_DECREF(obj); - #line 715 "Python/bytecodes.c" + #line 716 "Python/bytecodes.c" if (true) goto pop_1_error; } iter = (*getter)(obj); #line 1018 "Python/generated_cases.c.h" Py_DECREF(obj); - #line 720 "Python/bytecodes.c" + #line 721 "Python/bytecodes.c" if (iter == NULL) goto pop_1_error; if (Py_TYPE(iter)->tp_as_async == NULL || @@ -1037,7 +1037,7 @@ TARGET(GET_ANEXT) { PyObject *aiter = stack_pointer[-1]; PyObject *awaitable; - #line 735 "Python/bytecodes.c" + #line 736 "Python/bytecodes.c" unaryfunc getter = NULL; PyObject *next_iter = NULL; PyTypeObject *type = Py_TYPE(aiter); @@ -1092,7 +1092,7 @@ PREDICTED(GET_AWAITABLE); PyObject *iterable = stack_pointer[-1]; PyObject *iter; - #line 782 "Python/bytecodes.c" + #line 783 "Python/bytecodes.c" iter = _PyCoro_GetAwaitableIter(iterable); if (iter == NULL) { @@ -1101,7 +1101,7 @@ #line 1103 "Python/generated_cases.c.h" Py_DECREF(iterable); - #line 789 "Python/bytecodes.c" + #line 790 "Python/bytecodes.c" if (iter != NULL && PyCoro_CheckExact(iter)) { PyObject *yf = _PyGen_yf((PyGenObject*)iter); @@ -1130,7 +1130,7 @@ PyObject *v = stack_pointer[-1]; PyObject *receiver = stack_pointer[-2]; PyObject *retval; - #line 815 "Python/bytecodes.c" + #line 816 "Python/bytecodes.c" #if ENABLE_SPECIALIZATION _PySendCache *cache = (_PySendCache *)next_instr; if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) { @@ -1185,7 +1185,7 @@ TARGET(SEND_GEN) { PyObject *v = stack_pointer[-1]; PyObject *receiver = stack_pointer[-2]; - #line 863 "Python/bytecodes.c" + #line 864 "Python/bytecodes.c" PyGenObject *gen = (PyGenObject *)receiver; DEOPT_IF(Py_TYPE(gen) != &PyGen_Type && Py_TYPE(gen) != &PyCoro_Type, SEND); @@ -1205,7 +1205,7 @@ TARGET(INSTRUMENTED_YIELD_VALUE) { PyObject *retval = stack_pointer[-1]; - #line 880 "Python/bytecodes.c" + #line 881 "Python/bytecodes.c" assert(frame != &entry_frame); PyGenObject *gen = _PyFrame_GetGenerator(frame); gen->gi_frame_state = FRAME_SUSPENDED; @@ -1227,7 +1227,7 @@ TARGET(YIELD_VALUE) { PyObject *retval = stack_pointer[-1]; - #line 899 "Python/bytecodes.c" + #line 900 "Python/bytecodes.c" // NOTE: It's important that YIELD_VALUE never raises an exception! // The compiler treats any exception raised here as a failed close() // or throw() call. @@ -1248,7 +1248,7 @@ TARGET(POP_EXCEPT) { PyObject *exc_value = stack_pointer[-1]; - #line 917 "Python/bytecodes.c" + #line 918 "Python/bytecodes.c" _PyErr_StackItem *exc_info = tstate->exc_info; Py_XSETREF(exc_info->exc_value, exc_value); #line 1255 "Python/generated_cases.c.h" @@ -1259,7 +1259,7 @@ TARGET(RERAISE) { PyObject *exc = stack_pointer[-1]; PyObject **values = (stack_pointer - (1 + oparg)); - #line 922 "Python/bytecodes.c" + #line 923 "Python/bytecodes.c" assert(oparg >= 0 && oparg <= 2); if (oparg) { PyObject *lasti = values[0]; @@ -1283,13 +1283,13 @@ TARGET(END_ASYNC_FOR) { PyObject *exc = stack_pointer[-1]; PyObject *awaitable = stack_pointer[-2]; - #line 942 "Python/bytecodes.c" + #line 943 "Python/bytecodes.c" assert(exc && PyExceptionInstance_Check(exc)); if (PyErr_GivenExceptionMatches(exc, PyExc_StopAsyncIteration)) { #line 1290 "Python/generated_cases.c.h" Py_DECREF(awaitable); Py_DECREF(exc); - #line 945 "Python/bytecodes.c" + #line 946 "Python/bytecodes.c" } else { Py_INCREF(exc); @@ -1307,7 +1307,7 @@ PyObject *sub_iter = stack_pointer[-3]; PyObject *none; PyObject *value; - #line 954 "Python/bytecodes.c" + #line 955 "Python/bytecodes.c" assert(throwflag); assert(exc_value && PyExceptionInstance_Check(exc_value)); if (PyErr_GivenExceptionMatches(exc_value, PyExc_StopIteration)) { @@ -1316,7 +1316,7 @@ Py_DECREF(sub_iter); Py_DECREF(last_sent_val); Py_DECREF(exc_value); - #line 959 "Python/bytecodes.c" + #line 960 "Python/bytecodes.c" none = Py_NewRef(Py_None); } else { @@ -1332,7 +1332,7 @@ TARGET(LOAD_ASSERTION_ERROR) { PyObject *value; - #line 968 "Python/bytecodes.c" + #line 969 "Python/bytecodes.c" value = Py_NewRef(PyExc_AssertionError); #line 1338 "Python/generated_cases.c.h" STACK_GROW(1); @@ -1342,7 +1342,7 @@ TARGET(LOAD_BUILD_CLASS) { PyObject *bc; - #line 972 "Python/bytecodes.c" + #line 973 "Python/bytecodes.c" if (PyDict_CheckExact(BUILTINS())) { bc = _PyDict_GetItemWithError(BUILTINS(), &_Py_ID(__build_class__)); @@ -1372,7 +1372,7 @@ TARGET(STORE_NAME) { PyObject *v = stack_pointer[-1]; - #line 996 "Python/bytecodes.c" + #line 997 "Python/bytecodes.c" PyObject *name = GETITEM(frame->f_code->co_names, oparg); PyObject *ns = LOCALS(); int err; @@ -1381,7 +1381,7 @@ "no locals found when storing %R", name); #line 1383 "Python/generated_cases.c.h" Py_DECREF(v); - #line 1003 "Python/bytecodes.c" + #line 1004 "Python/bytecodes.c" if (true) goto pop_1_error; } if (PyDict_CheckExact(ns)) @@ -1390,7 +1390,7 @@ err = PyObject_SetItem(ns, name, v); #line 1392 "Python/generated_cases.c.h" Py_DECREF(v); - #line 1010 "Python/bytecodes.c" + #line 1011 "Python/bytecodes.c" if (err) goto pop_1_error; #line 1396 "Python/generated_cases.c.h" STACK_SHRINK(1); @@ -1398,7 +1398,7 @@ } TARGET(DELETE_NAME) { - #line 1014 "Python/bytecodes.c" + #line 1015 "Python/bytecodes.c" PyObject *name = GETITEM(frame->f_code->co_names, oparg); PyObject *ns = LOCALS(); int err; @@ -1423,7 +1423,7 @@ PREDICTED(UNPACK_SEQUENCE); static_assert(INLINE_CACHE_ENTRIES_UNPACK_SEQUENCE == 1, "incorrect cache size"); PyObject *seq = stack_pointer[-1]; - #line 1040 "Python/bytecodes.c" + #line 1041 "Python/bytecodes.c" #if ENABLE_SPECIALIZATION _PyUnpackSequenceCache *cache = (_PyUnpackSequenceCache *)next_instr; if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) { @@ -1438,7 +1438,7 @@ int res = unpack_iterable(tstate, seq, oparg, -1, top); #line 1440 "Python/generated_cases.c.h" Py_DECREF(seq); - #line 1053 "Python/bytecodes.c" + #line 1054 "Python/bytecodes.c" if (res == 0) goto pop_1_error; #line 1444 "Python/generated_cases.c.h" STACK_SHRINK(1); @@ -1450,7 +1450,7 @@ TARGET(UNPACK_SEQUENCE_TWO_TUPLE) { PyObject *seq = stack_pointer[-1]; PyObject **values = stack_pointer - (1); - #line 1057 "Python/bytecodes.c" + #line 1058 "Python/bytecodes.c" DEOPT_IF(!PyTuple_CheckExact(seq), UNPACK_SEQUENCE); DEOPT_IF(PyTuple_GET_SIZE(seq) != 2, UNPACK_SEQUENCE); assert(oparg == 2); @@ -1468,7 +1468,7 @@ TARGET(UNPACK_SEQUENCE_TUPLE) { PyObject *seq = stack_pointer[-1]; PyObject **values = stack_pointer - (1); - #line 1067 "Python/bytecodes.c" + #line 1068 "Python/bytecodes.c" DEOPT_IF(!PyTuple_CheckExact(seq), UNPACK_SEQUENCE); DEOPT_IF(PyTuple_GET_SIZE(seq) != oparg, UNPACK_SEQUENCE); STAT_INC(UNPACK_SEQUENCE, hit); @@ -1487,7 +1487,7 @@ TARGET(UNPACK_SEQUENCE_LIST) { PyObject *seq = stack_pointer[-1]; PyObject **values = stack_pointer - (1); - #line 1078 "Python/bytecodes.c" + #line 1079 "Python/bytecodes.c" DEOPT_IF(!PyList_CheckExact(seq), UNPACK_SEQUENCE); DEOPT_IF(PyList_GET_SIZE(seq) != oparg, UNPACK_SEQUENCE); STAT_INC(UNPACK_SEQUENCE, hit); @@ -1505,13 +1505,13 @@ TARGET(UNPACK_EX) { PyObject *seq = stack_pointer[-1]; - #line 1089 "Python/bytecodes.c" + #line 1090 "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 1513 "Python/generated_cases.c.h" Py_DECREF(seq); - #line 1093 "Python/bytecodes.c" + #line 1094 "Python/bytecodes.c" if (res == 0) goto pop_1_error; #line 1517 "Python/generated_cases.c.h" STACK_GROW((oparg & 0xFF) + (oparg >> 8)); @@ -1524,7 +1524,7 @@ PyObject *owner = stack_pointer[-1]; PyObject *v = stack_pointer[-2]; uint16_t counter = read_u16(&next_instr[0].cache); - #line 1104 "Python/bytecodes.c" + #line 1105 "Python/bytecodes.c" #if ENABLE_SPECIALIZATION if (ADAPTIVE_COUNTER_IS_ZERO(counter)) { PyObject *name = GETITEM(frame->f_code->co_names, oparg); @@ -1543,7 +1543,7 @@ #line 1544 "Python/generated_cases.c.h" Py_DECREF(v); Py_DECREF(owner); - #line 1120 "Python/bytecodes.c" + #line 1121 "Python/bytecodes.c" if (err) goto pop_2_error; #line 1549 "Python/generated_cases.c.h" STACK_SHRINK(2); @@ -1553,12 +1553,12 @@ TARGET(DELETE_ATTR) { PyObject *owner = stack_pointer[-1]; - #line 1124 "Python/bytecodes.c" + #line 1125 "Python/bytecodes.c" PyObject *name = GETITEM(frame->f_code->co_names, oparg); int err = PyObject_SetAttr(owner, name, (PyObject *)NULL); #line 1560 "Python/generated_cases.c.h" Py_DECREF(owner); - #line 1127 "Python/bytecodes.c" + #line 1128 "Python/bytecodes.c" if (err) goto pop_1_error; #line 1564 "Python/generated_cases.c.h" STACK_SHRINK(1); @@ -1567,12 +1567,12 @@ TARGET(STORE_GLOBAL) { PyObject *v = stack_pointer[-1]; - #line 1131 "Python/bytecodes.c" + #line 1132 "Python/bytecodes.c" PyObject *name = GETITEM(frame->f_code->co_names, oparg); int err = PyDict_SetItem(GLOBALS(), name, v); #line 1574 "Python/generated_cases.c.h" Py_DECREF(v); - #line 1134 "Python/bytecodes.c" + #line 1135 "Python/bytecodes.c" if (err) goto pop_1_error; #line 1578 "Python/generated_cases.c.h" STACK_SHRINK(1); @@ -1580,7 +1580,7 @@ } TARGET(DELETE_GLOBAL) { - #line 1138 "Python/bytecodes.c" + #line 1139 "Python/bytecodes.c" PyObject *name = GETITEM(frame->f_code->co_names, oparg); int err; err = PyDict_DelItem(GLOBALS(), name); @@ -1598,7 +1598,7 @@ TARGET(LOAD_NAME) { PyObject *v; - #line 1152 "Python/bytecodes.c" + #line 1153 "Python/bytecodes.c" PyObject *name = GETITEM(frame->f_code->co_names, oparg); PyObject *locals = LOCALS(); if (locals == NULL) { @@ -1668,7 +1668,7 @@ static_assert(INLINE_CACHE_ENTRIES_LOAD_GLOBAL == 4, "incorrect cache size"); PyObject *null = NULL; PyObject *v; - #line 1219 "Python/bytecodes.c" + #line 1220 "Python/bytecodes.c" #if ENABLE_SPECIALIZATION _PyLoadGlobalCache *cache = (_PyLoadGlobalCache *)next_instr; if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) { @@ -1734,7 +1734,7 @@ PyObject *res; uint16_t index = read_u16(&next_instr[1].cache); uint16_t version = read_u16(&next_instr[2].cache); - #line 1273 "Python/bytecodes.c" + #line 1274 "Python/bytecodes.c" DEOPT_IF(!PyDict_CheckExact(GLOBALS()), LOAD_GLOBAL); PyDictObject *dict = (PyDictObject *)GLOBALS(); DEOPT_IF(dict->ma_keys->dk_version != version, LOAD_GLOBAL); @@ -1760,7 +1760,7 @@ uint16_t index = read_u16(&next_instr[1].cache); uint16_t mod_version = read_u16(&next_instr[2].cache); uint16_t bltn_version = read_u16(&next_instr[3].cache); - #line 1286 "Python/bytecodes.c" + #line 1287 "Python/bytecodes.c" DEOPT_IF(!PyDict_CheckExact(GLOBALS()), LOAD_GLOBAL); DEOPT_IF(!PyDict_CheckExact(BUILTINS()), LOAD_GLOBAL); PyDictObject *mdict = (PyDictObject *)GLOBALS(); @@ -1785,7 +1785,7 @@ } TARGET(DELETE_FAST) { - #line 1303 "Python/bytecodes.c" + #line 1304 "Python/bytecodes.c" PyObject *v = GETLOCAL(oparg); if (v == NULL) goto unbound_local_error; SETLOCAL(oparg, NULL); @@ -1794,7 +1794,7 @@ } TARGET(MAKE_CELL) { - #line 1309 "Python/bytecodes.c" + #line 1310 "Python/bytecodes.c" // "initial" is probably NULL but not if it's an arg (or set // via PyFrame_LocalsToFast() before MAKE_CELL has run). PyObject *initial = GETLOCAL(oparg); @@ -1808,7 +1808,7 @@ } TARGET(DELETE_DEREF) { - #line 1320 "Python/bytecodes.c" + #line 1321 "Python/bytecodes.c" PyObject *cell = GETLOCAL(oparg); PyObject *oldobj = PyCell_GET(cell); // Can't use ERROR_IF here. @@ -1825,7 +1825,7 @@ TARGET(LOAD_CLASSDEREF) { PyObject *value; - #line 1333 "Python/bytecodes.c" + #line 1334 "Python/bytecodes.c" PyObject *name, *locals = LOCALS(); assert(locals); assert(oparg >= 0 && oparg < frame->f_code->co_nlocalsplus); @@ -1865,7 +1865,7 @@ TARGET(LOAD_DEREF) { PyObject *value; - #line 1367 "Python/bytecodes.c" + #line 1368 "Python/bytecodes.c" PyObject *cell = GETLOCAL(oparg); value = PyCell_GET(cell); if (value == NULL) { @@ -1881,7 +1881,7 @@ TARGET(STORE_DEREF) { PyObject *v = stack_pointer[-1]; - #line 1377 "Python/bytecodes.c" + #line 1378 "Python/bytecodes.c" PyObject *cell = GETLOCAL(oparg); PyObject *oldobj = PyCell_GET(cell); PyCell_SET(cell, v); @@ -1892,7 +1892,7 @@ } TARGET(COPY_FREE_VARS) { - #line 1384 "Python/bytecodes.c" + #line 1385 "Python/bytecodes.c" /* Copy closure variables to free variables */ PyCodeObject *co = frame->f_code; assert(PyFunction_Check(frame->f_funcobj)); @@ -1910,13 +1910,13 @@ TARGET(BUILD_STRING) { PyObject **pieces = (stack_pointer - oparg); PyObject *str; - #line 1397 "Python/bytecodes.c" + #line 1398 "Python/bytecodes.c" str = _PyUnicode_JoinArray(&_Py_STR(empty), pieces, oparg); #line 1916 "Python/generated_cases.c.h" for (int _i = oparg; --_i >= 0;) { Py_DECREF(pieces[_i]); } - #line 1399 "Python/bytecodes.c" + #line 1400 "Python/bytecodes.c" if (str == NULL) { STACK_SHRINK(oparg); goto error; } #line 1922 "Python/generated_cases.c.h" STACK_SHRINK(oparg); @@ -1928,7 +1928,7 @@ TARGET(BUILD_TUPLE) { PyObject **values = (stack_pointer - oparg); PyObject *tup; - #line 1403 "Python/bytecodes.c" + #line 1404 "Python/bytecodes.c" tup = _PyTuple_FromArraySteal(values, oparg); if (tup == NULL) { STACK_SHRINK(oparg); goto error; } #line 1935 "Python/generated_cases.c.h" @@ -1941,7 +1941,7 @@ TARGET(BUILD_LIST) { PyObject **values = (stack_pointer - oparg); PyObject *list; - #line 1408 "Python/bytecodes.c" + #line 1409 "Python/bytecodes.c" list = _PyList_FromArraySteal(values, oparg); if (list == NULL) { STACK_SHRINK(oparg); goto error; } #line 1948 "Python/generated_cases.c.h" @@ -1954,7 +1954,7 @@ TARGET(LIST_EXTEND) { PyObject *iterable = stack_pointer[-1]; PyObject *list = stack_pointer[-(2 + (oparg-1))]; - #line 1413 "Python/bytecodes.c" + #line 1414 "Python/bytecodes.c" PyObject *none_val = _PyList_Extend((PyListObject *)list, iterable); if (none_val == NULL) { if (_PyErr_ExceptionMatches(tstate, PyExc_TypeError) && @@ -1967,7 +1967,7 @@ } #line 1969 "Python/generated_cases.c.h" Py_DECREF(iterable); - #line 1424 "Python/bytecodes.c" + #line 1425 "Python/bytecodes.c" if (true) goto pop_1_error; } Py_DECREF(none_val); @@ -1980,11 +1980,11 @@ TARGET(SET_UPDATE) { PyObject *iterable = stack_pointer[-1]; PyObject *set = stack_pointer[-(2 + (oparg-1))]; - #line 1431 "Python/bytecodes.c" + #line 1432 "Python/bytecodes.c" int err = _PySet_Update(set, iterable); #line 1986 "Python/generated_cases.c.h" Py_DECREF(iterable); - #line 1433 "Python/bytecodes.c" + #line 1434 "Python/bytecodes.c" if (err < 0) goto pop_1_error; #line 1990 "Python/generated_cases.c.h" STACK_SHRINK(1); @@ -1994,7 +1994,7 @@ TARGET(BUILD_SET) { PyObject **values = (stack_pointer - oparg); PyObject *set; - #line 1437 "Python/bytecodes.c" + #line 1438 "Python/bytecodes.c" set = PySet_New(NULL); if (set == NULL) goto error; @@ -2019,7 +2019,7 @@ TARGET(BUILD_MAP) { PyObject **values = (stack_pointer - oparg*2); PyObject *map; - #line 1454 "Python/bytecodes.c" + #line 1455 "Python/bytecodes.c" map = _PyDict_FromItems( values, 2, values+1, 2, @@ -2031,7 +2031,7 @@ for (int _i = oparg*2; --_i >= 0;) { Py_DECREF(values[_i]); } - #line 1462 "Python/bytecodes.c" + #line 1463 "Python/bytecodes.c" if (map == NULL) { STACK_SHRINK(oparg*2); goto error; } #line 2037 "Python/generated_cases.c.h" STACK_SHRINK(oparg*2); @@ -2041,7 +2041,7 @@ } TARGET(SETUP_ANNOTATIONS) { - #line 1466 "Python/bytecodes.c" + #line 1467 "Python/bytecodes.c" int err; PyObject *ann_dict; if (LOCALS() == NULL) { @@ -2089,7 +2089,7 @@ PyObject *keys = stack_pointer[-1]; PyObject **values = (stack_pointer - (1 + oparg)); PyObject *map; - #line 1508 "Python/bytecodes.c" + #line 1509 "Python/bytecodes.c" if (!PyTuple_CheckExact(keys) || PyTuple_GET_SIZE(keys) != (Py_ssize_t)oparg) { _PyErr_SetString(tstate, PyExc_SystemError, @@ -2104,7 +2104,7 @@ Py_DECREF(values[_i]); } Py_DECREF(keys); - #line 1518 "Python/bytecodes.c" + #line 1519 "Python/bytecodes.c" if (map == NULL) { STACK_SHRINK(oparg); goto pop_1_error; } #line 2110 "Python/generated_cases.c.h" STACK_SHRINK(oparg); @@ -2114,7 +2114,7 @@ TARGET(DICT_UPDATE) { PyObject *update = stack_pointer[-1]; - #line 1522 "Python/bytecodes.c" + #line 1523 "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)) { @@ -2124,7 +2124,7 @@ } #line 2126 "Python/generated_cases.c.h" Py_DECREF(update); - #line 1530 "Python/bytecodes.c" + #line 1531 "Python/bytecodes.c" if (true) goto pop_1_error; } #line 2131 "Python/generated_cases.c.h" @@ -2135,14 +2135,14 @@ TARGET(DICT_MERGE) { PyObject *update = stack_pointer[-1]; - #line 1536 "Python/bytecodes.c" + #line 1537 "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 2144 "Python/generated_cases.c.h" Py_DECREF(update); - #line 1541 "Python/bytecodes.c" + #line 1542 "Python/bytecodes.c" if (true) goto pop_1_error; } #line 2149 "Python/generated_cases.c.h" @@ -2155,7 +2155,7 @@ TARGET(MAP_ADD) { PyObject *value = stack_pointer[-1]; PyObject *key = stack_pointer[-2]; - #line 1548 "Python/bytecodes.c" + #line 1549 "Python/bytecodes.c" PyObject *dict = PEEK(oparg + 2); // key, value are still on the stack assert(PyDict_CheckExact(dict)); /* dict[key] = value */ @@ -2167,13 +2167,59 @@ DISPATCH(); } + TARGET(LOAD_SUPER_ATTR) { + PyObject *self = stack_pointer[-1]; + PyObject *class = stack_pointer[-2]; + PyObject *global_super = stack_pointer[-3]; + PyObject *res2 = NULL; + PyObject *res; + #line 1558 "Python/bytecodes.c" + PyObject *name = GETITEM(frame->f_code->co_names, oparg >> 2); + if (global_super == (PyObject *)&PySuper_Type && PyType_Check(class)) { + int method = 0; + Py_DECREF(global_super); + res = _PySuper_Lookup((PyTypeObject *)class, self, name, oparg & 1 ? &method : NULL); + Py_DECREF(class); + if (res == NULL) { + Py_DECREF(self); + if (true) goto pop_3_error; + } + // Works with CALL, pushes two values: either `meth | self` or `NULL | meth`. + if (method) { + res2 = res; + res = self; // transfer ownership + } else { + res2 = NULL; + Py_DECREF(self); + } + } else { + PyObject *stack[] = {class, self}; + PyObject *super = PyObject_Vectorcall(global_super, stack, oparg & 2, NULL); + #line 2199 "Python/generated_cases.c.h" + Py_DECREF(global_super); + Py_DECREF(class); + Py_DECREF(self); + #line 1580 "Python/bytecodes.c" + if (super == NULL) goto pop_3_error; + res = PyObject_GetAttr(super, name); + Py_DECREF(super); + if (res == NULL) goto pop_3_error; + } + #line 2209 "Python/generated_cases.c.h" + STACK_SHRINK(2); + STACK_GROW(((oparg & 1) ? 1 : 0)); + stack_pointer[-1] = res; + if (oparg & 1) { stack_pointer[-(1 + ((oparg & 1) ? 1 : 0))] = res2; } + DISPATCH(); + } + TARGET(LOAD_ATTR) { PREDICTED(LOAD_ATTR); static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size"); PyObject *owner = stack_pointer[-1]; PyObject *res2 = NULL; PyObject *res; - #line 1571 "Python/bytecodes.c" + #line 1602 "Python/bytecodes.c" #if ENABLE_SPECIALIZATION _PyAttrCache *cache = (_PyAttrCache *)next_instr; if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) { @@ -2207,9 +2253,9 @@ NULL | meth | arg1 | ... | argN */ - #line 2211 "Python/generated_cases.c.h" + #line 2257 "Python/generated_cases.c.h" Py_DECREF(owner); - #line 1605 "Python/bytecodes.c" + #line 1636 "Python/bytecodes.c" if (meth == NULL) goto pop_1_error; res2 = NULL; res = meth; @@ -2218,12 +2264,12 @@ else { /* Classic, pushes one value. */ res = PyObject_GetAttr(owner, name); - #line 2222 "Python/generated_cases.c.h" + #line 2268 "Python/generated_cases.c.h" Py_DECREF(owner); - #line 1614 "Python/bytecodes.c" + #line 1645 "Python/bytecodes.c" if (res == NULL) goto pop_1_error; } - #line 2227 "Python/generated_cases.c.h" + #line 2273 "Python/generated_cases.c.h" STACK_GROW(((oparg & 1) ? 1 : 0)); stack_pointer[-1] = res; if (oparg & 1) { stack_pointer[-(1 + ((oparg & 1) ? 1 : 0))] = res2; } @@ -2237,7 +2283,7 @@ PyObject *res; uint32_t type_version = read_u32(&next_instr[1].cache); uint16_t index = read_u16(&next_instr[3].cache); - #line 1619 "Python/bytecodes.c" + #line 1650 "Python/bytecodes.c" PyTypeObject *tp = Py_TYPE(owner); assert(type_version != 0); DEOPT_IF(tp->tp_version_tag != type_version, LOAD_ATTR); @@ -2250,7 +2296,7 @@ STAT_INC(LOAD_ATTR, hit); Py_INCREF(res); res2 = NULL; - #line 2254 "Python/generated_cases.c.h" + #line 2300 "Python/generated_cases.c.h" Py_DECREF(owner); STACK_GROW(((oparg & 1) ? 1 : 0)); stack_pointer[-1] = res; @@ -2265,7 +2311,7 @@ PyObject *res; uint32_t type_version = read_u32(&next_instr[1].cache); uint16_t index = read_u16(&next_instr[3].cache); - #line 1635 "Python/bytecodes.c" + #line 1666 "Python/bytecodes.c" DEOPT_IF(!PyModule_CheckExact(owner), LOAD_ATTR); PyDictObject *dict = (PyDictObject *)((PyModuleObject *)owner)->md_dict; assert(dict != NULL); @@ -2278,7 +2324,7 @@ STAT_INC(LOAD_ATTR, hit); Py_INCREF(res); res2 = NULL; - #line 2282 "Python/generated_cases.c.h" + #line 2328 "Python/generated_cases.c.h" Py_DECREF(owner); STACK_GROW(((oparg & 1) ? 1 : 0)); stack_pointer[-1] = res; @@ -2293,7 +2339,7 @@ PyObject *res; uint32_t type_version = read_u32(&next_instr[1].cache); uint16_t index = read_u16(&next_instr[3].cache); - #line 1651 "Python/bytecodes.c" + #line 1682 "Python/bytecodes.c" PyTypeObject *tp = Py_TYPE(owner); assert(type_version != 0); DEOPT_IF(tp->tp_version_tag != type_version, LOAD_ATTR); @@ -2320,7 +2366,7 @@ STAT_INC(LOAD_ATTR, hit); Py_INCREF(res); res2 = NULL; - #line 2324 "Python/generated_cases.c.h" + #line 2370 "Python/generated_cases.c.h" Py_DECREF(owner); STACK_GROW(((oparg & 1) ? 1 : 0)); stack_pointer[-1] = res; @@ -2335,7 +2381,7 @@ PyObject *res; uint32_t type_version = read_u32(&next_instr[1].cache); uint16_t index = read_u16(&next_instr[3].cache); - #line 1681 "Python/bytecodes.c" + #line 1712 "Python/bytecodes.c" PyTypeObject *tp = Py_TYPE(owner); assert(type_version != 0); DEOPT_IF(tp->tp_version_tag != type_version, LOAD_ATTR); @@ -2345,7 +2391,7 @@ STAT_INC(LOAD_ATTR, hit); Py_INCREF(res); res2 = NULL; - #line 2349 "Python/generated_cases.c.h" + #line 2395 "Python/generated_cases.c.h" Py_DECREF(owner); STACK_GROW(((oparg & 1) ? 1 : 0)); stack_pointer[-1] = res; @@ -2360,7 +2406,7 @@ PyObject *res; uint32_t type_version = read_u32(&next_instr[1].cache); PyObject *descr = read_obj(&next_instr[5].cache); - #line 1694 "Python/bytecodes.c" + #line 1725 "Python/bytecodes.c" DEOPT_IF(!PyType_Check(cls), LOAD_ATTR); DEOPT_IF(((PyTypeObject *)cls)->tp_version_tag != type_version, @@ -2372,7 +2418,7 @@ res = descr; assert(res != NULL); Py_INCREF(res); - #line 2376 "Python/generated_cases.c.h" + #line 2422 "Python/generated_cases.c.h" Py_DECREF(cls); STACK_GROW(((oparg & 1) ? 1 : 0)); stack_pointer[-1] = res; @@ -2386,7 +2432,7 @@ uint32_t type_version = read_u32(&next_instr[1].cache); uint32_t func_version = read_u32(&next_instr[3].cache); PyObject *fget = read_obj(&next_instr[5].cache); - #line 1709 "Python/bytecodes.c" + #line 1740 "Python/bytecodes.c" DEOPT_IF(tstate->interp->eval_frame, LOAD_ATTR); PyTypeObject *cls = Py_TYPE(owner); @@ -2410,7 +2456,7 @@ JUMPBY(INLINE_CACHE_ENTRIES_LOAD_ATTR); frame->return_offset = 0; DISPATCH_INLINED(new_frame); - #line 2414 "Python/generated_cases.c.h" + #line 2460 "Python/generated_cases.c.h" } TARGET(LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN) { @@ -2418,7 +2464,7 @@ uint32_t type_version = read_u32(&next_instr[1].cache); uint32_t func_version = read_u32(&next_instr[3].cache); PyObject *getattribute = read_obj(&next_instr[5].cache); - #line 1735 "Python/bytecodes.c" + #line 1766 "Python/bytecodes.c" DEOPT_IF(tstate->interp->eval_frame, LOAD_ATTR); PyTypeObject *cls = Py_TYPE(owner); DEOPT_IF(cls->tp_version_tag != type_version, LOAD_ATTR); @@ -2444,7 +2490,7 @@ JUMPBY(INLINE_CACHE_ENTRIES_LOAD_ATTR); frame->return_offset = 0; DISPATCH_INLINED(new_frame); - #line 2448 "Python/generated_cases.c.h" + #line 2494 "Python/generated_cases.c.h" } TARGET(STORE_ATTR_INSTANCE_VALUE) { @@ -2452,7 +2498,7 @@ PyObject *value = stack_pointer[-2]; uint32_t type_version = read_u32(&next_instr[1].cache); uint16_t index = read_u16(&next_instr[3].cache); - #line 1763 "Python/bytecodes.c" + #line 1794 "Python/bytecodes.c" PyTypeObject *tp = Py_TYPE(owner); assert(type_version != 0); DEOPT_IF(tp->tp_version_tag != type_version, STORE_ATTR); @@ -2470,7 +2516,7 @@ Py_DECREF(old_value); } Py_DECREF(owner); - #line 2474 "Python/generated_cases.c.h" + #line 2520 "Python/generated_cases.c.h" STACK_SHRINK(2); next_instr += 4; DISPATCH(); @@ -2481,7 +2527,7 @@ PyObject *value = stack_pointer[-2]; uint32_t type_version = read_u32(&next_instr[1].cache); uint16_t hint = read_u16(&next_instr[3].cache); - #line 1783 "Python/bytecodes.c" + #line 1814 "Python/bytecodes.c" PyTypeObject *tp = Py_TYPE(owner); assert(type_version != 0); DEOPT_IF(tp->tp_version_tag != type_version, STORE_ATTR); @@ -2520,7 +2566,7 @@ /* PEP 509 */ dict->ma_version_tag = new_version; Py_DECREF(owner); - #line 2524 "Python/generated_cases.c.h" + #line 2570 "Python/generated_cases.c.h" STACK_SHRINK(2); next_instr += 4; DISPATCH(); @@ -2531,7 +2577,7 @@ PyObject *value = stack_pointer[-2]; uint32_t type_version = read_u32(&next_instr[1].cache); uint16_t index = read_u16(&next_instr[3].cache); - #line 1824 "Python/bytecodes.c" + #line 1855 "Python/bytecodes.c" PyTypeObject *tp = Py_TYPE(owner); assert(type_version != 0); DEOPT_IF(tp->tp_version_tag != type_version, STORE_ATTR); @@ -2541,7 +2587,7 @@ *(PyObject **)addr = value; Py_XDECREF(old_value); Py_DECREF(owner); - #line 2545 "Python/generated_cases.c.h" + #line 2591 "Python/generated_cases.c.h" STACK_SHRINK(2); next_instr += 4; DISPATCH(); @@ -2553,7 +2599,7 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *res; - #line 1843 "Python/bytecodes.c" + #line 1874 "Python/bytecodes.c" #if ENABLE_SPECIALIZATION _PyCompareOpCache *cache = (_PyCompareOpCache *)next_instr; if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) { @@ -2566,12 +2612,12 @@ #endif /* ENABLE_SPECIALIZATION */ assert((oparg >> 4) <= Py_GE); res = PyObject_RichCompare(left, right, oparg>>4); - #line 2570 "Python/generated_cases.c.h" + #line 2616 "Python/generated_cases.c.h" Py_DECREF(left); Py_DECREF(right); - #line 1856 "Python/bytecodes.c" + #line 1887 "Python/bytecodes.c" if (res == NULL) goto pop_2_error; - #line 2575 "Python/generated_cases.c.h" + #line 2621 "Python/generated_cases.c.h" STACK_SHRINK(1); stack_pointer[-1] = res; next_instr += 1; @@ -2582,7 +2628,7 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *res; - #line 1860 "Python/bytecodes.c" + #line 1891 "Python/bytecodes.c" DEOPT_IF(!PyFloat_CheckExact(left), COMPARE_OP); DEOPT_IF(!PyFloat_CheckExact(right), COMPARE_OP); STAT_INC(COMPARE_OP, hit); @@ -2594,7 +2640,7 @@ _Py_DECREF_SPECIALIZED(right, _PyFloat_ExactDealloc); res = (sign_ish & oparg) ? Py_True : Py_False; Py_INCREF(res); - #line 2598 "Python/generated_cases.c.h" + #line 2644 "Python/generated_cases.c.h" STACK_SHRINK(1); stack_pointer[-1] = res; next_instr += 1; @@ -2605,7 +2651,7 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *res; - #line 1875 "Python/bytecodes.c" + #line 1906 "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); @@ -2621,7 +2667,7 @@ _Py_DECREF_SPECIALIZED(right, (destructor)PyObject_Free); res = (sign_ish & oparg) ? Py_True : Py_False; Py_INCREF(res); - #line 2625 "Python/generated_cases.c.h" + #line 2671 "Python/generated_cases.c.h" STACK_SHRINK(1); stack_pointer[-1] = res; next_instr += 1; @@ -2632,7 +2678,7 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *res; - #line 1894 "Python/bytecodes.c" + #line 1925 "Python/bytecodes.c" DEOPT_IF(!PyUnicode_CheckExact(left), COMPARE_OP); DEOPT_IF(!PyUnicode_CheckExact(right), COMPARE_OP); STAT_INC(COMPARE_OP, hit); @@ -2645,7 +2691,7 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? Py_True : Py_False; Py_INCREF(res); - #line 2649 "Python/generated_cases.c.h" + #line 2695 "Python/generated_cases.c.h" STACK_SHRINK(1); stack_pointer[-1] = res; next_instr += 1; @@ -2656,14 +2702,14 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *b; - #line 1909 "Python/bytecodes.c" + #line 1940 "Python/bytecodes.c" int res = Py_Is(left, right) ^ oparg; - #line 2662 "Python/generated_cases.c.h" + #line 2708 "Python/generated_cases.c.h" Py_DECREF(left); Py_DECREF(right); - #line 1911 "Python/bytecodes.c" + #line 1942 "Python/bytecodes.c" b = Py_NewRef(res ? Py_True : Py_False); - #line 2667 "Python/generated_cases.c.h" + #line 2713 "Python/generated_cases.c.h" STACK_SHRINK(1); stack_pointer[-1] = b; DISPATCH(); @@ -2673,15 +2719,15 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *b; - #line 1915 "Python/bytecodes.c" + #line 1946 "Python/bytecodes.c" int res = PySequence_Contains(right, left); - #line 2679 "Python/generated_cases.c.h" + #line 2725 "Python/generated_cases.c.h" Py_DECREF(left); Py_DECREF(right); - #line 1917 "Python/bytecodes.c" + #line 1948 "Python/bytecodes.c" if (res < 0) goto pop_2_error; b = Py_NewRef((res^oparg) ? Py_True : Py_False); - #line 2685 "Python/generated_cases.c.h" + #line 2731 "Python/generated_cases.c.h" STACK_SHRINK(1); stack_pointer[-1] = b; DISPATCH(); @@ -2692,12 +2738,12 @@ PyObject *exc_value = stack_pointer[-2]; PyObject *rest; PyObject *match; - #line 1922 "Python/bytecodes.c" + #line 1953 "Python/bytecodes.c" if (check_except_star_type_valid(tstate, match_type) < 0) { - #line 2698 "Python/generated_cases.c.h" + #line 2744 "Python/generated_cases.c.h" Py_DECREF(exc_value); Py_DECREF(match_type); - #line 1924 "Python/bytecodes.c" + #line 1955 "Python/bytecodes.c" if (true) goto pop_2_error; } @@ -2705,10 +2751,10 @@ rest = NULL; int res = exception_group_match(exc_value, match_type, &match, &rest); - #line 2709 "Python/generated_cases.c.h" + #line 2755 "Python/generated_cases.c.h" Py_DECREF(exc_value); Py_DECREF(match_type); - #line 1932 "Python/bytecodes.c" + #line 1963 "Python/bytecodes.c" if (res < 0) goto pop_2_error; assert((match == NULL) == (rest == NULL)); @@ -2717,7 +2763,7 @@ if (!Py_IsNone(match)) { PyErr_SetHandledException(match); } - #line 2721 "Python/generated_cases.c.h" + #line 2767 "Python/generated_cases.c.h" stack_pointer[-1] = match; stack_pointer[-2] = rest; DISPATCH(); @@ -2727,21 +2773,21 @@ PyObject *right = stack_pointer[-1]; PyObject *left = stack_pointer[-2]; PyObject *b; - #line 1943 "Python/bytecodes.c" + #line 1974 "Python/bytecodes.c" assert(PyExceptionInstance_Check(left)); if (check_except_type_valid(tstate, right) < 0) { - #line 2734 "Python/generated_cases.c.h" + #line 2780 "Python/generated_cases.c.h" Py_DECREF(right); - #line 1946 "Python/bytecodes.c" + #line 1977 "Python/bytecodes.c" if (true) goto pop_1_error; } int res = PyErr_GivenExceptionMatches(left, right); - #line 2741 "Python/generated_cases.c.h" + #line 2787 "Python/generated_cases.c.h" Py_DECREF(right); - #line 1951 "Python/bytecodes.c" + #line 1982 "Python/bytecodes.c" b = Py_NewRef(res ? Py_True : Py_False); - #line 2745 "Python/generated_cases.c.h" + #line 2791 "Python/generated_cases.c.h" stack_pointer[-1] = b; DISPATCH(); } @@ -2750,15 +2796,15 @@ PyObject *fromlist = stack_pointer[-1]; PyObject *level = stack_pointer[-2]; PyObject *res; - #line 1955 "Python/bytecodes.c" + #line 1986 "Python/bytecodes.c" PyObject *name = GETITEM(frame->f_code->co_names, oparg); res = import_name(tstate, frame, name, fromlist, level); - #line 2757 "Python/generated_cases.c.h" + #line 2803 "Python/generated_cases.c.h" Py_DECREF(level); Py_DECREF(fromlist); - #line 1958 "Python/bytecodes.c" + #line 1989 "Python/bytecodes.c" if (res == NULL) goto pop_2_error; - #line 2762 "Python/generated_cases.c.h" + #line 2808 "Python/generated_cases.c.h" STACK_SHRINK(1); stack_pointer[-1] = res; DISPATCH(); @@ -2767,29 +2813,29 @@ TARGET(IMPORT_FROM) { PyObject *from = stack_pointer[-1]; PyObject *res; - #line 1962 "Python/bytecodes.c" + #line 1993 "Python/bytecodes.c" PyObject *name = GETITEM(frame->f_code->co_names, oparg); res = import_from(tstate, from, name); if (res == NULL) goto error; - #line 2775 "Python/generated_cases.c.h" + #line 2821 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = res; DISPATCH(); } TARGET(JUMP_FORWARD) { - #line 1968 "Python/bytecodes.c" + #line 1999 "Python/bytecodes.c" JUMPBY(oparg); - #line 2784 "Python/generated_cases.c.h" + #line 2830 "Python/generated_cases.c.h" DISPATCH(); } TARGET(JUMP_BACKWARD) { PREDICTED(JUMP_BACKWARD); - #line 1972 "Python/bytecodes.c" + #line 2003 "Python/bytecodes.c" assert(oparg < INSTR_OFFSET()); JUMPBY(-oparg); - #line 2793 "Python/generated_cases.c.h" + #line 2839 "Python/generated_cases.c.h" CHECK_EVAL_BREAKER(); DISPATCH(); } @@ -2797,7 +2843,7 @@ TARGET(POP_JUMP_IF_FALSE) { PREDICTED(POP_JUMP_IF_FALSE); PyObject *cond = stack_pointer[-1]; - #line 1978 "Python/bytecodes.c" + #line 2009 "Python/bytecodes.c" if (Py_IsTrue(cond)) { _Py_DECREF_NO_DEALLOC(cond); } @@ -2807,9 +2853,9 @@ } else { int err = PyObject_IsTrue(cond); - #line 2811 "Python/generated_cases.c.h" + #line 2857 "Python/generated_cases.c.h" Py_DECREF(cond); - #line 1988 "Python/bytecodes.c" + #line 2019 "Python/bytecodes.c" if (err == 0) { JUMPBY(oparg); } @@ -2817,14 +2863,14 @@ if (err < 0) goto pop_1_error; } } - #line 2821 "Python/generated_cases.c.h" + #line 2867 "Python/generated_cases.c.h" STACK_SHRINK(1); DISPATCH(); } TARGET(POP_JUMP_IF_TRUE) { PyObject *cond = stack_pointer[-1]; - #line 1998 "Python/bytecodes.c" + #line 2029 "Python/bytecodes.c" if (Py_IsFalse(cond)) { _Py_DECREF_NO_DEALLOC(cond); } @@ -2834,9 +2880,9 @@ } else { int err = PyObject_IsTrue(cond); - #line 2838 "Python/generated_cases.c.h" + #line 2884 "Python/generated_cases.c.h" Py_DECREF(cond); - #line 2008 "Python/bytecodes.c" + #line 2039 "Python/bytecodes.c" if (err > 0) { JUMPBY(oparg); } @@ -2844,67 +2890,67 @@ if (err < 0) goto pop_1_error; } } - #line 2848 "Python/generated_cases.c.h" + #line 2894 "Python/generated_cases.c.h" STACK_SHRINK(1); DISPATCH(); } TARGET(POP_JUMP_IF_NOT_NONE) { PyObject *value = stack_pointer[-1]; - #line 2018 "Python/bytecodes.c" + #line 2049 "Python/bytecodes.c" if (!Py_IsNone(value)) { - #line 2857 "Python/generated_cases.c.h" + #line 2903 "Python/generated_cases.c.h" Py_DECREF(value); - #line 2020 "Python/bytecodes.c" + #line 2051 "Python/bytecodes.c" JUMPBY(oparg); } else { _Py_DECREF_NO_DEALLOC(value); } - #line 2865 "Python/generated_cases.c.h" + #line 2911 "Python/generated_cases.c.h" STACK_SHRINK(1); DISPATCH(); } TARGET(POP_JUMP_IF_NONE) { PyObject *value = stack_pointer[-1]; - #line 2028 "Python/bytecodes.c" + #line 2059 "Python/bytecodes.c" if (Py_IsNone(value)) { _Py_DECREF_NO_DEALLOC(value); JUMPBY(oparg); } else { - #line 2878 "Python/generated_cases.c.h" + #line 2924 "Python/generated_cases.c.h" Py_DECREF(value); - #line 2034 "Python/bytecodes.c" + #line 2065 "Python/bytecodes.c" } - #line 2882 "Python/generated_cases.c.h" + #line 2928 "Python/generated_cases.c.h" STACK_SHRINK(1); DISPATCH(); } TARGET(JUMP_BACKWARD_NO_INTERRUPT) { - #line 2038 "Python/bytecodes.c" + #line 2069 "Python/bytecodes.c" /* This bytecode is used in the `yield from` or `await` loop. * If there is an interrupt, we want it handled in the innermost * generator or coroutine, so we deliberately do not check it here. * (see bpo-30039). */ JUMPBY(-oparg); - #line 2895 "Python/generated_cases.c.h" + #line 2941 "Python/generated_cases.c.h" DISPATCH(); } TARGET(GET_LEN) { PyObject *obj = stack_pointer[-1]; PyObject *len_o; - #line 2047 "Python/bytecodes.c" + #line 2078 "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 2908 "Python/generated_cases.c.h" + #line 2954 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = len_o; DISPATCH(); @@ -2915,16 +2961,16 @@ PyObject *type = stack_pointer[-2]; PyObject *subject = stack_pointer[-3]; PyObject *attrs; - #line 2055 "Python/bytecodes.c" + #line 2086 "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 2924 "Python/generated_cases.c.h" + #line 2970 "Python/generated_cases.c.h" Py_DECREF(subject); Py_DECREF(type); Py_DECREF(names); - #line 2060 "Python/bytecodes.c" + #line 2091 "Python/bytecodes.c" if (attrs) { assert(PyTuple_CheckExact(attrs)); // Success! } @@ -2932,7 +2978,7 @@ if (_PyErr_Occurred(tstate)) goto pop_3_error; attrs = Py_NewRef(Py_None); // Failure! } - #line 2936 "Python/generated_cases.c.h" + #line 2982 "Python/generated_cases.c.h" STACK_SHRINK(2); stack_pointer[-1] = attrs; DISPATCH(); @@ -2941,10 +2987,10 @@ TARGET(MATCH_MAPPING) { PyObject *subject = stack_pointer[-1]; PyObject *res; - #line 2070 "Python/bytecodes.c" + #line 2101 "Python/bytecodes.c" int match = Py_TYPE(subject)->tp_flags & Py_TPFLAGS_MAPPING; res = Py_NewRef(match ? Py_True : Py_False); - #line 2948 "Python/generated_cases.c.h" + #line 2994 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = res; PREDICT(POP_JUMP_IF_FALSE); @@ -2954,10 +3000,10 @@ TARGET(MATCH_SEQUENCE) { PyObject *subject = stack_pointer[-1]; PyObject *res; - #line 2076 "Python/bytecodes.c" + #line 2107 "Python/bytecodes.c" int match = Py_TYPE(subject)->tp_flags & Py_TPFLAGS_SEQUENCE; res = Py_NewRef(match ? Py_True : Py_False); - #line 2961 "Python/generated_cases.c.h" + #line 3007 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = res; PREDICT(POP_JUMP_IF_FALSE); @@ -2968,11 +3014,11 @@ PyObject *keys = stack_pointer[-1]; PyObject *subject = stack_pointer[-2]; PyObject *values_or_none; - #line 2082 "Python/bytecodes.c" + #line 2113 "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 2976 "Python/generated_cases.c.h" + #line 3022 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = values_or_none; DISPATCH(); @@ -2981,14 +3027,14 @@ TARGET(GET_ITER) { PyObject *iterable = stack_pointer[-1]; PyObject *iter; - #line 2088 "Python/bytecodes.c" + #line 2119 "Python/bytecodes.c" /* before: [obj]; after [getiter(obj)] */ iter = PyObject_GetIter(iterable); - #line 2988 "Python/generated_cases.c.h" + #line 3034 "Python/generated_cases.c.h" Py_DECREF(iterable); - #line 2091 "Python/bytecodes.c" + #line 2122 "Python/bytecodes.c" if (iter == NULL) goto pop_1_error; - #line 2992 "Python/generated_cases.c.h" + #line 3038 "Python/generated_cases.c.h" stack_pointer[-1] = iter; DISPATCH(); } @@ -2996,7 +3042,7 @@ TARGET(GET_YIELD_FROM_ITER) { PyObject *iterable = stack_pointer[-1]; PyObject *iter; - #line 2095 "Python/bytecodes.c" + #line 2126 "Python/bytecodes.c" /* before: [obj]; after [getiter(obj)] */ if (PyCoro_CheckExact(iterable)) { /* `iterable` is a coroutine */ @@ -3019,11 +3065,11 @@ if (iter == NULL) { goto error; } - #line 3023 "Python/generated_cases.c.h" + #line 3069 "Python/generated_cases.c.h" Py_DECREF(iterable); - #line 2118 "Python/bytecodes.c" + #line 2149 "Python/bytecodes.c" } - #line 3027 "Python/generated_cases.c.h" + #line 3073 "Python/generated_cases.c.h" stack_pointer[-1] = iter; PREDICT(LOAD_CONST); DISPATCH(); @@ -3034,7 +3080,7 @@ static_assert(INLINE_CACHE_ENTRIES_FOR_ITER == 1, "incorrect cache size"); PyObject *iter = stack_pointer[-1]; PyObject *next; - #line 2137 "Python/bytecodes.c" + #line 2168 "Python/bytecodes.c" #if ENABLE_SPECIALIZATION _PyForIterCache *cache = (_PyForIterCache *)next_instr; if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) { @@ -3065,7 +3111,7 @@ DISPATCH(); } // Common case: no jump, leave it to the code generator - #line 3069 "Python/generated_cases.c.h" + #line 3115 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = next; next_instr += 1; @@ -3073,7 +3119,7 @@ } TARGET(INSTRUMENTED_FOR_ITER) { - #line 2170 "Python/bytecodes.c" + #line 2201 "Python/bytecodes.c" _Py_CODEUNIT *here = next_instr-1; _Py_CODEUNIT *target; PyObject *iter = TOP(); @@ -3099,14 +3145,14 @@ target = next_instr + INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1; } INSTRUMENTED_JUMP(here, target, PY_MONITORING_EVENT_BRANCH); - #line 3103 "Python/generated_cases.c.h" + #line 3149 "Python/generated_cases.c.h" DISPATCH(); } TARGET(FOR_ITER_LIST) { PyObject *iter = stack_pointer[-1]; PyObject *next; - #line 2198 "Python/bytecodes.c" + #line 2229 "Python/bytecodes.c" DEOPT_IF(Py_TYPE(iter) != &PyListIter_Type, FOR_ITER); _PyListIterObject *it = (_PyListIterObject *)iter; STAT_INC(FOR_ITER, hit); @@ -3126,7 +3172,7 @@ DISPATCH(); end_for_iter_list: // Common case: no jump, leave it to the code generator - #line 3130 "Python/generated_cases.c.h" + #line 3176 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = next; next_instr += 1; @@ -3136,7 +3182,7 @@ TARGET(FOR_ITER_TUPLE) { PyObject *iter = stack_pointer[-1]; PyObject *next; - #line 2220 "Python/bytecodes.c" + #line 2251 "Python/bytecodes.c" _PyTupleIterObject *it = (_PyTupleIterObject *)iter; DEOPT_IF(Py_TYPE(it) != &PyTupleIter_Type, FOR_ITER); STAT_INC(FOR_ITER, hit); @@ -3156,7 +3202,7 @@ DISPATCH(); end_for_iter_tuple: // Common case: no jump, leave it to the code generator - #line 3160 "Python/generated_cases.c.h" + #line 3206 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = next; next_instr += 1; @@ -3166,7 +3212,7 @@ TARGET(FOR_ITER_RANGE) { PyObject *iter = stack_pointer[-1]; PyObject *next; - #line 2242 "Python/bytecodes.c" + #line 2273 "Python/bytecodes.c" _PyRangeIterObject *r = (_PyRangeIterObject *)iter; DEOPT_IF(Py_TYPE(r) != &PyRangeIter_Type, FOR_ITER); STAT_INC(FOR_ITER, hit); @@ -3184,7 +3230,7 @@ if (next == NULL) { goto error; } - #line 3188 "Python/generated_cases.c.h" + #line 3234 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = next; next_instr += 1; @@ -3193,7 +3239,7 @@ TARGET(FOR_ITER_GEN) { PyObject *iter = stack_pointer[-1]; - #line 2262 "Python/bytecodes.c" + #line 2293 "Python/bytecodes.c" PyGenObject *gen = (PyGenObject *)iter; DEOPT_IF(Py_TYPE(gen) != &PyGen_Type, FOR_ITER); DEOPT_IF(gen->gi_frame_state >= FRAME_EXECUTING, FOR_ITER); @@ -3208,14 +3254,14 @@ assert(next_instr[oparg].op.code == END_FOR || next_instr[oparg].op.code == INSTRUMENTED_END_FOR); DISPATCH_INLINED(gen_frame); - #line 3212 "Python/generated_cases.c.h" + #line 3258 "Python/generated_cases.c.h" } TARGET(BEFORE_ASYNC_WITH) { PyObject *mgr = stack_pointer[-1]; PyObject *exit; PyObject *res; - #line 2279 "Python/bytecodes.c" + #line 2310 "Python/bytecodes.c" PyObject *enter = _PyObject_LookupSpecial(mgr, &_Py_ID(__aenter__)); if (enter == NULL) { if (!_PyErr_Occurred(tstate)) { @@ -3238,16 +3284,16 @@ Py_DECREF(enter); goto error; } - #line 3242 "Python/generated_cases.c.h" + #line 3288 "Python/generated_cases.c.h" Py_DECREF(mgr); - #line 2302 "Python/bytecodes.c" + #line 2333 "Python/bytecodes.c" res = _PyObject_CallNoArgs(enter); Py_DECREF(enter); if (res == NULL) { Py_DECREF(exit); if (true) goto pop_1_error; } - #line 3251 "Python/generated_cases.c.h" + #line 3297 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = res; stack_pointer[-2] = exit; @@ -3259,7 +3305,7 @@ PyObject *mgr = stack_pointer[-1]; PyObject *exit; PyObject *res; - #line 2312 "Python/bytecodes.c" + #line 2343 "Python/bytecodes.c" /* pop the context manager, push its __exit__ and the * value returned from calling its __enter__ */ @@ -3285,16 +3331,16 @@ Py_DECREF(enter); goto error; } - #line 3289 "Python/generated_cases.c.h" + #line 3335 "Python/generated_cases.c.h" Py_DECREF(mgr); - #line 2338 "Python/bytecodes.c" + #line 2369 "Python/bytecodes.c" res = _PyObject_CallNoArgs(enter); Py_DECREF(enter); if (res == NULL) { Py_DECREF(exit); if (true) goto pop_1_error; } - #line 3298 "Python/generated_cases.c.h" + #line 3344 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = res; stack_pointer[-2] = exit; @@ -3306,7 +3352,7 @@ PyObject *lasti = stack_pointer[-3]; PyObject *exit_func = stack_pointer[-4]; PyObject *res; - #line 2347 "Python/bytecodes.c" + #line 2378 "Python/bytecodes.c" /* At the top of the stack are 4 values: - val: TOP = exc_info() - unused: SECOND = previous exception @@ -3327,7 +3373,7 @@ res = PyObject_Vectorcall(exit_func, stack + 1, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); if (res == NULL) goto error; - #line 3331 "Python/generated_cases.c.h" + #line 3377 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = res; DISPATCH(); @@ -3336,7 +3382,7 @@ TARGET(PUSH_EXC_INFO) { PyObject *new_exc = stack_pointer[-1]; PyObject *prev_exc; - #line 2370 "Python/bytecodes.c" + #line 2401 "Python/bytecodes.c" _PyErr_StackItem *exc_info = tstate->exc_info; if (exc_info->exc_value != NULL) { prev_exc = exc_info->exc_value; @@ -3346,7 +3392,7 @@ } assert(PyExceptionInstance_Check(new_exc)); exc_info->exc_value = Py_NewRef(new_exc); - #line 3350 "Python/generated_cases.c.h" + #line 3396 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = new_exc; stack_pointer[-2] = prev_exc; @@ -3360,7 +3406,7 @@ uint32_t type_version = read_u32(&next_instr[1].cache); uint32_t keys_version = read_u32(&next_instr[3].cache); PyObject *descr = read_obj(&next_instr[5].cache); - #line 2382 "Python/bytecodes.c" + #line 2413 "Python/bytecodes.c" /* Cached method object */ PyTypeObject *self_cls = Py_TYPE(self); assert(type_version != 0); @@ -3377,7 +3423,7 @@ assert(_PyType_HasFeature(Py_TYPE(res2), Py_TPFLAGS_METHOD_DESCRIPTOR)); res = self; assert(oparg & 1); - #line 3381 "Python/generated_cases.c.h" + #line 3427 "Python/generated_cases.c.h" STACK_GROW(((oparg & 1) ? 1 : 0)); stack_pointer[-1] = res; if (oparg & 1) { stack_pointer[-(1 + ((oparg & 1) ? 1 : 0))] = res2; } @@ -3391,7 +3437,7 @@ PyObject *res; uint32_t type_version = read_u32(&next_instr[1].cache); PyObject *descr = read_obj(&next_instr[5].cache); - #line 2401 "Python/bytecodes.c" + #line 2432 "Python/bytecodes.c" PyTypeObject *self_cls = Py_TYPE(self); DEOPT_IF(self_cls->tp_version_tag != type_version, LOAD_ATTR); assert(self_cls->tp_dictoffset == 0); @@ -3401,7 +3447,7 @@ res2 = Py_NewRef(descr); res = self; assert(oparg & 1); - #line 3405 "Python/generated_cases.c.h" + #line 3451 "Python/generated_cases.c.h" STACK_GROW(((oparg & 1) ? 1 : 0)); stack_pointer[-1] = res; if (oparg & 1) { stack_pointer[-(1 + ((oparg & 1) ? 1 : 0))] = res2; } @@ -3415,7 +3461,7 @@ PyObject *res; uint32_t type_version = read_u32(&next_instr[1].cache); PyObject *descr = read_obj(&next_instr[5].cache); - #line 2413 "Python/bytecodes.c" + #line 2444 "Python/bytecodes.c" PyTypeObject *self_cls = Py_TYPE(self); DEOPT_IF(self_cls->tp_version_tag != type_version, LOAD_ATTR); Py_ssize_t dictoffset = self_cls->tp_dictoffset; @@ -3429,7 +3475,7 @@ res2 = Py_NewRef(descr); res = self; assert(oparg & 1); - #line 3433 "Python/generated_cases.c.h" + #line 3479 "Python/generated_cases.c.h" STACK_GROW(((oparg & 1) ? 1 : 0)); stack_pointer[-1] = res; if (oparg & 1) { stack_pointer[-(1 + ((oparg & 1) ? 1 : 0))] = res2; } @@ -3438,16 +3484,16 @@ } TARGET(KW_NAMES) { - #line 2429 "Python/bytecodes.c" + #line 2460 "Python/bytecodes.c" assert(kwnames == NULL); assert(oparg < PyTuple_GET_SIZE(frame->f_code->co_consts)); kwnames = GETITEM(frame->f_code->co_consts, oparg); - #line 3446 "Python/generated_cases.c.h" + #line 3492 "Python/generated_cases.c.h" DISPATCH(); } TARGET(INSTRUMENTED_CALL) { - #line 2435 "Python/bytecodes.c" + #line 2466 "Python/bytecodes.c" int is_meth = PEEK(oparg+2) != NULL; int total_args = oparg + is_meth; PyObject *function = PEEK(total_args + 1); @@ -3460,7 +3506,7 @@ _PyCallCache *cache = (_PyCallCache *)next_instr; INCREMENT_ADAPTIVE_COUNTER(cache->counter); GO_TO_INSTRUCTION(CALL); - #line 3464 "Python/generated_cases.c.h" + #line 3510 "Python/generated_cases.c.h" } TARGET(CALL) { @@ -3470,7 +3516,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *method = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2480 "Python/bytecodes.c" + #line 2511 "Python/bytecodes.c" int is_meth = method != NULL; int total_args = oparg; if (is_meth) { @@ -3552,7 +3598,7 @@ Py_DECREF(args[i]); } if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 3556 "Python/generated_cases.c.h" + #line 3602 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -3564,7 +3610,7 @@ TARGET(CALL_BOUND_METHOD_EXACT_ARGS) { PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *method = stack_pointer[-(2 + oparg)]; - #line 2568 "Python/bytecodes.c" + #line 2599 "Python/bytecodes.c" DEOPT_IF(method != NULL, CALL); DEOPT_IF(Py_TYPE(callable) != &PyMethod_Type, CALL); STAT_INC(CALL, hit); @@ -3574,7 +3620,7 @@ PEEK(oparg + 2) = Py_NewRef(meth); // method Py_DECREF(callable); GO_TO_INSTRUCTION(CALL_PY_EXACT_ARGS); - #line 3578 "Python/generated_cases.c.h" + #line 3624 "Python/generated_cases.c.h" } TARGET(CALL_PY_EXACT_ARGS) { @@ -3583,7 +3629,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *method = stack_pointer[-(2 + oparg)]; uint32_t func_version = read_u32(&next_instr[1].cache); - #line 2580 "Python/bytecodes.c" + #line 2611 "Python/bytecodes.c" assert(kwnames == NULL); DEOPT_IF(tstate->interp->eval_frame, CALL); int is_meth = method != NULL; @@ -3609,7 +3655,7 @@ JUMPBY(INLINE_CACHE_ENTRIES_CALL); frame->return_offset = 0; DISPATCH_INLINED(new_frame); - #line 3613 "Python/generated_cases.c.h" + #line 3659 "Python/generated_cases.c.h" } TARGET(CALL_PY_WITH_DEFAULTS) { @@ -3617,7 +3663,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *method = stack_pointer[-(2 + oparg)]; uint32_t func_version = read_u32(&next_instr[1].cache); - #line 2608 "Python/bytecodes.c" + #line 2639 "Python/bytecodes.c" assert(kwnames == NULL); DEOPT_IF(tstate->interp->eval_frame, CALL); int is_meth = method != NULL; @@ -3653,7 +3699,7 @@ JUMPBY(INLINE_CACHE_ENTRIES_CALL); frame->return_offset = 0; DISPATCH_INLINED(new_frame); - #line 3657 "Python/generated_cases.c.h" + #line 3703 "Python/generated_cases.c.h" } TARGET(CALL_NO_KW_TYPE_1) { @@ -3661,7 +3707,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *null = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2646 "Python/bytecodes.c" + #line 2677 "Python/bytecodes.c" assert(kwnames == NULL); assert(oparg == 1); DEOPT_IF(null != NULL, CALL); @@ -3671,7 +3717,7 @@ res = Py_NewRef(Py_TYPE(obj)); Py_DECREF(obj); Py_DECREF(&PyType_Type); // I.e., callable - #line 3675 "Python/generated_cases.c.h" + #line 3721 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -3684,7 +3730,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *null = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2658 "Python/bytecodes.c" + #line 2689 "Python/bytecodes.c" assert(kwnames == NULL); assert(oparg == 1); DEOPT_IF(null != NULL, CALL); @@ -3695,7 +3741,7 @@ Py_DECREF(arg); Py_DECREF(&PyUnicode_Type); // I.e., callable if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 3699 "Python/generated_cases.c.h" + #line 3745 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -3709,7 +3755,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *null = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2672 "Python/bytecodes.c" + #line 2703 "Python/bytecodes.c" assert(kwnames == NULL); assert(oparg == 1); DEOPT_IF(null != NULL, CALL); @@ -3720,7 +3766,7 @@ Py_DECREF(arg); Py_DECREF(&PyTuple_Type); // I.e., tuple if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 3724 "Python/generated_cases.c.h" + #line 3770 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -3734,7 +3780,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *method = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2686 "Python/bytecodes.c" + #line 2717 "Python/bytecodes.c" int is_meth = method != NULL; int total_args = oparg; if (is_meth) { @@ -3756,7 +3802,7 @@ } Py_DECREF(tp); if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 3760 "Python/generated_cases.c.h" + #line 3806 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -3770,7 +3816,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *method = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2711 "Python/bytecodes.c" + #line 2742 "Python/bytecodes.c" /* Builtin METH_O functions */ assert(kwnames == NULL); int is_meth = method != NULL; @@ -3798,7 +3844,7 @@ Py_DECREF(arg); Py_DECREF(callable); if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 3802 "Python/generated_cases.c.h" + #line 3848 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -3812,7 +3858,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *method = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2742 "Python/bytecodes.c" + #line 2773 "Python/bytecodes.c" /* Builtin METH_FASTCALL functions, without keywords */ assert(kwnames == NULL); int is_meth = method != NULL; @@ -3844,7 +3890,7 @@ 'invalid'). In those cases an exception is set, so we must handle it. */ - #line 3848 "Python/generated_cases.c.h" + #line 3894 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -3858,7 +3904,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *method = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2777 "Python/bytecodes.c" + #line 2808 "Python/bytecodes.c" /* Builtin METH_FASTCALL | METH_KEYWORDS functions */ int is_meth = method != NULL; int total_args = oparg; @@ -3890,7 +3936,7 @@ } Py_DECREF(callable); if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 3894 "Python/generated_cases.c.h" + #line 3940 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -3904,7 +3950,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *method = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2812 "Python/bytecodes.c" + #line 2843 "Python/bytecodes.c" assert(kwnames == NULL); /* len(o) */ int is_meth = method != NULL; @@ -3929,7 +3975,7 @@ Py_DECREF(callable); Py_DECREF(arg); if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 3933 "Python/generated_cases.c.h" + #line 3979 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -3942,7 +3988,7 @@ PyObject *callable = stack_pointer[-(1 + oparg)]; PyObject *method = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2839 "Python/bytecodes.c" + #line 2870 "Python/bytecodes.c" assert(kwnames == NULL); /* isinstance(o, o2) */ int is_meth = method != NULL; @@ -3969,7 +4015,7 @@ Py_DECREF(cls); Py_DECREF(callable); if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 3973 "Python/generated_cases.c.h" + #line 4019 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -3981,7 +4027,7 @@ PyObject **args = (stack_pointer - oparg); PyObject *self = stack_pointer[-(1 + oparg)]; PyObject *method = stack_pointer[-(2 + oparg)]; - #line 2869 "Python/bytecodes.c" + #line 2900 "Python/bytecodes.c" assert(kwnames == NULL); assert(oparg == 1); assert(method != NULL); @@ -3999,14 +4045,14 @@ JUMPBY(INLINE_CACHE_ENTRIES_CALL + 1); assert(next_instr[-1].op.code == POP_TOP); DISPATCH(); - #line 4003 "Python/generated_cases.c.h" + #line 4049 "Python/generated_cases.c.h" } TARGET(CALL_NO_KW_METHOD_DESCRIPTOR_O) { PyObject **args = (stack_pointer - oparg); PyObject *method = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2889 "Python/bytecodes.c" + #line 2920 "Python/bytecodes.c" assert(kwnames == NULL); int is_meth = method != NULL; int total_args = oparg; @@ -4037,7 +4083,7 @@ Py_DECREF(arg); Py_DECREF(callable); if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 4041 "Python/generated_cases.c.h" + #line 4087 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -4050,7 +4096,7 @@ PyObject **args = (stack_pointer - oparg); PyObject *method = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2923 "Python/bytecodes.c" + #line 2954 "Python/bytecodes.c" int is_meth = method != NULL; int total_args = oparg; if (is_meth) { @@ -4079,7 +4125,7 @@ } Py_DECREF(callable); if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 4083 "Python/generated_cases.c.h" + #line 4129 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -4092,7 +4138,7 @@ PyObject **args = (stack_pointer - oparg); PyObject *method = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2955 "Python/bytecodes.c" + #line 2986 "Python/bytecodes.c" assert(kwnames == NULL); assert(oparg == 0 || oparg == 1); int is_meth = method != NULL; @@ -4121,7 +4167,7 @@ Py_DECREF(self); Py_DECREF(callable); if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 4125 "Python/generated_cases.c.h" + #line 4171 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -4134,7 +4180,7 @@ PyObject **args = (stack_pointer - oparg); PyObject *method = stack_pointer[-(2 + oparg)]; PyObject *res; - #line 2987 "Python/bytecodes.c" + #line 3018 "Python/bytecodes.c" assert(kwnames == NULL); int is_meth = method != NULL; int total_args = oparg; @@ -4162,7 +4208,7 @@ } Py_DECREF(callable); if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; } - #line 4166 "Python/generated_cases.c.h" + #line 4212 "Python/generated_cases.c.h" STACK_SHRINK(oparg); STACK_SHRINK(1); stack_pointer[-1] = res; @@ -4172,9 +4218,9 @@ } TARGET(INSTRUMENTED_CALL_FUNCTION_EX) { - #line 3018 "Python/bytecodes.c" + #line 3049 "Python/bytecodes.c" GO_TO_INSTRUCTION(CALL_FUNCTION_EX); - #line 4178 "Python/generated_cases.c.h" + #line 4224 "Python/generated_cases.c.h" } TARGET(CALL_FUNCTION_EX) { @@ -4183,7 +4229,7 @@ PyObject *callargs = stack_pointer[-(1 + ((oparg & 1) ? 1 : 0))]; PyObject *func = stack_pointer[-(2 + ((oparg & 1) ? 1 : 0))]; PyObject *result; - #line 3022 "Python/bytecodes.c" + #line 3053 "Python/bytecodes.c" // DICT_MERGE is called before this opcode if there are kwargs. // It converts all dict subtypes in kwargs into regular dicts. assert(kwargs == NULL || PyDict_CheckExact(kwargs)); @@ -4226,14 +4272,14 @@ else { result = PyObject_Call(func, callargs, kwargs); } - #line 4230 "Python/generated_cases.c.h" + #line 4276 "Python/generated_cases.c.h" Py_DECREF(func); Py_DECREF(callargs); Py_XDECREF(kwargs); - #line 3065 "Python/bytecodes.c" + #line 3096 "Python/bytecodes.c" assert(PEEK(3 + (oparg & 1)) == NULL); if (result == NULL) { STACK_SHRINK(((oparg & 1) ? 1 : 0)); goto pop_3_error; } - #line 4237 "Python/generated_cases.c.h" + #line 4283 "Python/generated_cases.c.h" STACK_SHRINK(((oparg & 1) ? 1 : 0)); STACK_SHRINK(2); stack_pointer[-1] = result; @@ -4248,7 +4294,7 @@ PyObject *kwdefaults = (oparg & 0x02) ? stack_pointer[-(1 + ((oparg & 0x08) ? 1 : 0) + ((oparg & 0x04) ? 1 : 0) + ((oparg & 0x02) ? 1 : 0))] : NULL; PyObject *defaults = (oparg & 0x01) ? stack_pointer[-(1 + ((oparg & 0x08) ? 1 : 0) + ((oparg & 0x04) ? 1 : 0) + ((oparg & 0x02) ? 1 : 0) + ((oparg & 0x01) ? 1 : 0))] : NULL; PyObject *func; - #line 3075 "Python/bytecodes.c" + #line 3106 "Python/bytecodes.c" PyFunctionObject *func_obj = (PyFunctionObject *) PyFunction_New(codeobj, GLOBALS()); @@ -4277,14 +4323,14 @@ func_obj->func_version = ((PyCodeObject *)codeobj)->co_version; func = (PyObject *)func_obj; - #line 4281 "Python/generated_cases.c.h" + #line 4327 "Python/generated_cases.c.h" STACK_SHRINK(((oparg & 0x01) ? 1 : 0) + ((oparg & 0x02) ? 1 : 0) + ((oparg & 0x04) ? 1 : 0) + ((oparg & 0x08) ? 1 : 0)); stack_pointer[-1] = func; DISPATCH(); } TARGET(RETURN_GENERATOR) { - #line 3106 "Python/bytecodes.c" + #line 3137 "Python/bytecodes.c" assert(PyFunction_Check(frame->f_funcobj)); PyFunctionObject *func = (PyFunctionObject *)frame->f_funcobj; PyGenObject *gen = (PyGenObject *)_Py_MakeCoro(func); @@ -4305,7 +4351,7 @@ frame = cframe.current_frame = prev; _PyFrame_StackPush(frame, (PyObject *)gen); goto resume_frame; - #line 4309 "Python/generated_cases.c.h" + #line 4355 "Python/generated_cases.c.h" } TARGET(BUILD_SLICE) { @@ -4313,15 +4359,15 @@ PyObject *stop = stack_pointer[-(1 + ((oparg == 3) ? 1 : 0))]; PyObject *start = stack_pointer[-(2 + ((oparg == 3) ? 1 : 0))]; PyObject *slice; - #line 3129 "Python/bytecodes.c" + #line 3160 "Python/bytecodes.c" slice = PySlice_New(start, stop, step); - #line 4319 "Python/generated_cases.c.h" + #line 4365 "Python/generated_cases.c.h" Py_DECREF(start); Py_DECREF(stop); Py_XDECREF(step); - #line 3131 "Python/bytecodes.c" + #line 3162 "Python/bytecodes.c" if (slice == NULL) { STACK_SHRINK(((oparg == 3) ? 1 : 0)); goto pop_2_error; } - #line 4325 "Python/generated_cases.c.h" + #line 4371 "Python/generated_cases.c.h" STACK_SHRINK(((oparg == 3) ? 1 : 0)); STACK_SHRINK(1); stack_pointer[-1] = slice; @@ -4332,7 +4378,7 @@ PyObject *fmt_spec = ((oparg & FVS_MASK) == FVS_HAVE_SPEC) ? stack_pointer[-((((oparg & FVS_MASK) == FVS_HAVE_SPEC) ? 1 : 0))] : NULL; PyObject *value = stack_pointer[-(1 + (((oparg & FVS_MASK) == FVS_HAVE_SPEC) ? 1 : 0))]; PyObject *result; - #line 3135 "Python/bytecodes.c" + #line 3166 "Python/bytecodes.c" /* Handles f-string value formatting. */ PyObject *(*conv_fn)(PyObject *); int which_conversion = oparg & FVC_MASK; @@ -4367,7 +4413,7 @@ Py_DECREF(value); Py_XDECREF(fmt_spec); if (result == NULL) { STACK_SHRINK((((oparg & FVS_MASK) == FVS_HAVE_SPEC) ? 1 : 0)); goto pop_1_error; } - #line 4371 "Python/generated_cases.c.h" + #line 4417 "Python/generated_cases.c.h" STACK_SHRINK((((oparg & FVS_MASK) == FVS_HAVE_SPEC) ? 1 : 0)); stack_pointer[-1] = result; DISPATCH(); @@ -4376,10 +4422,10 @@ TARGET(COPY) { PyObject *bottom = stack_pointer[-(1 + (oparg-1))]; PyObject *top; - #line 3172 "Python/bytecodes.c" + #line 3203 "Python/bytecodes.c" assert(oparg > 0); top = Py_NewRef(bottom); - #line 4383 "Python/generated_cases.c.h" + #line 4429 "Python/generated_cases.c.h" STACK_GROW(1); stack_pointer[-1] = top; DISPATCH(); @@ -4391,7 +4437,7 @@ PyObject *rhs = stack_pointer[-1]; PyObject *lhs = stack_pointer[-2]; PyObject *res; - #line 3177 "Python/bytecodes.c" + #line 3208 "Python/bytecodes.c" #if ENABLE_SPECIALIZATION _PyBinaryOpCache *cache = (_PyBinaryOpCache *)next_instr; if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) { @@ -4406,12 +4452,12 @@ assert((unsigned)oparg < Py_ARRAY_LENGTH(binary_ops)); assert(binary_ops[oparg]); res = binary_ops[oparg](lhs, rhs); - #line 4410 "Python/generated_cases.c.h" + #line 4456 "Python/generated_cases.c.h" Py_DECREF(lhs); Py_DECREF(rhs); - #line 3192 "Python/bytecodes.c" + #line 3223 "Python/bytecodes.c" if (res == NULL) goto pop_2_error; - #line 4415 "Python/generated_cases.c.h" + #line 4461 "Python/generated_cases.c.h" STACK_SHRINK(1); stack_pointer[-1] = res; next_instr += 1; @@ -4421,16 +4467,16 @@ TARGET(SWAP) { PyObject *top = stack_pointer[-1]; PyObject *bottom = stack_pointer[-(2 + (oparg-2))]; - #line 3197 "Python/bytecodes.c" + #line 3228 "Python/bytecodes.c" assert(oparg >= 2); - #line 4427 "Python/generated_cases.c.h" + #line 4473 "Python/generated_cases.c.h" stack_pointer[-1] = bottom; stack_pointer[-(2 + (oparg-2))] = top; DISPATCH(); } TARGET(INSTRUMENTED_LINE) { - #line 3201 "Python/bytecodes.c" + #line 3232 "Python/bytecodes.c" _Py_CODEUNIT *here = next_instr-1; _PyFrame_SetStackPointer(frame, stack_pointer); int original_opcode = _Py_call_instrumentation_line( @@ -4450,11 +4496,11 @@ } opcode = original_opcode; DISPATCH_GOTO(); - #line 4454 "Python/generated_cases.c.h" + #line 4500 "Python/generated_cases.c.h" } TARGET(INSTRUMENTED_INSTRUCTION) { - #line 3223 "Python/bytecodes.c" + #line 3254 "Python/bytecodes.c" int next_opcode = _Py_call_instrumentation_instruction( tstate, frame, next_instr-1); if (next_opcode < 0) goto error; @@ -4466,26 +4512,26 @@ assert(next_opcode > 0 && next_opcode < 256); opcode = next_opcode; DISPATCH_GOTO(); - #line 4470 "Python/generated_cases.c.h" + #line 4516 "Python/generated_cases.c.h" } TARGET(INSTRUMENTED_JUMP_FORWARD) { - #line 3237 "Python/bytecodes.c" + #line 3268 "Python/bytecodes.c" INSTRUMENTED_JUMP(next_instr-1, next_instr+oparg, PY_MONITORING_EVENT_JUMP); - #line 4476 "Python/generated_cases.c.h" + #line 4522 "Python/generated_cases.c.h" DISPATCH(); } TARGET(INSTRUMENTED_JUMP_BACKWARD) { - #line 3241 "Python/bytecodes.c" + #line 3272 "Python/bytecodes.c" INSTRUMENTED_JUMP(next_instr-1, next_instr-oparg, PY_MONITORING_EVENT_JUMP); - #line 4483 "Python/generated_cases.c.h" + #line 4529 "Python/generated_cases.c.h" CHECK_EVAL_BREAKER(); DISPATCH(); } TARGET(INSTRUMENTED_POP_JUMP_IF_TRUE) { - #line 3246 "Python/bytecodes.c" + #line 3277 "Python/bytecodes.c" PyObject *cond = POP(); int err = PyObject_IsTrue(cond); Py_DECREF(cond); @@ -4494,12 +4540,12 @@ assert(err == 0 || err == 1); int offset = err*oparg; INSTRUMENTED_JUMP(here, next_instr + offset, PY_MONITORING_EVENT_BRANCH); - #line 4498 "Python/generated_cases.c.h" + #line 4544 "Python/generated_cases.c.h" DISPATCH(); } TARGET(INSTRUMENTED_POP_JUMP_IF_FALSE) { - #line 3257 "Python/bytecodes.c" + #line 3288 "Python/bytecodes.c" PyObject *cond = POP(); int err = PyObject_IsTrue(cond); Py_DECREF(cond); @@ -4508,12 +4554,12 @@ assert(err == 0 || err == 1); int offset = (1-err)*oparg; INSTRUMENTED_JUMP(here, next_instr + offset, PY_MONITORING_EVENT_BRANCH); - #line 4512 "Python/generated_cases.c.h" + #line 4558 "Python/generated_cases.c.h" DISPATCH(); } TARGET(INSTRUMENTED_POP_JUMP_IF_NONE) { - #line 3268 "Python/bytecodes.c" + #line 3299 "Python/bytecodes.c" PyObject *value = POP(); _Py_CODEUNIT *here = next_instr-1; int offset; @@ -4526,12 +4572,12 @@ offset = 0; } INSTRUMENTED_JUMP(here, next_instr + offset, PY_MONITORING_EVENT_BRANCH); - #line 4530 "Python/generated_cases.c.h" + #line 4576 "Python/generated_cases.c.h" DISPATCH(); } TARGET(INSTRUMENTED_POP_JUMP_IF_NOT_NONE) { - #line 3283 "Python/bytecodes.c" + #line 3314 "Python/bytecodes.c" PyObject *value = POP(); _Py_CODEUNIT *here = next_instr-1; int offset; @@ -4544,30 +4590,30 @@ offset = oparg; } INSTRUMENTED_JUMP(here, next_instr + offset, PY_MONITORING_EVENT_BRANCH); - #line 4548 "Python/generated_cases.c.h" + #line 4594 "Python/generated_cases.c.h" DISPATCH(); } TARGET(EXTENDED_ARG) { - #line 3298 "Python/bytecodes.c" + #line 3329 "Python/bytecodes.c" assert(oparg); opcode = next_instr->op.code; oparg = oparg << 8 | next_instr->op.arg; PRE_DISPATCH_GOTO(); DISPATCH_GOTO(); - #line 4559 "Python/generated_cases.c.h" + #line 4605 "Python/generated_cases.c.h" } TARGET(CACHE) { - #line 3306 "Python/bytecodes.c" + #line 3337 "Python/bytecodes.c" assert(0 && "Executing a cache."); Py_UNREACHABLE(); - #line 4566 "Python/generated_cases.c.h" + #line 4612 "Python/generated_cases.c.h" } TARGET(RESERVED) { - #line 3311 "Python/bytecodes.c" + #line 3342 "Python/bytecodes.c" assert(0 && "Executing RESERVED instruction."); Py_UNREACHABLE(); - #line 4573 "Python/generated_cases.c.h" + #line 4619 "Python/generated_cases.c.h" } |