mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
gh-102859: Remove JUMP_IF_FALSE_OR_POP and JUMP_IF_TRUE_OR_POP (#102870)
This commit is contained in:
parent
04adf2df39
commit
3468c768ce
15 changed files with 235 additions and 437 deletions
290
Python/generated_cases.c.h
generated
290
Python/generated_cases.c.h
generated
|
@ -2786,90 +2786,28 @@
|
|||
DISPATCH();
|
||||
}
|
||||
|
||||
TARGET(JUMP_IF_FALSE_OR_POP) {
|
||||
PyObject *cond = stack_pointer[-1];
|
||||
#line 1922 "Python/bytecodes.c"
|
||||
bool jump = false;
|
||||
int err;
|
||||
if (Py_IsTrue(cond)) {
|
||||
_Py_DECREF_NO_DEALLOC(cond);
|
||||
}
|
||||
else if (Py_IsFalse(cond)) {
|
||||
JUMPBY(oparg);
|
||||
jump = true;
|
||||
}
|
||||
else {
|
||||
err = PyObject_IsTrue(cond);
|
||||
if (err > 0) {
|
||||
Py_DECREF(cond);
|
||||
}
|
||||
else if (err == 0) {
|
||||
JUMPBY(oparg);
|
||||
jump = true;
|
||||
}
|
||||
else {
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
#line 2815 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(1);
|
||||
STACK_GROW((jump ? 1 : 0));
|
||||
DISPATCH();
|
||||
}
|
||||
|
||||
TARGET(JUMP_IF_TRUE_OR_POP) {
|
||||
PyObject *cond = stack_pointer[-1];
|
||||
#line 1947 "Python/bytecodes.c"
|
||||
bool jump = false;
|
||||
int err;
|
||||
if (Py_IsFalse(cond)) {
|
||||
_Py_DECREF_NO_DEALLOC(cond);
|
||||
}
|
||||
else if (Py_IsTrue(cond)) {
|
||||
JUMPBY(oparg);
|
||||
jump = true;
|
||||
}
|
||||
else {
|
||||
err = PyObject_IsTrue(cond);
|
||||
if (err > 0) {
|
||||
JUMPBY(oparg);
|
||||
jump = true;
|
||||
}
|
||||
else if (err == 0) {
|
||||
Py_DECREF(cond);
|
||||
}
|
||||
else {
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
#line 2846 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(1);
|
||||
STACK_GROW((jump ? 1 : 0));
|
||||
DISPATCH();
|
||||
}
|
||||
|
||||
TARGET(JUMP_BACKWARD_NO_INTERRUPT) {
|
||||
#line 1972 "Python/bytecodes.c"
|
||||
#line 1922 "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 2860 "Python/generated_cases.c.h"
|
||||
#line 2798 "Python/generated_cases.c.h"
|
||||
DISPATCH();
|
||||
}
|
||||
|
||||
TARGET(GET_LEN) {
|
||||
PyObject *obj = stack_pointer[-1];
|
||||
PyObject *len_o;
|
||||
#line 1981 "Python/bytecodes.c"
|
||||
#line 1931 "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 2873 "Python/generated_cases.c.h"
|
||||
#line 2811 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = len_o;
|
||||
DISPATCH();
|
||||
|
@ -2880,16 +2818,16 @@
|
|||
PyObject *type = stack_pointer[-2];
|
||||
PyObject *subject = stack_pointer[-3];
|
||||
PyObject *attrs;
|
||||
#line 1989 "Python/bytecodes.c"
|
||||
#line 1939 "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 2889 "Python/generated_cases.c.h"
|
||||
#line 2827 "Python/generated_cases.c.h"
|
||||
Py_DECREF(subject);
|
||||
Py_DECREF(type);
|
||||
Py_DECREF(names);
|
||||
#line 1994 "Python/bytecodes.c"
|
||||
#line 1944 "Python/bytecodes.c"
|
||||
if (attrs) {
|
||||
assert(PyTuple_CheckExact(attrs)); // Success!
|
||||
}
|
||||
|
@ -2897,7 +2835,7 @@
|
|||
if (_PyErr_Occurred(tstate)) goto pop_3_error;
|
||||
attrs = Py_NewRef(Py_None); // Failure!
|
||||
}
|
||||
#line 2901 "Python/generated_cases.c.h"
|
||||
#line 2839 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(2);
|
||||
stack_pointer[-1] = attrs;
|
||||
DISPATCH();
|
||||
|
@ -2906,10 +2844,10 @@
|
|||
TARGET(MATCH_MAPPING) {
|
||||
PyObject *subject = stack_pointer[-1];
|
||||
PyObject *res;
|
||||
#line 2004 "Python/bytecodes.c"
|
||||
#line 1954 "Python/bytecodes.c"
|
||||
int match = Py_TYPE(subject)->tp_flags & Py_TPFLAGS_MAPPING;
|
||||
res = Py_NewRef(match ? Py_True : Py_False);
|
||||
#line 2913 "Python/generated_cases.c.h"
|
||||
#line 2851 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = res;
|
||||
PREDICT(POP_JUMP_IF_FALSE);
|
||||
|
@ -2919,10 +2857,10 @@
|
|||
TARGET(MATCH_SEQUENCE) {
|
||||
PyObject *subject = stack_pointer[-1];
|
||||
PyObject *res;
|
||||
#line 2010 "Python/bytecodes.c"
|
||||
#line 1960 "Python/bytecodes.c"
|
||||
int match = Py_TYPE(subject)->tp_flags & Py_TPFLAGS_SEQUENCE;
|
||||
res = Py_NewRef(match ? Py_True : Py_False);
|
||||
#line 2926 "Python/generated_cases.c.h"
|
||||
#line 2864 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = res;
|
||||
PREDICT(POP_JUMP_IF_FALSE);
|
||||
|
@ -2933,11 +2871,11 @@
|
|||
PyObject *keys = stack_pointer[-1];
|
||||
PyObject *subject = stack_pointer[-2];
|
||||
PyObject *values_or_none;
|
||||
#line 2016 "Python/bytecodes.c"
|
||||
#line 1966 "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 2941 "Python/generated_cases.c.h"
|
||||
#line 2879 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = values_or_none;
|
||||
DISPATCH();
|
||||
|
@ -2946,14 +2884,14 @@
|
|||
TARGET(GET_ITER) {
|
||||
PyObject *iterable = stack_pointer[-1];
|
||||
PyObject *iter;
|
||||
#line 2022 "Python/bytecodes.c"
|
||||
#line 1972 "Python/bytecodes.c"
|
||||
/* before: [obj]; after [getiter(obj)] */
|
||||
iter = PyObject_GetIter(iterable);
|
||||
#line 2953 "Python/generated_cases.c.h"
|
||||
#line 2891 "Python/generated_cases.c.h"
|
||||
Py_DECREF(iterable);
|
||||
#line 2025 "Python/bytecodes.c"
|
||||
#line 1975 "Python/bytecodes.c"
|
||||
if (iter == NULL) goto pop_1_error;
|
||||
#line 2957 "Python/generated_cases.c.h"
|
||||
#line 2895 "Python/generated_cases.c.h"
|
||||
stack_pointer[-1] = iter;
|
||||
DISPATCH();
|
||||
}
|
||||
|
@ -2961,7 +2899,7 @@
|
|||
TARGET(GET_YIELD_FROM_ITER) {
|
||||
PyObject *iterable = stack_pointer[-1];
|
||||
PyObject *iter;
|
||||
#line 2029 "Python/bytecodes.c"
|
||||
#line 1979 "Python/bytecodes.c"
|
||||
/* before: [obj]; after [getiter(obj)] */
|
||||
if (PyCoro_CheckExact(iterable)) {
|
||||
/* `iterable` is a coroutine */
|
||||
|
@ -2984,11 +2922,11 @@
|
|||
if (iter == NULL) {
|
||||
goto error;
|
||||
}
|
||||
#line 2988 "Python/generated_cases.c.h"
|
||||
#line 2926 "Python/generated_cases.c.h"
|
||||
Py_DECREF(iterable);
|
||||
#line 2052 "Python/bytecodes.c"
|
||||
#line 2002 "Python/bytecodes.c"
|
||||
}
|
||||
#line 2992 "Python/generated_cases.c.h"
|
||||
#line 2930 "Python/generated_cases.c.h"
|
||||
stack_pointer[-1] = iter;
|
||||
PREDICT(LOAD_CONST);
|
||||
DISPATCH();
|
||||
|
@ -2999,7 +2937,7 @@
|
|||
static_assert(INLINE_CACHE_ENTRIES_FOR_ITER == 1, "incorrect cache size");
|
||||
PyObject *iter = stack_pointer[-1];
|
||||
PyObject *next;
|
||||
#line 2071 "Python/bytecodes.c"
|
||||
#line 2021 "Python/bytecodes.c"
|
||||
#if ENABLE_SPECIALIZATION
|
||||
_PyForIterCache *cache = (_PyForIterCache *)next_instr;
|
||||
if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) {
|
||||
|
@ -3032,7 +2970,7 @@
|
|||
DISPATCH();
|
||||
}
|
||||
// Common case: no jump, leave it to the code generator
|
||||
#line 3036 "Python/generated_cases.c.h"
|
||||
#line 2974 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = next;
|
||||
next_instr += 1;
|
||||
|
@ -3042,7 +2980,7 @@
|
|||
TARGET(FOR_ITER_LIST) {
|
||||
PyObject *iter = stack_pointer[-1];
|
||||
PyObject *next;
|
||||
#line 2106 "Python/bytecodes.c"
|
||||
#line 2056 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
DEOPT_IF(Py_TYPE(iter) != &PyListIter_Type, FOR_ITER);
|
||||
_PyListIterObject *it = (_PyListIterObject *)iter;
|
||||
|
@ -3063,7 +3001,7 @@
|
|||
DISPATCH();
|
||||
end_for_iter_list:
|
||||
// Common case: no jump, leave it to the code generator
|
||||
#line 3067 "Python/generated_cases.c.h"
|
||||
#line 3005 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = next;
|
||||
next_instr += 1;
|
||||
|
@ -3073,7 +3011,7 @@
|
|||
TARGET(FOR_ITER_TUPLE) {
|
||||
PyObject *iter = stack_pointer[-1];
|
||||
PyObject *next;
|
||||
#line 2129 "Python/bytecodes.c"
|
||||
#line 2079 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
_PyTupleIterObject *it = (_PyTupleIterObject *)iter;
|
||||
DEOPT_IF(Py_TYPE(it) != &PyTupleIter_Type, FOR_ITER);
|
||||
|
@ -3094,7 +3032,7 @@
|
|||
DISPATCH();
|
||||
end_for_iter_tuple:
|
||||
// Common case: no jump, leave it to the code generator
|
||||
#line 3098 "Python/generated_cases.c.h"
|
||||
#line 3036 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = next;
|
||||
next_instr += 1;
|
||||
|
@ -3104,7 +3042,7 @@
|
|||
TARGET(FOR_ITER_RANGE) {
|
||||
PyObject *iter = stack_pointer[-1];
|
||||
PyObject *next;
|
||||
#line 2152 "Python/bytecodes.c"
|
||||
#line 2102 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
_PyRangeIterObject *r = (_PyRangeIterObject *)iter;
|
||||
DEOPT_IF(Py_TYPE(r) != &PyRangeIter_Type, FOR_ITER);
|
||||
|
@ -3123,7 +3061,7 @@
|
|||
if (next == NULL) {
|
||||
goto error;
|
||||
}
|
||||
#line 3127 "Python/generated_cases.c.h"
|
||||
#line 3065 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = next;
|
||||
next_instr += 1;
|
||||
|
@ -3132,7 +3070,7 @@
|
|||
|
||||
TARGET(FOR_ITER_GEN) {
|
||||
PyObject *iter = stack_pointer[-1];
|
||||
#line 2173 "Python/bytecodes.c"
|
||||
#line 2123 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
PyGenObject *gen = (PyGenObject *)iter;
|
||||
DEOPT_IF(Py_TYPE(gen) != &PyGen_Type, FOR_ITER);
|
||||
|
@ -3147,14 +3085,14 @@
|
|||
JUMPBY(INLINE_CACHE_ENTRIES_FOR_ITER + oparg);
|
||||
assert(next_instr->op.code == END_FOR);
|
||||
DISPATCH_INLINED(gen_frame);
|
||||
#line 3151 "Python/generated_cases.c.h"
|
||||
#line 3089 "Python/generated_cases.c.h"
|
||||
}
|
||||
|
||||
TARGET(BEFORE_ASYNC_WITH) {
|
||||
PyObject *mgr = stack_pointer[-1];
|
||||
PyObject *exit;
|
||||
PyObject *res;
|
||||
#line 2190 "Python/bytecodes.c"
|
||||
#line 2140 "Python/bytecodes.c"
|
||||
PyObject *enter = _PyObject_LookupSpecial(mgr, &_Py_ID(__aenter__));
|
||||
if (enter == NULL) {
|
||||
if (!_PyErr_Occurred(tstate)) {
|
||||
|
@ -3177,16 +3115,16 @@
|
|||
Py_DECREF(enter);
|
||||
goto error;
|
||||
}
|
||||
#line 3181 "Python/generated_cases.c.h"
|
||||
#line 3119 "Python/generated_cases.c.h"
|
||||
Py_DECREF(mgr);
|
||||
#line 2213 "Python/bytecodes.c"
|
||||
#line 2163 "Python/bytecodes.c"
|
||||
res = _PyObject_CallNoArgs(enter);
|
||||
Py_DECREF(enter);
|
||||
if (res == NULL) {
|
||||
Py_DECREF(exit);
|
||||
if (true) goto pop_1_error;
|
||||
}
|
||||
#line 3190 "Python/generated_cases.c.h"
|
||||
#line 3128 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = res;
|
||||
stack_pointer[-2] = exit;
|
||||
|
@ -3198,7 +3136,7 @@
|
|||
PyObject *mgr = stack_pointer[-1];
|
||||
PyObject *exit;
|
||||
PyObject *res;
|
||||
#line 2223 "Python/bytecodes.c"
|
||||
#line 2173 "Python/bytecodes.c"
|
||||
/* pop the context manager, push its __exit__ and the
|
||||
* value returned from calling its __enter__
|
||||
*/
|
||||
|
@ -3224,16 +3162,16 @@
|
|||
Py_DECREF(enter);
|
||||
goto error;
|
||||
}
|
||||
#line 3228 "Python/generated_cases.c.h"
|
||||
#line 3166 "Python/generated_cases.c.h"
|
||||
Py_DECREF(mgr);
|
||||
#line 2249 "Python/bytecodes.c"
|
||||
#line 2199 "Python/bytecodes.c"
|
||||
res = _PyObject_CallNoArgs(enter);
|
||||
Py_DECREF(enter);
|
||||
if (res == NULL) {
|
||||
Py_DECREF(exit);
|
||||
if (true) goto pop_1_error;
|
||||
}
|
||||
#line 3237 "Python/generated_cases.c.h"
|
||||
#line 3175 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = res;
|
||||
stack_pointer[-2] = exit;
|
||||
|
@ -3245,7 +3183,7 @@
|
|||
PyObject *lasti = stack_pointer[-3];
|
||||
PyObject *exit_func = stack_pointer[-4];
|
||||
PyObject *res;
|
||||
#line 2258 "Python/bytecodes.c"
|
||||
#line 2208 "Python/bytecodes.c"
|
||||
/* At the top of the stack are 4 values:
|
||||
- val: TOP = exc_info()
|
||||
- unused: SECOND = previous exception
|
||||
|
@ -3266,7 +3204,7 @@
|
|||
res = PyObject_Vectorcall(exit_func, stack + 1,
|
||||
3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
|
||||
if (res == NULL) goto error;
|
||||
#line 3270 "Python/generated_cases.c.h"
|
||||
#line 3208 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = res;
|
||||
DISPATCH();
|
||||
|
@ -3275,7 +3213,7 @@
|
|||
TARGET(PUSH_EXC_INFO) {
|
||||
PyObject *new_exc = stack_pointer[-1];
|
||||
PyObject *prev_exc;
|
||||
#line 2281 "Python/bytecodes.c"
|
||||
#line 2231 "Python/bytecodes.c"
|
||||
_PyErr_StackItem *exc_info = tstate->exc_info;
|
||||
if (exc_info->exc_value != NULL) {
|
||||
prev_exc = exc_info->exc_value;
|
||||
|
@ -3285,7 +3223,7 @@
|
|||
}
|
||||
assert(PyExceptionInstance_Check(new_exc));
|
||||
exc_info->exc_value = Py_NewRef(new_exc);
|
||||
#line 3289 "Python/generated_cases.c.h"
|
||||
#line 3227 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = new_exc;
|
||||
stack_pointer[-2] = prev_exc;
|
||||
|
@ -3299,7 +3237,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 2293 "Python/bytecodes.c"
|
||||
#line 2243 "Python/bytecodes.c"
|
||||
/* Cached method object */
|
||||
assert(cframe.use_tracing == 0);
|
||||
PyTypeObject *self_cls = Py_TYPE(self);
|
||||
|
@ -3317,7 +3255,7 @@
|
|||
assert(_PyType_HasFeature(Py_TYPE(res2), Py_TPFLAGS_METHOD_DESCRIPTOR));
|
||||
res = self;
|
||||
assert(oparg & 1);
|
||||
#line 3321 "Python/generated_cases.c.h"
|
||||
#line 3259 "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; }
|
||||
|
@ -3331,7 +3269,7 @@
|
|||
PyObject *res;
|
||||
uint32_t type_version = read_u32(&next_instr[1].cache);
|
||||
PyObject *descr = read_obj(&next_instr[5].cache);
|
||||
#line 2313 "Python/bytecodes.c"
|
||||
#line 2263 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
PyTypeObject *self_cls = Py_TYPE(self);
|
||||
DEOPT_IF(self_cls->tp_version_tag != type_version, LOAD_ATTR);
|
||||
|
@ -3342,7 +3280,7 @@
|
|||
res2 = Py_NewRef(descr);
|
||||
res = self;
|
||||
assert(oparg & 1);
|
||||
#line 3346 "Python/generated_cases.c.h"
|
||||
#line 3284 "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; }
|
||||
|
@ -3356,7 +3294,7 @@
|
|||
PyObject *res;
|
||||
uint32_t type_version = read_u32(&next_instr[1].cache);
|
||||
PyObject *descr = read_obj(&next_instr[5].cache);
|
||||
#line 2326 "Python/bytecodes.c"
|
||||
#line 2276 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
PyTypeObject *self_cls = Py_TYPE(self);
|
||||
DEOPT_IF(self_cls->tp_version_tag != type_version, LOAD_ATTR);
|
||||
|
@ -3371,7 +3309,7 @@
|
|||
res2 = Py_NewRef(descr);
|
||||
res = self;
|
||||
assert(oparg & 1);
|
||||
#line 3375 "Python/generated_cases.c.h"
|
||||
#line 3313 "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; }
|
||||
|
@ -3380,11 +3318,11 @@
|
|||
}
|
||||
|
||||
TARGET(KW_NAMES) {
|
||||
#line 2343 "Python/bytecodes.c"
|
||||
#line 2293 "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 3388 "Python/generated_cases.c.h"
|
||||
#line 3326 "Python/generated_cases.c.h"
|
||||
DISPATCH();
|
||||
}
|
||||
|
||||
|
@ -3395,7 +3333,7 @@
|
|||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2379 "Python/bytecodes.c"
|
||||
#line 2329 "Python/bytecodes.c"
|
||||
int is_meth = method != NULL;
|
||||
int total_args = oparg;
|
||||
if (is_meth) {
|
||||
|
@ -3467,7 +3405,7 @@
|
|||
Py_DECREF(args[i]);
|
||||
}
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 3471 "Python/generated_cases.c.h"
|
||||
#line 3409 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -3479,7 +3417,7 @@
|
|||
TARGET(CALL_BOUND_METHOD_EXACT_ARGS) {
|
||||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
#line 2457 "Python/bytecodes.c"
|
||||
#line 2407 "Python/bytecodes.c"
|
||||
DEOPT_IF(method != NULL, CALL);
|
||||
DEOPT_IF(Py_TYPE(callable) != &PyMethod_Type, CALL);
|
||||
STAT_INC(CALL, hit);
|
||||
|
@ -3489,7 +3427,7 @@
|
|||
PEEK(oparg + 2) = Py_NewRef(meth); // method
|
||||
Py_DECREF(callable);
|
||||
GO_TO_INSTRUCTION(CALL_PY_EXACT_ARGS);
|
||||
#line 3493 "Python/generated_cases.c.h"
|
||||
#line 3431 "Python/generated_cases.c.h"
|
||||
}
|
||||
|
||||
TARGET(CALL_PY_EXACT_ARGS) {
|
||||
|
@ -3498,7 +3436,7 @@
|
|||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
uint32_t func_version = read_u32(&next_instr[1].cache);
|
||||
#line 2469 "Python/bytecodes.c"
|
||||
#line 2419 "Python/bytecodes.c"
|
||||
assert(kwnames == NULL);
|
||||
DEOPT_IF(tstate->interp->eval_frame, CALL);
|
||||
int is_meth = method != NULL;
|
||||
|
@ -3523,7 +3461,7 @@
|
|||
STACK_SHRINK(oparg + 2);
|
||||
JUMPBY(INLINE_CACHE_ENTRIES_CALL);
|
||||
DISPATCH_INLINED(new_frame);
|
||||
#line 3527 "Python/generated_cases.c.h"
|
||||
#line 3465 "Python/generated_cases.c.h"
|
||||
}
|
||||
|
||||
TARGET(CALL_PY_WITH_DEFAULTS) {
|
||||
|
@ -3532,7 +3470,7 @@
|
|||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
uint32_t func_version = read_u32(&next_instr[1].cache);
|
||||
uint16_t min_args = read_u16(&next_instr[3].cache);
|
||||
#line 2496 "Python/bytecodes.c"
|
||||
#line 2446 "Python/bytecodes.c"
|
||||
assert(kwnames == NULL);
|
||||
DEOPT_IF(tstate->interp->eval_frame, CALL);
|
||||
int is_meth = method != NULL;
|
||||
|
@ -3562,7 +3500,7 @@
|
|||
STACK_SHRINK(oparg + 2);
|
||||
JUMPBY(INLINE_CACHE_ENTRIES_CALL);
|
||||
DISPATCH_INLINED(new_frame);
|
||||
#line 3566 "Python/generated_cases.c.h"
|
||||
#line 3504 "Python/generated_cases.c.h"
|
||||
}
|
||||
|
||||
TARGET(CALL_NO_KW_TYPE_1) {
|
||||
|
@ -3570,7 +3508,7 @@
|
|||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *null = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2528 "Python/bytecodes.c"
|
||||
#line 2478 "Python/bytecodes.c"
|
||||
assert(kwnames == NULL);
|
||||
assert(cframe.use_tracing == 0);
|
||||
assert(oparg == 1);
|
||||
|
@ -3581,7 +3519,7 @@
|
|||
res = Py_NewRef(Py_TYPE(obj));
|
||||
Py_DECREF(obj);
|
||||
Py_DECREF(&PyType_Type); // I.e., callable
|
||||
#line 3585 "Python/generated_cases.c.h"
|
||||
#line 3523 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -3594,7 +3532,7 @@
|
|||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *null = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2541 "Python/bytecodes.c"
|
||||
#line 2491 "Python/bytecodes.c"
|
||||
assert(kwnames == NULL);
|
||||
assert(cframe.use_tracing == 0);
|
||||
assert(oparg == 1);
|
||||
|
@ -3606,7 +3544,7 @@
|
|||
Py_DECREF(arg);
|
||||
Py_DECREF(&PyUnicode_Type); // I.e., callable
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 3610 "Python/generated_cases.c.h"
|
||||
#line 3548 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -3620,7 +3558,7 @@
|
|||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *null = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2556 "Python/bytecodes.c"
|
||||
#line 2506 "Python/bytecodes.c"
|
||||
assert(kwnames == NULL);
|
||||
assert(oparg == 1);
|
||||
DEOPT_IF(null != NULL, CALL);
|
||||
|
@ -3631,7 +3569,7 @@
|
|||
Py_DECREF(arg);
|
||||
Py_DECREF(&PyTuple_Type); // I.e., tuple
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 3635 "Python/generated_cases.c.h"
|
||||
#line 3573 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -3645,7 +3583,7 @@
|
|||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2570 "Python/bytecodes.c"
|
||||
#line 2520 "Python/bytecodes.c"
|
||||
int is_meth = method != NULL;
|
||||
int total_args = oparg;
|
||||
if (is_meth) {
|
||||
|
@ -3667,7 +3605,7 @@
|
|||
}
|
||||
Py_DECREF(tp);
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 3671 "Python/generated_cases.c.h"
|
||||
#line 3609 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -3681,7 +3619,7 @@
|
|||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2595 "Python/bytecodes.c"
|
||||
#line 2545 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
/* Builtin METH_O functions */
|
||||
assert(kwnames == NULL);
|
||||
|
@ -3710,7 +3648,7 @@
|
|||
Py_DECREF(arg);
|
||||
Py_DECREF(callable);
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 3714 "Python/generated_cases.c.h"
|
||||
#line 3652 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -3724,7 +3662,7 @@
|
|||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2627 "Python/bytecodes.c"
|
||||
#line 2577 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
/* Builtin METH_FASTCALL functions, without keywords */
|
||||
assert(kwnames == NULL);
|
||||
|
@ -3757,7 +3695,7 @@
|
|||
'invalid'). In those cases an exception is set, so we must
|
||||
handle it.
|
||||
*/
|
||||
#line 3761 "Python/generated_cases.c.h"
|
||||
#line 3699 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -3771,7 +3709,7 @@
|
|||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2663 "Python/bytecodes.c"
|
||||
#line 2613 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
/* Builtin METH_FASTCALL | METH_KEYWORDS functions */
|
||||
int is_meth = method != NULL;
|
||||
|
@ -3804,7 +3742,7 @@
|
|||
}
|
||||
Py_DECREF(callable);
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 3808 "Python/generated_cases.c.h"
|
||||
#line 3746 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -3818,7 +3756,7 @@
|
|||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2699 "Python/bytecodes.c"
|
||||
#line 2649 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
assert(kwnames == NULL);
|
||||
/* len(o) */
|
||||
|
@ -3844,7 +3782,7 @@
|
|||
Py_DECREF(callable);
|
||||
Py_DECREF(arg);
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 3848 "Python/generated_cases.c.h"
|
||||
#line 3786 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -3857,7 +3795,7 @@
|
|||
PyObject *callable = stack_pointer[-(1 + oparg)];
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2727 "Python/bytecodes.c"
|
||||
#line 2677 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
assert(kwnames == NULL);
|
||||
/* isinstance(o, o2) */
|
||||
|
@ -3885,7 +3823,7 @@
|
|||
Py_DECREF(cls);
|
||||
Py_DECREF(callable);
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 3889 "Python/generated_cases.c.h"
|
||||
#line 3827 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -3897,7 +3835,7 @@
|
|||
PyObject **args = (stack_pointer - oparg);
|
||||
PyObject *self = stack_pointer[-(1 + oparg)];
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
#line 2758 "Python/bytecodes.c"
|
||||
#line 2708 "Python/bytecodes.c"
|
||||
assert(cframe.use_tracing == 0);
|
||||
assert(kwnames == NULL);
|
||||
assert(oparg == 1);
|
||||
|
@ -3916,14 +3854,14 @@
|
|||
JUMPBY(INLINE_CACHE_ENTRIES_CALL + 1);
|
||||
assert(next_instr[-1].op.code == POP_TOP);
|
||||
DISPATCH();
|
||||
#line 3920 "Python/generated_cases.c.h"
|
||||
#line 3858 "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 2779 "Python/bytecodes.c"
|
||||
#line 2729 "Python/bytecodes.c"
|
||||
assert(kwnames == NULL);
|
||||
int is_meth = method != NULL;
|
||||
int total_args = oparg;
|
||||
|
@ -3954,7 +3892,7 @@
|
|||
Py_DECREF(arg);
|
||||
Py_DECREF(callable);
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 3958 "Python/generated_cases.c.h"
|
||||
#line 3896 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -3967,7 +3905,7 @@
|
|||
PyObject **args = (stack_pointer - oparg);
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2813 "Python/bytecodes.c"
|
||||
#line 2763 "Python/bytecodes.c"
|
||||
int is_meth = method != NULL;
|
||||
int total_args = oparg;
|
||||
if (is_meth) {
|
||||
|
@ -3996,7 +3934,7 @@
|
|||
}
|
||||
Py_DECREF(callable);
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 4000 "Python/generated_cases.c.h"
|
||||
#line 3938 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -4009,7 +3947,7 @@
|
|||
PyObject **args = (stack_pointer - oparg);
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2845 "Python/bytecodes.c"
|
||||
#line 2795 "Python/bytecodes.c"
|
||||
assert(kwnames == NULL);
|
||||
assert(oparg == 0 || oparg == 1);
|
||||
int is_meth = method != NULL;
|
||||
|
@ -4038,7 +3976,7 @@
|
|||
Py_DECREF(self);
|
||||
Py_DECREF(callable);
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 4042 "Python/generated_cases.c.h"
|
||||
#line 3980 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -4051,7 +3989,7 @@
|
|||
PyObject **args = (stack_pointer - oparg);
|
||||
PyObject *method = stack_pointer[-(2 + oparg)];
|
||||
PyObject *res;
|
||||
#line 2877 "Python/bytecodes.c"
|
||||
#line 2827 "Python/bytecodes.c"
|
||||
assert(kwnames == NULL);
|
||||
int is_meth = method != NULL;
|
||||
int total_args = oparg;
|
||||
|
@ -4079,7 +4017,7 @@
|
|||
}
|
||||
Py_DECREF(callable);
|
||||
if (res == NULL) { STACK_SHRINK(oparg); goto pop_2_error; }
|
||||
#line 4083 "Python/generated_cases.c.h"
|
||||
#line 4021 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(oparg);
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
|
@ -4094,7 +4032,7 @@
|
|||
PyObject *callargs = stack_pointer[-(1 + ((oparg & 1) ? 1 : 0))];
|
||||
PyObject *func = stack_pointer[-(2 + ((oparg & 1) ? 1 : 0))];
|
||||
PyObject *result;
|
||||
#line 2908 "Python/bytecodes.c"
|
||||
#line 2858 "Python/bytecodes.c"
|
||||
if (oparg & 1) {
|
||||
// DICT_MERGE is called before this opcode if there are kwargs.
|
||||
// It converts all dict subtypes in kwargs into regular dicts.
|
||||
|
@ -4113,15 +4051,15 @@
|
|||
assert(PyTuple_CheckExact(callargs));
|
||||
|
||||
result = do_call_core(tstate, func, callargs, kwargs, cframe.use_tracing);
|
||||
#line 4117 "Python/generated_cases.c.h"
|
||||
#line 4055 "Python/generated_cases.c.h"
|
||||
Py_DECREF(func);
|
||||
Py_DECREF(callargs);
|
||||
Py_XDECREF(kwargs);
|
||||
#line 2927 "Python/bytecodes.c"
|
||||
#line 2877 "Python/bytecodes.c"
|
||||
|
||||
assert(PEEK(3 + (oparg & 1)) == NULL);
|
||||
if (result == NULL) { STACK_SHRINK(((oparg & 1) ? 1 : 0)); goto pop_3_error; }
|
||||
#line 4125 "Python/generated_cases.c.h"
|
||||
#line 4063 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(((oparg & 1) ? 1 : 0));
|
||||
STACK_SHRINK(2);
|
||||
stack_pointer[-1] = result;
|
||||
|
@ -4136,7 +4074,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 2938 "Python/bytecodes.c"
|
||||
#line 2888 "Python/bytecodes.c"
|
||||
|
||||
PyFunctionObject *func_obj = (PyFunctionObject *)
|
||||
PyFunction_New(codeobj, GLOBALS());
|
||||
|
@ -4165,14 +4103,14 @@
|
|||
|
||||
func_obj->func_version = ((PyCodeObject *)codeobj)->co_version;
|
||||
func = (PyObject *)func_obj;
|
||||
#line 4169 "Python/generated_cases.c.h"
|
||||
#line 4107 "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 2969 "Python/bytecodes.c"
|
||||
#line 2919 "Python/bytecodes.c"
|
||||
assert(PyFunction_Check(frame->f_funcobj));
|
||||
PyFunctionObject *func = (PyFunctionObject *)frame->f_funcobj;
|
||||
PyGenObject *gen = (PyGenObject *)_Py_MakeCoro(func);
|
||||
|
@ -4193,7 +4131,7 @@
|
|||
frame = cframe.current_frame = prev;
|
||||
_PyFrame_StackPush(frame, (PyObject *)gen);
|
||||
goto resume_frame;
|
||||
#line 4197 "Python/generated_cases.c.h"
|
||||
#line 4135 "Python/generated_cases.c.h"
|
||||
}
|
||||
|
||||
TARGET(BUILD_SLICE) {
|
||||
|
@ -4201,15 +4139,15 @@
|
|||
PyObject *stop = stack_pointer[-(1 + ((oparg == 3) ? 1 : 0))];
|
||||
PyObject *start = stack_pointer[-(2 + ((oparg == 3) ? 1 : 0))];
|
||||
PyObject *slice;
|
||||
#line 2992 "Python/bytecodes.c"
|
||||
#line 2942 "Python/bytecodes.c"
|
||||
slice = PySlice_New(start, stop, step);
|
||||
#line 4207 "Python/generated_cases.c.h"
|
||||
#line 4145 "Python/generated_cases.c.h"
|
||||
Py_DECREF(start);
|
||||
Py_DECREF(stop);
|
||||
Py_XDECREF(step);
|
||||
#line 2994 "Python/bytecodes.c"
|
||||
#line 2944 "Python/bytecodes.c"
|
||||
if (slice == NULL) { STACK_SHRINK(((oparg == 3) ? 1 : 0)); goto pop_2_error; }
|
||||
#line 4213 "Python/generated_cases.c.h"
|
||||
#line 4151 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(((oparg == 3) ? 1 : 0));
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = slice;
|
||||
|
@ -4220,7 +4158,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 2998 "Python/bytecodes.c"
|
||||
#line 2948 "Python/bytecodes.c"
|
||||
/* Handles f-string value formatting. */
|
||||
PyObject *(*conv_fn)(PyObject *);
|
||||
int which_conversion = oparg & FVC_MASK;
|
||||
|
@ -4255,7 +4193,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 4259 "Python/generated_cases.c.h"
|
||||
#line 4197 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK((((oparg & FVS_MASK) == FVS_HAVE_SPEC) ? 1 : 0));
|
||||
stack_pointer[-1] = result;
|
||||
DISPATCH();
|
||||
|
@ -4264,10 +4202,10 @@
|
|||
TARGET(COPY) {
|
||||
PyObject *bottom = stack_pointer[-(1 + (oparg-1))];
|
||||
PyObject *top;
|
||||
#line 3035 "Python/bytecodes.c"
|
||||
#line 2985 "Python/bytecodes.c"
|
||||
assert(oparg > 0);
|
||||
top = Py_NewRef(bottom);
|
||||
#line 4271 "Python/generated_cases.c.h"
|
||||
#line 4209 "Python/generated_cases.c.h"
|
||||
STACK_GROW(1);
|
||||
stack_pointer[-1] = top;
|
||||
DISPATCH();
|
||||
|
@ -4279,7 +4217,7 @@
|
|||
PyObject *rhs = stack_pointer[-1];
|
||||
PyObject *lhs = stack_pointer[-2];
|
||||
PyObject *res;
|
||||
#line 3040 "Python/bytecodes.c"
|
||||
#line 2990 "Python/bytecodes.c"
|
||||
#if ENABLE_SPECIALIZATION
|
||||
_PyBinaryOpCache *cache = (_PyBinaryOpCache *)next_instr;
|
||||
if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) {
|
||||
|
@ -4295,12 +4233,12 @@
|
|||
assert((unsigned)oparg < Py_ARRAY_LENGTH(binary_ops));
|
||||
assert(binary_ops[oparg]);
|
||||
res = binary_ops[oparg](lhs, rhs);
|
||||
#line 4299 "Python/generated_cases.c.h"
|
||||
#line 4237 "Python/generated_cases.c.h"
|
||||
Py_DECREF(lhs);
|
||||
Py_DECREF(rhs);
|
||||
#line 3056 "Python/bytecodes.c"
|
||||
#line 3006 "Python/bytecodes.c"
|
||||
if (res == NULL) goto pop_2_error;
|
||||
#line 4304 "Python/generated_cases.c.h"
|
||||
#line 4242 "Python/generated_cases.c.h"
|
||||
STACK_SHRINK(1);
|
||||
stack_pointer[-1] = res;
|
||||
next_instr += 1;
|
||||
|
@ -4310,27 +4248,27 @@
|
|||
TARGET(SWAP) {
|
||||
PyObject *top = stack_pointer[-1];
|
||||
PyObject *bottom = stack_pointer[-(2 + (oparg-2))];
|
||||
#line 3061 "Python/bytecodes.c"
|
||||
#line 3011 "Python/bytecodes.c"
|
||||
assert(oparg >= 2);
|
||||
#line 4316 "Python/generated_cases.c.h"
|
||||
#line 4254 "Python/generated_cases.c.h"
|
||||
stack_pointer[-1] = bottom;
|
||||
stack_pointer[-(2 + (oparg-2))] = top;
|
||||
DISPATCH();
|
||||
}
|
||||
|
||||
TARGET(EXTENDED_ARG) {
|
||||
#line 3065 "Python/bytecodes.c"
|
||||
#line 3015 "Python/bytecodes.c"
|
||||
assert(oparg);
|
||||
assert(cframe.use_tracing == 0);
|
||||
opcode = next_instr->op.code;
|
||||
oparg = oparg << 8 | next_instr->op.arg;
|
||||
PRE_DISPATCH_GOTO();
|
||||
DISPATCH_GOTO();
|
||||
#line 4330 "Python/generated_cases.c.h"
|
||||
#line 4268 "Python/generated_cases.c.h"
|
||||
}
|
||||
|
||||
TARGET(CACHE) {
|
||||
#line 3074 "Python/bytecodes.c"
|
||||
#line 3024 "Python/bytecodes.c"
|
||||
Py_UNREACHABLE();
|
||||
#line 4336 "Python/generated_cases.c.h"
|
||||
#line 4274 "Python/generated_cases.c.h"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue