mirror of
https://github.com/python/cpython.git
synced 2025-07-12 22:05:16 +00:00
Get rid of last vestiges of BINARY_DIVIDE.
This commit is contained in:
parent
e4993c7ac7
commit
c6d210ca76
6 changed files with 3 additions and 29 deletions
|
@ -1073,19 +1073,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throw)
|
|||
if (x != NULL) continue;
|
||||
break;
|
||||
|
||||
case BINARY_DIVIDE:
|
||||
if (!_Py_QnewFlag) {
|
||||
w = POP();
|
||||
v = TOP();
|
||||
x = PyNumber_Divide(v, w);
|
||||
Py_DECREF(v);
|
||||
Py_DECREF(w);
|
||||
SET_TOP(x);
|
||||
if (x != NULL) continue;
|
||||
break;
|
||||
}
|
||||
/* -Qnew is in effect: fall through to
|
||||
BINARY_TRUE_DIVIDE */
|
||||
case BINARY_TRUE_DIVIDE:
|
||||
w = POP();
|
||||
v = TOP();
|
||||
|
|
|
@ -479,11 +479,6 @@ fold_binops_on_constants(unsigned char *codestr, PyObject *consts)
|
|||
case BINARY_MULTIPLY:
|
||||
newconst = PyNumber_Multiply(v, w);
|
||||
break;
|
||||
case BINARY_DIVIDE:
|
||||
/* Cannot fold this operation statically since
|
||||
the result can depend on the run-time presence
|
||||
of the -Qnew flag */
|
||||
return 0;
|
||||
case BINARY_TRUE_DIVIDE:
|
||||
newconst = PyNumber_TrueDivide(v, w);
|
||||
break;
|
||||
|
@ -1302,7 +1297,6 @@ opcode_stack_effect(int opcode, int oparg)
|
|||
|
||||
case BINARY_POWER:
|
||||
case BINARY_MULTIPLY:
|
||||
case BINARY_DIVIDE:
|
||||
case BINARY_MODULO:
|
||||
case BINARY_ADD:
|
||||
case BINARY_SUBTRACT:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue