summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h139
1 files changed, 0 insertions, 139 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 2519a4e..7cb60cb 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -375,38 +375,6 @@
break;
}
- case _BINARY_OP_INPLACE_ADD_UNICODE: {
- PyObject *right;
- PyObject *left;
- right = stack_pointer[-1];
- left = stack_pointer[-2];
- assert(next_instr->op.code == STORE_FAST);
- PyObject **target_local = &GETLOCAL(next_instr->op.arg);
- if (*target_local != left) goto deoptimize;
- STAT_INC(BINARY_OP, hit);
- /* Handle `left = left + right` or `left += right` for str.
- *
- * When possible, extend `left` in place rather than
- * allocating a new PyUnicodeObject. This attempts to avoid
- * quadratic behavior when one neglects to use str.join().
- *
- * If `left` has only two references remaining (one from
- * the stack, one in the locals), DECREFing `left` leaves
- * only the locals reference, so PyUnicode_Append knows
- * that the string is safe to mutate.
- */
- assert(Py_REFCNT(left) >= 2);
- _Py_DECREF_NO_DEALLOC(left);
- PyUnicode_Append(target_local, right);
- _Py_DECREF_SPECIALIZED(right, _PyUnicode_ExactDealloc);
- if (*target_local == NULL) goto pop_2_error_tier_two;
- // The STORE_FAST is already done.
- assert(next_instr->op.code == STORE_FAST);
- SKIP_OVER(1);
- stack_pointer += -2;
- break;
- }
-
case _BINARY_SUBSCR: {
PyObject *sub;
PyObject *container;
@@ -690,18 +658,6 @@
break;
}
- case _INTERPRETER_EXIT: {
- PyObject *retval;
- retval = stack_pointer[-1];
- assert(frame == &entry_frame);
- assert(_PyFrame_IsIncomplete(frame));
- /* Restore previous frame and return. */
- tstate->current_frame = frame->previous;
- assert(!_PyErr_Occurred(tstate));
- tstate->c_recursion_remaining += PY_EVAL_C_STACK_UNITS;
- return retval;
- }
-
case _POP_FRAME: {
PyObject *retval;
retval = stack_pointer[-1];
@@ -846,33 +802,6 @@
/* _INSTRUMENTED_YIELD_VALUE is not a viable micro-op for tier 2 */
- case _YIELD_VALUE: {
- PyObject *retval;
- oparg = CURRENT_OPARG();
- retval = stack_pointer[-1];
- // 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.
- assert(frame != &entry_frame);
- frame->instr_ptr = next_instr;
- PyGenObject *gen = _PyFrame_GetGenerator(frame);
- assert(FRAME_SUSPENDED_YIELD_FROM == FRAME_SUSPENDED + 1);
- assert(oparg == 0 || oparg == 1);
- gen->gi_frame_state = FRAME_SUSPENDED + oparg;
- _PyFrame_SetStackPointer(frame, stack_pointer - 1);
- tstate->exc_info = gen->gi_exc_state.previous_item;
- gen->gi_exc_state.previous_item = NULL;
- _Py_LeaveRecursiveCallPy(tstate);
- _PyInterpreterFrame *gen_frame = frame;
- frame = tstate->current_frame = frame->previous;
- gen_frame->previous = NULL;
- _PyFrame_StackPush(frame, retval);
- /* We don't know which of these is relevant here, so keep them equal */
- assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER);
- LOAD_IP(1 + INLINE_CACHE_ENTRIES_SEND);
- goto resume_frame;
- }
-
case _POP_EXCEPT: {
PyObject *exc_value;
exc_value = stack_pointer[-1];
@@ -2084,12 +2013,6 @@
break;
}
- case _JUMP_FORWARD: {
- oparg = CURRENT_OPARG();
- JUMPBY(oparg);
- break;
- }
-
/* _JUMP_BACKWARD is not a viable micro-op for tier 2 */
/* _POP_JUMP_IF_FALSE is not a viable micro-op for tier 2 */
@@ -2111,17 +2034,6 @@
break;
}
- case _JUMP_BACKWARD_NO_INTERRUPT: {
- oparg = CURRENT_OPARG();
- /* 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);
- break;
- }
-
case _GET_LEN: {
PyObject *obj;
PyObject *len_o;
@@ -3060,32 +2972,6 @@
break;
}
- case _CALL_LIST_APPEND: {
- PyObject **args;
- PyObject *self;
- PyObject *callable;
- oparg = CURRENT_OPARG();
- args = &stack_pointer[-oparg];
- self = stack_pointer[-1 - oparg];
- callable = stack_pointer[-2 - oparg];
- assert(oparg == 1);
- PyInterpreterState *interp = tstate->interp;
- if (callable != interp->callable_cache.list_append) goto deoptimize;
- assert(self != NULL);
- if (!PyList_Check(self)) goto deoptimize;
- STAT_INC(CALL, hit);
- if (_PyList_AppendTakeRef((PyListObject *)self, args[0]) < 0) {
- goto pop_1_error; // Since arg is DECREF'ed already
- }
- Py_DECREF(self);
- Py_DECREF(callable);
- STACK_SHRINK(3);
- // Skip POP_TOP
- assert(next_instr->op.code == POP_TOP);
- SKIP_OVER(1);
- DISPATCH();
- }
-
case _CALL_METHOD_DESCRIPTOR_O: {
PyObject **args;
PyObject *self_or_null;
@@ -3307,31 +3193,6 @@
break;
}
- case _RETURN_GENERATOR: {
- assert(PyFunction_Check(frame->f_funcobj));
- PyFunctionObject *func = (PyFunctionObject *)frame->f_funcobj;
- PyGenObject *gen = (PyGenObject *)_Py_MakeCoro(func);
- if (gen == NULL) {
- GOTO_ERROR(error);
- }
- assert(EMPTY());
- _PyFrame_SetStackPointer(frame, stack_pointer);
- _PyInterpreterFrame *gen_frame = (_PyInterpreterFrame *)gen->gi_iframe;
- frame->instr_ptr = next_instr;
- _PyFrame_Copy(frame, gen_frame);
- assert(frame->frame_obj == NULL);
- gen->gi_frame_state = FRAME_CREATED;
- gen_frame->owner = FRAME_OWNED_BY_GENERATOR;
- _Py_LeaveRecursiveCallPy(tstate);
- assert(frame != &entry_frame);
- _PyInterpreterFrame *prev = frame->previous;
- _PyThreadState_PopFrame(tstate, frame);
- frame = tstate->current_frame = prev;
- _PyFrame_StackPush(frame, (PyObject *)gen);
- LOAD_IP(frame->return_offset);
- goto resume_frame;
- }
-
case _BUILD_SLICE: {
PyObject *step = NULL;
PyObject *stop;