Skip to content

Commit e7086d4

Browse files
committed
INPLACE_DIVIDE is no longer necessary (INPLACE_TRUE_DIVIDE is used).
1 parent 712ce45 commit e7086d4

File tree

5 files changed

+3
-9
lines changed

5 files changed

+3
-9
lines changed

Doc/lib/libdis.tex

-5
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,6 @@ \subsection{Python Byte Code Instructions}
247247
Implements in-place \code{TOS = TOS1 * TOS}.
248248
\end{opcodedesc}
249249

250-
\begin{opcodedesc}{INPLACE_DIVIDE}{}
251-
Implements in-place \code{TOS = TOS1 / TOS} when
252-
\code{from __future__ import division} is not in effect.
253-
\end{opcodedesc}
254-
255250
\begin{opcodedesc}{INPLACE_FLOOR_DIVIDE}{}
256251
Implements in-place \code{TOS = TOS1 // TOS}.
257252
\end{opcodedesc}

Include/opcode.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ extern "C" {
4848
#define INPLACE_ADD 55
4949
#define INPLACE_SUBTRACT 56
5050
#define INPLACE_MULTIPLY 57
51-
#define INPLACE_DIVIDE 58
51+
5252
#define INPLACE_MODULO 59
5353
#define STORE_SUBSCR 60
5454
#define DELETE_SUBSCR 61

Lib/compiler/pycodegen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ def visitAugAssign(self, node):
999999
'+=' : 'INPLACE_ADD',
10001000
'-=' : 'INPLACE_SUBTRACT',
10011001
'*=' : 'INPLACE_MULTIPLY',
1002-
'/=' : 'INPLACE_DIVIDE',
1002+
'/=' : 'INPLACE_TRUE_DIVIDE',
10031003
'//=': 'INPLACE_FLOOR_DIVIDE',
10041004
'%=' : 'INPLACE_MODULO',
10051005
'**=': 'INPLACE_POWER',

Lib/opcode.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def jabs_op(name, op):
8888
def_op('INPLACE_ADD', 55)
8989
def_op('INPLACE_SUBTRACT', 56)
9090
def_op('INPLACE_MULTIPLY', 57)
91-
def_op('INPLACE_DIVIDE', 58)
91+
9292
def_op('INPLACE_MODULO', 59)
9393
def_op('STORE_SUBSCR', 60)
9494
def_op('DELETE_SUBSCR', 61)

Python/compile.c

-1
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,6 @@ opcode_stack_effect(int opcode, int oparg)
13381338
case INPLACE_ADD:
13391339
case INPLACE_SUBTRACT:
13401340
case INPLACE_MULTIPLY:
1341-
case INPLACE_DIVIDE:
13421341
case INPLACE_MODULO:
13431342
return -1;
13441343
case STORE_SUBSCR:

0 commit comments

Comments
 (0)