summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-16 06:02:10 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-16 06:02:10 (GMT)
commitc6d210ca7673c6ce0cb4b77ada22087f58372efc (patch)
tree905c39266f91fbeebbeb69a5848f9eb5808bc32c /Lib
parente4993c7ac72842d18fb5689d7c77be2246b65708 (diff)
downloadcpython-c6d210ca7673c6ce0cb4b77ada22087f58372efc.zip
cpython-c6d210ca7673c6ce0cb4b77ada22087f58372efc.tar.gz
cpython-c6d210ca7673c6ce0cb4b77ada22087f58372efc.tar.bz2
Get rid of last vestiges of BINARY_DIVIDE.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/compiler/pycodegen.py4
-rw-r--r--Lib/opcode.py2
2 files changed, 2 insertions, 4 deletions
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py
index f25b3fb..e34120e 100644
--- a/Lib/compiler/pycodegen.py
+++ b/Lib/compiler/pycodegen.py
@@ -206,14 +206,12 @@ class CodeGenerator:
self.setups = misc.Stack()
self.last_lineno = None
self._setupGraphDelegation()
- self._div_op = "BINARY_DIVIDE"
# XXX set flags based on future features
futures = self.get_module().futures
for feature in futures:
if feature == "division":
self.graph.setFlag(CO_FUTURE_DIVISION)
- self._div_op = "BINARY_TRUE_DIVIDE"
elif feature == "absolute_import":
self.graph.setFlag(CO_FUTURE_ABSIMPORT)
elif feature == "with_statement":
@@ -1177,7 +1175,7 @@ class CodeGenerator:
return self.binaryOp(node, 'BINARY_MULTIPLY')
def visitDiv(self, node):
- return self.binaryOp(node, self._div_op)
+ return self.binaryOp(node, 'BINARY_TRUE_DIVIDE')
def visitFloorDiv(self, node):
return self.binaryOp(node, 'BINARY_FLOOR_DIVIDE')
diff --git a/Lib/opcode.py b/Lib/opcode.py
index 095ca42..2b9212f 100644
--- a/Lib/opcode.py
+++ b/Lib/opcode.py
@@ -61,7 +61,7 @@ def_op('UNARY_INVERT', 15)
def_op('LIST_APPEND', 18)
def_op('BINARY_POWER', 19)
def_op('BINARY_MULTIPLY', 20)
-def_op('BINARY_DIVIDE', 21)
+
def_op('BINARY_MODULO', 22)
def_op('BINARY_ADD', 23)
def_op('BINARY_SUBTRACT', 24)