summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-17 08:59:09 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-17 08:59:09 +0000
commite7086d409e846254df5cc89b505cbd0804d45c5e (patch)
treea2e42f44f07dd2965beaba57679b293e287b7927
parent712ce454156496e9bcd32cffde78d1626b102010 (diff)
downloadcpython-git-e7086d409e846254df5cc89b505cbd0804d45c5e.tar.gz
INPLACE_DIVIDE is no longer necessary (INPLACE_TRUE_DIVIDE is used).
-rw-r--r--Doc/lib/libdis.tex5
-rw-r--r--Include/opcode.h2
-rw-r--r--Lib/compiler/pycodegen.py2
-rw-r--r--Lib/opcode.py2
-rw-r--r--Python/compile.c1
5 files changed, 3 insertions, 9 deletions
diff --git a/Doc/lib/libdis.tex b/Doc/lib/libdis.tex
index a5b2c2c54a..19fda5ba99 100644
--- a/Doc/lib/libdis.tex
+++ b/Doc/lib/libdis.tex
@@ -247,11 +247,6 @@ Implements in-place \code{TOS = TOS1 ** TOS}.
Implements in-place \code{TOS = TOS1 * TOS}.
\end{opcodedesc}
-\begin{opcodedesc}{INPLACE_DIVIDE}{}
-Implements in-place \code{TOS = TOS1 / TOS} when
-\code{from __future__ import division} is not in effect.
-\end{opcodedesc}
-
\begin{opcodedesc}{INPLACE_FLOOR_DIVIDE}{}
Implements in-place \code{TOS = TOS1 // TOS}.
\end{opcodedesc}
diff --git a/Include/opcode.h b/Include/opcode.h
index d05588a8d3..e8a7c7f1fa 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -48,7 +48,7 @@ extern "C" {
#define INPLACE_ADD 55
#define INPLACE_SUBTRACT 56
#define INPLACE_MULTIPLY 57
-#define INPLACE_DIVIDE 58
+
#define INPLACE_MODULO 59
#define STORE_SUBSCR 60
#define DELETE_SUBSCR 61
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py
index e34120ef5d..aac2dda7e2 100644
--- a/Lib/compiler/pycodegen.py
+++ b/Lib/compiler/pycodegen.py
@@ -999,7 +999,7 @@ class CodeGenerator:
'+=' : 'INPLACE_ADD',
'-=' : 'INPLACE_SUBTRACT',
'*=' : 'INPLACE_MULTIPLY',
- '/=' : 'INPLACE_DIVIDE',
+ '/=' : 'INPLACE_TRUE_DIVIDE',
'//=': 'INPLACE_FLOOR_DIVIDE',
'%=' : 'INPLACE_MODULO',
'**=': 'INPLACE_POWER',
diff --git a/Lib/opcode.py b/Lib/opcode.py
index 2b9212f75b..573a7b04be 100644
--- a/Lib/opcode.py
+++ b/Lib/opcode.py
@@ -88,7 +88,7 @@ def_op('DELETE_SLICE+3', 53)
def_op('INPLACE_ADD', 55)
def_op('INPLACE_SUBTRACT', 56)
def_op('INPLACE_MULTIPLY', 57)
-def_op('INPLACE_DIVIDE', 58)
+
def_op('INPLACE_MODULO', 59)
def_op('STORE_SUBSCR', 60)
def_op('DELETE_SUBSCR', 61)
diff --git a/Python/compile.c b/Python/compile.c
index 9ce2bf795f..b92fb62541 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1338,7 +1338,6 @@ opcode_stack_effect(int opcode, int oparg)
case INPLACE_ADD:
case INPLACE_SUBTRACT:
case INPLACE_MULTIPLY:
- case INPLACE_DIVIDE:
case INPLACE_MODULO:
return -1;
case STORE_SUBSCR: